Skip to content

Latest commit

 

History

History
273 lines (184 loc) · 11.2 KB

SolanaNFTMarketplacesApi.md

File metadata and controls

273 lines (184 loc) · 11.2 KB

theblockchainapi.SolanaNFTMarketplacesApi

All URIs are relative to https://api.blockchainapi.com/v1

Method HTTP request Description
solanaBuyNFT POST /solana/nft/marketplaces/{exchange}/buy/{network}/{mint_address} Buy
solanaDelistNFT POST /solana/nft/marketplaces/{exchange}/delist/{network}/{mint_address} Delist
solanaGetNFTListing GET /solana/nft/marketplaces/listing/{network}/{mint_address} Get NFT Listing
solanaListNFT POST /solana/nft/marketplaces/{exchange}/list/{network}/{mint_address} List

solanaBuyNFT

BuyResponse solanaBuyNFT()

<a href="https://github.com/BL0CK-X/blockchain-api/tree/main/examples/solana-nft-marketplaces/buy-nft\" target="_blank">See examples (Python, JavaScript). Buy an NFT on a Solana Exchange. Exchanges supported: SolSea, Magic Eden Cost: 25 Credits, Cost: 3 Credits on Devnet (<a href="#section/Pricing">See Pricing)

Example

import { theblockchainapi } from 'theblockchainapi';
import * as fs from 'fs';

const configuration = theblockchainapi.createConfiguration();
const apiInstance = new theblockchainapi.SolanaNFTMarketplacesApi(configuration);

let body:theblockchainapi.SolanaNFTMarketplacesApiSolanaBuyNFTRequest = {
  // 'devnet' | 'mainnet-beta' | The network ID
  network: "devnet",
  // 'magic-eden' | The NFT exchange to interact with
  exchange: "magic-eden",
  // string | The mint address of the NFT you want to buy
  mintAddress: "7GA16mQup7ESJbaD6n49VCwVG9kRkyQDzWKhBSLjbYqr",
  // BuyRequest (optional)
  buyRequest: null,
};

apiInstance.solanaBuyNFT(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
buyRequest BuyRequest
network [**'devnet' 'mainnet-beta'**]Array<'devnet' | 'mainnet-beta'> The network ID
exchange ['magic-eden']Array<'magic-eden'> The NFT exchange to interact with defaults to undefined
mintAddress [string] The mint address of the NFT you want to buy defaults to undefined

Return type

BuyResponse

Authorization

APIKeyID, APISecretKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful Response -
400 Bad request (check response message) -
401 Invalid API key pair in headers -
402 Payment required. Occurs when you run out of API requests. Upgrade <a href=&quot;https://dashboard.theblockchainapi.com/billing\" target=&quot;_blank&quot;>here</a>. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

solanaDelistNFT

DelistResponse solanaDelistNFT()

<a href="https://github.com/BL0CK-X/blockchain-api/tree/main/examples/solana-nft-marketplaces/delist-nft\" target="_blank">See examples (Python, JavaScript). Delist an NFT from a Solana Exchange. Exchanges supported: SolSea, Magic Eden Cost: 8 Credits, Cost: 3 Credits on Devnet (<a href="#section/Pricing">See Pricing)

Example

import { theblockchainapi } from 'theblockchainapi';
import * as fs from 'fs';

const configuration = theblockchainapi.createConfiguration();
const apiInstance = new theblockchainapi.SolanaNFTMarketplacesApi(configuration);

let body:theblockchainapi.SolanaNFTMarketplacesApiSolanaDelistNFTRequest = {
  // 'devnet' | 'mainnet-beta' | The network ID
  network: "devnet",
  // 'magic-eden' | The NFT exchange to interact with
  exchange: "magic-eden",
  // string | The mint address of the NFT you want to buy
  mintAddress: "7GA16mQup7ESJbaD6n49VCwVG9kRkyQDzWKhBSLjbYqr",
  // DelistRequest (optional)
  delistRequest: null,
};

apiInstance.solanaDelistNFT(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
delistRequest DelistRequest
network [**'devnet' 'mainnet-beta'**]Array<'devnet' | 'mainnet-beta'> The network ID
exchange ['magic-eden']Array<'magic-eden'> The NFT exchange to interact with defaults to undefined
mintAddress [string] The mint address of the NFT you want to buy defaults to undefined

Return type

DelistResponse

Authorization

APIKeyID, APISecretKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful Response -
400 Bad request (check response message) -
401 Invalid API key pair in headers -
402 Payment required. Occurs when you run out of API requests. Upgrade <a href=&quot;https://dashboard.theblockchainapi.com/billing\" target=&quot;_blank&quot;>here</a>. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

solanaGetNFTListing

GetNFTListingResponse solanaGetNFTListing()

<a href="https://github.com/BL0CK-X/blockchain-api/tree/main/examples/solana-nft-marketplaces/get-nft-listing\" target="_blank">See examples (Python, JavaScript). Get the Marketplace listing of a Solana NFT. Currently checks the following Solana NFT martketplaces: SolSea, Magic Eden, Solanart, Alpha Art, Digital Eyes, Exchange.art Cost: 1 Credits, (<a href="#section/Pricing">See Pricing)

Example

import { theblockchainapi } from 'theblockchainapi';
import * as fs from 'fs';

const configuration = theblockchainapi.createConfiguration();
const apiInstance = new theblockchainapi.SolanaNFTMarketplacesApi(configuration);

let body:theblockchainapi.SolanaNFTMarketplacesApiSolanaGetNFTListingRequest = {
  // 'devnet' | 'mainnet-beta' | The network ID
  network: "devnet",
  // string | The mint address of the NFT you want to buy
  mintAddress: "7GA16mQup7ESJbaD6n49VCwVG9kRkyQDzWKhBSLjbYqr",
};

apiInstance.solanaGetNFTListing(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
network [**'devnet' 'mainnet-beta'**]Array<'devnet' | 'mainnet-beta'> The network ID
mintAddress [string] The mint address of the NFT you want to buy defaults to undefined

Return type

GetNFTListingResponse

Authorization

APIKeyID, APISecretKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful Response -
400 Bad request (check response message) -
401 Invalid API key pair in headers -
402 Payment required. Occurs when you run out of API requests. Upgrade <a href=&quot;https://dashboard.theblockchainapi.com/billing\" target=&quot;_blank&quot;>here</a>. -
403 Our API will throw a 403 if you are providing a body in the GET request. Such requests are insecure and rejected. The solution is not to provide any sort of body in any GET request. -
404 No marketplace listing found for this NFT. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

solanaListNFT

ListResponse solanaListNFT()

<a href="https://github.com/BL0CK-X/blockchain-api/tree/main/examples/solana-nft-marketplaces/list-nft\" target="_blank">See examples (Python, JavaScript). List an NFT on a Solana Exchange. Exchanges supported: SolSea, Magic Eden Cost: 12 Credits, Cost: 3 Credits on Devnet (<a href="#section/Pricing">See Pricing)

Example

import { theblockchainapi } from 'theblockchainapi';
import * as fs from 'fs';

const configuration = theblockchainapi.createConfiguration();
const apiInstance = new theblockchainapi.SolanaNFTMarketplacesApi(configuration);

let body:theblockchainapi.SolanaNFTMarketplacesApiSolanaListNFTRequest = {
  // 'devnet' | 'mainnet-beta' | The network ID
  network: "devnet",
  // 'magic-eden' | The NFT exchange to interact with
  exchange: "magic-eden",
  // string | The mint address of the NFT you want to buy
  mintAddress: "7GA16mQup7ESJbaD6n49VCwVG9kRkyQDzWKhBSLjbYqr",
  // ListRequest (optional)
  listRequest: null,
};

apiInstance.solanaListNFT(body).then((data:any) => {
  console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
listRequest ListRequest
network [**'devnet' 'mainnet-beta'**]Array<'devnet' | 'mainnet-beta'> The network ID
exchange ['magic-eden']Array<'magic-eden'> The NFT exchange to interact with defaults to undefined
mintAddress [string] The mint address of the NFT you want to buy defaults to undefined

Return type

ListResponse

Authorization

APIKeyID, APISecretKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful Response -
400 Bad request (check response message) -
401 Invalid API key pair in headers -
402 Payment required. Occurs when you run out of API requests. Upgrade <a href=&quot;https://dashboard.theblockchainapi.com/billing\" target=&quot;_blank&quot;>here</a>. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]