Skip to main content
BETA
HomeIntegration BuilderAPI ReferenceGuides
View Mirror World on Github
Join the Discord server

Language:

fetch_nft_marketplace_activity

Fetch NFT Marketplace Activity for an NFT by it's mint address.


_34
use mirrorworld_sdk_rust::{ marketplace::Marketplace, NetEnv };
_34
_34
fn main() {
_34
// First create the SDK instance
_34
let api_key: &str = "SUPER_SECRET_API_KEY"; // Can be gotten from the developer dashboard
_34
let access_token: &str = "USER_AUTH_ACCESS_TOKEN"; // Current user's auth token
_34
let marketplace = Marketplace::new(api_key.to_string(), NetEnv::DEVNET, access_token.to_string());
_34
_34
// fetch_nft_marketplace_activity process
_34
let mint_address: &str = "5eGe5EaC5w5L9nCdmqM4eCe8ZLkBanBVMYBB4gj71qg";
_34
_34
let nft_marketplace_activity: SolanaNFTs = SolanaNFTAuctionActivities.fetch_nft_marketplace_activity(mint_address).await.unwrap();
_34
}
_34
_34
// Return Types
_34
// ============
_34
#[derive(Debug, Serialize, Deserialize)]
_34
pub struct SolanaNFTAuctionActivities {
_34
#[serde(rename = "mintAddress")]
_34
pub mint_address: String,
_34
#[serde(rename = "auctionActivities")]
_34
pub auction_activities: Vec<SolanaNFTAuctionActivity>,
_34
#[serde(rename = "tokenTransfers")]
_34
pub token_transfers: Vec<SolanaNFTTransfersEntity>,
_34
}
_34
_34
_34
// Error response if any
_34
// =====================
_34
#[derive(Debug, Serialize, Deserialize)]
_34
pub struct Err {
_34
#[serde(rename = "InstructionError")]
_34
pub instruction_error: Option<String>,
_34
}

Edit this page on GitHub

Copyright © Mirror World, Inc. 2023
On this page

    Home

    Tutorials

    Guides

    API Reference