Shyft
Start BuildingSupportWebsite
  • Welcome
    • 👋Introducing Shyft
    • 🏗️Start Building
  • Solana Infrastructure
    • 🚁Shyft RPCs
  • Yellowstone gRPC Network
    • Decoding gRPC Latency
    • ⚡gRPC Docs
      • Introduction
      • Authentication
      • Subscribe Requests
      • FAQ
      • Getting Started
        • Initializing the Yellowstone Client
        • Making a gRPC connection
        • Adding a Reconnection Mechanism
        • 🔥Replaying Slots with Solana yellowstone gRPCs
        • Modifying your Subscribe Request
        • Closing a gRPC Connection
      • Subscribing to Transactions
        • All Transactions of an address
        • Subscribing to all transactions of a Liquidity Pool
        • Subscribing to all transactions of multiple addresses
        • Subscribing to all transactions of a Token
      • Subscribing to Accounts
        • Account Updates for a Program
        • Account Updates for an Address
        • Account updates using memcmp
      • Streaming Blocks & BlocksMeta
        • Streaming Block Updates
        • Subscribing to BlocksMeta
      • Modifying & Unsubscribing
  • Solana defi data
    • DeFI APIs
      • Get Pool By Address
      • Get Pools By Token Pair
      • Get All Pools for a Token
      • Get Liquidity Details of a Pool
  • Callbacks
    • ☎️What are Callbacks?
      • Transaction Callbacks
      • Account Callbacks
    • 📔Callback APIs
      • Response Structure
      • List Callbacks
      • Register callback
      • Remove callback
      • 🔥Pause a callback
      • 🔥Resume a callback
      • Update Callbacks
      • Add Addresses
      • Remove addresses
  • Solana Super Indexers
    • 🌩️GraphQL APIs
      • Getting Started
      • Building Queries
      • Paginating Response
      • Applying Filters
      • Ordering and Sorting Data
    • 📀Case Studies
      • Tensor
        • Get Active Listings of a Wallet
        • Get Active Bids of a Wallet
        • Get Active Listings of a Collection
        • Get all Bids of a Collection
        • Get all Pools of a Margin Account
        • Get all Pools by Owner
      • Raydium
        • Get Pool By Address
        • Get Pools By Token Address
        • Get Pools Created Between Time
        • Get Pool Burn Percentage
        • Get Liquidity Details of a Pool
        • Get Pool and OpenBook Market Info
        • Get Token Supply Percentage In Pool
      • Orca Whirlpool
        • Get Pool by Address
        • Get Pool by Token Address
        • Get Positions for a Pool
        • Get Positions for a Wallet
        • Get Liquidity Details of a Pool
      • Kamino
        • Get Borrow Details of a Wallet
        • Get Deposit Details of a Wallet
        • Get Reserve Details
      • Cross Marketplace Queries
        • Get active listings across marketplaces for a wallet
        • Get listings for a collection across marketplaces
        • Get floor price of a collection
      • Cross Defi Queries
        • Fetch Liquidity Pools for Token
      • Native Staking
        • Get Stakes for a Wallet
        • Get Stakes For Validator
      • Governance/Realms
        • Get DAO Token Owners
        • Get Proposals For Governing Mint
        • Get All Proposals For DAO
        • Get DAO Treasury Info
        • Get All Active Proposals For Wallet
      • Meteora
        • Get All LB Position Pairs
        • Get Position of a User Wallet
        • Get Pool by Token Addresses
        • Get All Deposits for a User
        • Get All Withdraws for a User
        • Get All Fees Claimed by a User
        • Get All User Positions and Deposits for a Pool
        • Get All User Positions and Withdrawals for a Pool
      • Fluxbeam
        • Get Pool by Address
        • Get Pool by Token Addresses
      • Drift
        • Get User account for Delegate
        • Get User accounts based on authority
        • Get User details based on Referrer
        • Get Borrow/Deposit Amount for an User
        • Get PrepPositions for an User Account
        • Getting OrderId and userOrderId
        • Get OpenOrders for a User Account
      • 🔥Pumpswap
        • 🔥Get Pool by Address
        • 🔥Get Pool by Creator Address
        • 🔥Get Pools by Token Addresses
      • Raydium Launchpad
        • Get Bonding Curve Details by Pool Address
        • Get All Pools for a Creator
        • Get Pools by Token Addresses
        • Get Migration details of a Pool
  • Solana APIs
    • API Reference
    • Transactions
      • Parsed Transaction Structure
      • Transaction APIs
        • History
        • Parse Signature
        • Parse Multiple Signatures
        • Send
        • Send Multiple
    • NFT
      • 🔥Create Gasless
      • Create
      • Read All
      • Burn
      • 🔥Burn Multiple NFTs V2
      • Update
      • 🔥Create NFT from Metadata
      • 🔥Read Wallet Nfts
      • 🔥Read Selected NFTs
      • 🔥Get NFT Owners
      • 🔥Update NFT Metadata Uri
      • 🔥Update V2
      • Search
      • Transfer
      • Transfer Multiple NFTs
      • Mint
      • Read
    • Wallet
      • Get Balance
      • Get Token Balance
      • Get All Tokens Balance
      • Get Portfolio
      • Resolve Address
      • Get All Domains
      • Get Stake Accounts
    • Fungible Tokens
      • Create
      • Mint
      • Burn
      • 🔥Update
      • Get Token Info
      • Transfer
      • Airdrop
Powered by GitBook
On this page
  • Why use Shyft to create NFT Marketplace?
  • Terminology
  • Tools
  • Create Marketplace
  • POST /sol/v1/marketplace/create
  • Update Marketplace
  • POST /sol/v1/marketplace/update
  • Find Marketplace
  • GET /sol/v1/marketplace/find
  • Get Markets
  • GET /sol/v1/marketplace/my_markets
  • Get Treasury Balance
  • GET /sol/v1/marketplace/treasury_balance
  • Withdraw Fees
  • POST /sol/v1/marketplace/withdraw_fee
  • Listings
  • List NFT
  • POST /sol/v1/marketplace/list
  • Gasless NFT Listing
  • POST /sol/v1/marketplace/list_gasless
  • Buy NFT
  • POST /sol/v1/marketplace/buy
  • Unlist NFT
  • POST /sol/v1/marketplace/unlist
  • Bid NFT
  • POST /sol/v1/marketplace/bid
  • Accept Bid
  • POST /sol/v1/marketplace/accept_bid
  • Cancel Bid
  • POST /sol/v1/marketplace/cancel_bid
  • Active Listings
  • GET /sol/v1/marketplace/active_listings
  • Active Listings V2
  • GET /sol/v2/marketplace/active_listings
  • Listing Details
  • GET sol/v1/marketplace/list_details
  • Seller Listings
  • GET /sol/v1/marketplace/seller_listings
  • Active Sellers
  • GET /sol/v1/marketplace/active_sellers
  • Order History
  • GET /sol/v1/marketplace/order_history
  • Marketplace Stats
  • GET /sol/v1/marketplace/stats
  • Active Bids
  • GET /sol/v2/marketplace/active_bids
  • Index Marketplace
  • PUT /sol/v1/marketplace/index

Was this helpful?

  1. Solana APIs

NFT Marketplace

APIs to setup, customise and manage your own NFT Marketplaces.

Last updated 1 year ago

Was this helpful?

Shyft has released a set of APIs, that enables anyone who wants to run their own NFT marketplace to do so quickly, efficiently, and at scale.

Postman Documentation:

Get Shyft API key:

Marketplace Demo:

Why use Shyft to create NFT Marketplace?

We have built our APIs on top of the Metaplex protocol with a lot of added advantages. The goal here is to enable businesses to:

  • Build their own white labeled marketplaces with the minimum development effort.

  • Launch in-app marketplaces so that a dApps user never has to leave the dApp to purchase NFTs and creators can weave seamless experiences for their dApp's users.

These APIs are built with aim of powering many scalable marketplaces. Therefore there are a lot of systems that developers get without writing a single line of code. Some of these systems include:

  1. Blockchain Data Cache:

    All your marketplace data is cached in a MongoDB database instance, which always remains in sync with the blockchain data. You can do complex queries on this data, and enable cool experiences for your marketplace users.

  2. Real-time Stats:

    We give you stats like a collection's floor prices, average price, total traded volume, popular collections, and many more, and that too in real-time.

  3. Auctions:

    Allow your users to auction their NFTs and maximize their profits and play a fair game as all the bids are placed on-chain.

  4. Flexible currency:

    Choose SOL or any SPL token (USDC, mSol, RAY, or )as the marketplace currency. Use this currency to sell and transact in the marketplace.

  5. Updatable marketplaces:

    Set up and update the properties of the marketplace like transaction fees, treasury withdrawal owner, marketplace update authority, and gas fee payment account.

  6. Royalty Distribution

    Our APIs ensure that the original creators of the NFT get their royalty whenever the NFTs are sold in your marketplaces.

In very simple terms these APIs enable you to iterate and build fast, cutting down on your go-to-market time.

Terminology

Shyft marketplace APIs create escrow-less marketplaces, where the NFTs remain in a user's wallet until the sale is complete. There are a few important concepts to understand and efficiently use these APIs.

  1. Authority : The account which has the permission to update the marketplace properties and execute a withdrawal from the marketplace treasury. By default, the marketplace creator is the authority.

  2. Creator : The account which pays the gas fee for executing the marketplace creation instruction.

  3. Fee Recipient: The destination account address that will receive the funds whenever they are withdrawn from the marketplace treasury.

  4. Fee Account: The account that pays the listing cost on behalf of the seller when used in gas less listing.

  5. Fee Payer : An account that is used to pay for Solana fees for the seller and buyer if the marketplace chooses to execute the sale in the background.

  6. Transaction Fee: The percentage of every sales transaction amount that will be deposited in the marketplace treasury. By default, all the Shyft-created marketplaces charge a 2% transaction fee.

  7. Treasury: The marketplace treasury is an on-chain account where all the transaction fee received by the marketplace gets deposited and remains there until withdrawn.

  8. Currency Address : The SPL token that is used as the currency in the marketplace. SOL is the default currency, if not provided while marketplace setup.

  9. Currency Symbol : The on-chain symbol of the SPL token currency of the marketplace.

  10. Listing : Before an NFT can be sold and bought by a user, it has to be listed for sale in the marketplace at a certain price. Listing represents an NFT on sale.

  11. List State : An on-chain address where all the transactions that happen on an NFT listing are stored. This is unique for each NFT listing created. Generated at the time of list creation.

  12. xxx_wallet : In the following doc, there are API input params ending with the wallet. These are essentially the accounts that pay the gas fee of the API's operation.

Tools

The post API calls return a transaction string object, that needs to be signed and sent to the blockchain.

A small tutorial and code snippet on how to programtically sign and send transactions on Solana can be found here, How to sign transactions on Solana.

Create Marketplace

Create your own on-chain NFT marketplace

POST /sol/v1/marketplace/create

Input Parameters:

Required Params:

  • network : string - either of [mainnet-beta, testnet, devnet]

  • creator_wallet: string - wallet address of the creator of the marketplace. This is the account that pays the gas fees for creating marketplace transactions.

Optional Params:

  • currency_address: string

  • fee_payer: string

  • fee_recipient: string

  • transaction_fee: number

Response:

  • A JSON object containing

    • Marketplace properties

    • encoded_tranaction: A base64 encoded transaction string to be signed with the creator_wallet.

var myHeaders = new Headers();
myHeaders.append("x-api-key", "20CcwuFeQOIcfuHx");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "network": "devnet",
  "transaction_fee": 10,
  "currency_address": "4TLk2jocJuEysZubcMFCqsEFFu5jVGzTp14kAANDaEFv",
  "fee_payer": "EijtaNNHqqaPmWwAmUi8f1TC6gSPnqkoodQd2BLFpA8T",
  "fee_recipient": "Eb3ykuiCtvGcqs4XRCASThFf4EUxrL7k3TZsytWkXTBe",
  "creator_wallet": "Eb3ykuiCtvGcqs4XRCASThFf4EUxrL7k3TZsytWkXTBe"
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://api.shyft.to/sol/v1/marketplace/create", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
{
    "success": true,
    "message": "Create marketplace transaction generated successfully",
    "result": {
        "network": "devnet",
        "address": "5p4Bua5tSsSo1RJ94H1w5DiMSPfWcvMvnMVjPpZ6sJUb",
         "fee_account": "5jdmaVFbJH6uZB8dABqEUt96cicgEMtFtZUDoDjc7dGb",
        "treasury_address": "EUUT8hfgak2YKcW41HoNWeiTuARv33fwRPn416enRxsR",
        "fee_payer": "EijtaNNHqqaPmWwAmUi8f1TC6gSPnqkoodQd2BLFpA8T",
        "fee_recipient": "Eb3ykuiCtvGcqs4XRCASThFf4EUxrL7k3TZsytWkXTBe",
        "currency_address": "4TLk2jocJuEysZubcMFCqsEFFu5jVGzTp14kAANDaEFv",
        "currency_symbol": "SD",
        "creator": "Eb3ykuiCtvGcqs4XRCASThFf4EUxrL7k3TZsytWkXTBe",
        "transaction_fee": 10,
        "authority": "Eb3ykuiCtvGcqs4XRCASThFf4EUxrL7k3TZsytWkXTBe",
        "encoded_transaction": "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAYMyeELoVlWCYLzz5fir3Nbcqf9Gx2d8RF9cFc+TSeDElEpllGmU5gB59zBiKHVbO8VeC6JBAmVdAve1TCQm79VVkd8poSl+tLizGFN9/5gcQ5f+VDVA01ZfUfbnMjHpK2EqaC9BXeewP847v5fFL8noPMvrLJQo7L7c9BQP4A4vP/L2Tz8ECwUGHyaWuUik2ukTTolCWNP5F9oXvoxjPoaDMgxpny4OsTYbvTQ5jbV54cdGa8QasHaArFAWj/qdQoYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAzUnvqkKk9xgLz7ESDXWhSKunzibV+8TTasl6JupSX/YyXJY9OJInxuz0QKRSODYMLWhOZ2v8QhASOe9jb6fhZCmWThjy6RhVk6uQTc3IVRusBUckwgna71K0qHDpCEHsGp9UXGSxcUSGMyUw9SvF/WNruCJuh/UTj29mKAAAAAAbd9uHXZaGT2cvhRs7reawctIXtX1s3kTqM9YV+/wCpxFDDStIysCI9d4yBvF+7gZtZzrXRFHSvxMY69iXWIy0BCQ0HAAAEBQACAQMLBggKD91C8p/5zobx//z76AMAAA=="
    }
}

Update Marketplace

Update an already created on-chain marketplace.

POST /sol/v1/marketplace/update

Input Parameters:

Required Params:

  • network:string- either of [mainnet-beta, testnet, devnet]

  • authority_wallet: string - wallet address of the marketplace authority.

  • marketplace_address: string - on-chain address of the marketplace that is to be updated.

Optional Params: Properties of the marketplace that can be updated, if not provided then left unchanged.

  • new_authority_address : string - account address that will be the new update authority of the marketplace.

  • new_transaction_fee: string - marketplace transaction fee will be set to this value if provided.

  • new_fee_payer: string - updates the marketplace's fee payer account address.

  • fee_recipient : string - updates the marketplace's fee recipient . If your marketplace is using any SPL token currency other than SOL then this is field is required, even if you do not wish to change it. You can just send the current fee recipient address.

Response:

  • A JSON object containing

    • Updated marketplace properties

    • encoded_tranaction: A base64 encoded transaction string to be signed with the authority_wallet.

var myHeaders = new Headers();
myHeaders.append("x-api-key", "20CcwuFeQOIcfuHx");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "network": "devnet",
  "marketplace_address": "5p4Bua5tSsSo1RJ94H1w5DiMSPfWcvMvnMVjPpZ6sJUb",
  "new_transaction_fee": 1,
  "authority_wallet": "Eb3ykuiCtvGcqs4XRCASThFf4EUxrL7k3TZsytWkXTBe",
  "fee_recipient": "Eb3ykuiCtvGcqs4XRCASThFf4EUxrL7k3TZsytWkXTBe"
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://api.shyft.to/sol/v1/marketplace/update", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
{
    "success": true,
    "message": "Update marketplace transaction generated successfully",
    "result": {
        "network": "devnet",
        "address": "5p4Bua5tSsSo1RJ94H1w5DiMSPfWcvMvnMVjPpZ6sJUb",
        "treasury_address": "CRA4Qd6H4tisWLCENT7pzaRbURcKwZTToDnGHTezRxBG",
        "fee_payer": "EijtaNNHqqaPmWwAmUi8f1TC6gSPnqkoodQd2BLFpA8T",
        "fee_recipient_account": "EUUT8hfgak2YKcW41HoNWeiTuARv33fwRPn416enRxsR",
        "currency_address": "4TLk2jocJuEysZubcMFCqsEFFu5jVGzTp14kAANDaEFv",
        "transaction_fee": 1,
        "authority": "Eb3ykuiCtvGcqs4XRCASThFf4EUxrL7k3TZsytWkXTBe",
        "encoded_transaction": "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAYKyeELoVlWCYLzz5fir3Nbcqf9Gx2d8RF9cFc+TSeDElFHfKaEpfrS4sxhTff+YHEOX/lQ1QNNWX1H25zIx6SthMvZPPwQLBQYfJpa5SKTa6RNOiUJY0/kX2he+jGM+hoMyDGmfLg6xNhu9NDmNtXnhx0ZrxBqwdoCsUBaP+p1ChgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADNSe+qQqT3GAvPsRINdaFIq6fOJtX7xNNqyXom6lJf9jJclj04kifG7PRApFI4NgwtaE5na/xCEBI572Nvp+FkKZZOGPLpGFWTq5BNzchVG6wFRyTCCdrvUrSocOkIQewan1RcZLFxRIYzJTD1K8X9Y2u4Im6H9ROPb2YoAAAAABt324ddloZPZy+FGzut5rBy0he1fWzeROoz1hX7/AKlFm2epCAheuIsvp1L68IUwsnWOR4qVB8/IaIlflC8D5wEHDAUAAAACAwABCQQGCA1U1wKs8QD12wFkAAAA"
    }
}

Find Marketplace

Find information about your previous or current Solana marketplaces. This API fetches a marketplace's information from the blockchain.

GET /sol/v1/marketplace/find

Query parameters:

  • network:string- either of [mainnet-beta, testnet, devnet]

  • creator_address: string - address of the marketplace creator.

  • currecy_address: string - SPL token address, used as the marketplace currency.

var myHeaders = new Headers();
myHeaders.append("x-api-key", "20CcwuFeQOIcfuHx");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://api.shyft.to/sol/v1/marketplace/find?network=devnet&creator_address=HFiyiUWFxmyKgBwCZ5ay9MYG4AajRDAJBiyRxYqM9JC&currency_address=So11111111111111111111111111111111111111112", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
{
    "success": true,
    "message": "Marketplace found successfully",
    "result": {
        "network": "devnet",
        "address": "7b2dSy4F26A6WweKgdmXzyi5FhhN5AqhuXAQHYcaXfqW",
        "fee_account": "5jdmaVFbJH6uZB8dABqEUt96cicgEMtFtZUDoDjc7dGb",
        "currency_address": "So11111111111111111111111111111111111111112",
        "currency_symbol": "SOL",
        "authority": "HFiyiUWFxmyKgBwCZ5ay9MYG4AajRDAJBiyRxYqM9JC",
        "fee_payer": "HFiyiUWFxmyKgBwCZ5ay9MYG4AajRDAJBiyRxYqM9JC",
        "fee_recipient_account": "EijtaNNHqqaPmWwAmUi8f1TC6gSPnqkoodQd2BLFpA8T",
        "fee_recipient": null,
        "treasury_address": "DVDKeRmPEL3HV1kE8ErtHX7xc1q93p9YqwMGrfB6wQDG",
        "creator": "HFiyiUWFxmyKgBwCZ5ay9MYG4AajRDAJBiyRxYqM9JC",
        "transaction_fee": 10
    }
}

Get Markets

Get details of all your marketplaces that are created using Shyft APIs. This information is fetched from the data cache.

GET /sol/v1/marketplace/my_markets

var myHeaders = new Headers();
myHeaders.append("x-api-key", "20CcwuFeQOIcfuHx");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://api.shyft.to/sol/v1/marketplace/my_markets?network=devnet", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
{
    "success": true,
    "message": "Marketplaces fetched successfully",
    "result": [
        {
            "network": "devnet",
            "address": "2LPr58dU4FeATdCaDMxu3ahVsciES84eeVE6ujDvVcVG",
            "fee_account": "GN5JBkZrdufQ2A27PizfUMgVSWwtdd19W1bWpgJuYfw1",
            "authority": "BvzKvn6nUUAYtKu2pH3h5SbUkUNcRPQawg4bURBiojJx",
            "currency_address": "So11111111111111111111111111111111111111112",
            "currency_symbol": "SOL",
            "fee_payer": "BvzKvn6nUUAYtKu2pH3h5SbUkUNcRPQawg4bURBiojJx",
            "fee_recipient": "BvzKvn6nUUAYtKu2pH3h5SbUkUNcRPQawg4bURBiojJx",
            "fee_recipient_account": "BvzKvn6nUUAYtKu2pH3h5SbUkUNcRPQawg4bURBiojJx",
            "treasury_address": "3V5iB1JR2Di1zLwMrVkDCFaLuV55EHtb1k4XKCFM7mzx",
            "creator": "BvzKvn6nUUAYtKu2pH3h5SbUkUNcRPQawg4bURBiojJx",
            "transaction_fee": 20,
            "created_at": "2022-09-03T13:47:08.072Z",
            "updated_at": "2022-10-22T14:40:40.846Z"
        },
        {
            "network": "devnet",
            "address": "89GzH22TkhZs1TfyCwbzsWJykxcaFYdM46zby2DPJ5w4",
            "fee_account": "3VKnqQqF61Z8QzbyHJKabAyF6PoP5tAbW8dbWqLMoVZ8",
            "authority": "nikkokVHPyN1RShygZVUnSZKzsnJ9mT2zcKkiTbkUaP",
            "currency_address": "So11111111111111111111111111111111111111112",
            "currency_symbol": "SOL",
            "fee_payer": "nikkokVHPyN1RShygZVUnSZKzsnJ9mT2zcKkiTbkUaP",
            "fee_recipient": "nikkokVHPyN1RShygZVUnSZKzsnJ9mT2zcKkiTbkUaP",
            "fee_recipient_account": "nikkokVHPyN1RShygZVUnSZKzsnJ9mT2zcKkiTbkUaP",
            "treasury_address": "BzGwRxnhwRTD7pxdT7KnHAMByVJ8aSZPMZkBYMwQQiPv",
            "creator": "nikkokVHPyN1RShygZVUnSZKzsnJ9mT2zcKkiTbkUaP",
            "transaction_fee": 10,
            "created_at": "2022-09-23T09:17:31.410Z",
            "updated_at": "2022-10-22T14:42:08.431Z"
        }
    ]
}

Get Treasury Balance

Check the fund balance in the marketplace treasury account.

GET /sol/v1/marketplace/treasury_balance

Query parameters:

  • network:string- either of [mainnet-beta, testnet, devnet]

  • marketplace_address: string - the address of the marketplace.

var myHeaders = new Headers();
myHeaders.append("x-api-key", "20CcwuFeQOIcfuHx");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://api.shyft.to/sol/v1/marketplace/treasury_balance?network=devnet&marketplace_address=54K5BTMj8ynktzEeaD1iGhAJsCN2svBKmD1fTQTonbBB", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
{
    "success": true,
    "message": "treasury balance fetched successfully",
    "result": {
        "amount": 1.56,
        "symbol": "SOL"
    }
}

Withdraw Fees

Withdraw the transaction fees that got deposited in the marketplace treasury as a result of the sales transactions that happened in your marketplace. The withdrawn amount will go into the marketplace's fee recipient account.

POST /sol/v1/marketplace/withdraw_fee

Input Parameters:

  • network:string- either of [mainnet-beta, testnet, devnet]

  • authority_wallet: string - wallet address of the marketplace authority.

  • marketplace_address: string - the address of the marketplace.

  • amount: number - Amount to be withdrawn.

Response:

  • encoded_transaction: A base64 encoded transaction string to be signed with the authority_wallet.

  • from : marketplace treasury account address.

  • to : marketplace fee recipient account address.

  • amount : amount to be withdrawn

var myHeaders = new Headers();
myHeaders.append("x-api-key", "20CcwuFeQOIcfuHx");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "network": "devnet",
  "marketplace_address": "5p4Bua5tSsSo1RJ94H1w5DiMSPfWcvMvnMVjPpZ6sJUb",
  "amount": 1,
  "authority_wallet": "Eb3ykuiCtvGcqs4XRCASThFf4EUxrL7k3TZsytWkXTBe"
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://api.shyft.to/sol/v1/marketplace/withdraw_fee", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
{
    "success": true,
    "message": "Fee withdrawal transaction created successfully",
    "result": {
        "from": "CRA4Qd6H4tisWLCENT7pzaRbURcKwZTToDnGHTezRxBG",
        "to": "EUUT8hfgak2YKcW41HoNWeiTuARv33fwRPn416enRxsR",
        "amount": 1,
        "encoded_transaction": "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAQIyeELoVlWCYLzz5fir3Nbcqf9Gx2d8RF9cFc+TSeDElFHfKaEpfrS4sxhTff+YHEOX/lQ1QNNWX1H25zIx6SthKmgvQV3nsD/OO7+XxS/J6DzL6yyUKOy+3PQUD+AOLz/yDGmfLg6xNhu9NDmNtXnhx0ZrxBqwdoCsUBaP+p1ChgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADNSe+qQqT3GAvPsRINdaFIq6fOJtX7xNNqyXom6lJf9CmWThjy6RhVk6uQTc3IVRusBUckwgna71K0qHDpCEHsG3fbh12Whk9nL4UbO63msHLSF7V9bN5E6jPWFfv8AqaMKy0fh8oHtamtDl4kF1O2PHC5CeU8uf1uHup73YnvsAQYHBQADAgEHBBAApFZMOEgMqgDKmjsAAAAA"
    }
}

Listings

Before an NFT can be sold and bought by a user, it has to be listed for sale in the marketplace at a certain price. Listing represents an NFT on sale.

The sections below list the listing APIs needed to fulfill different functionalities related to selling and buying NFT in the marketplace.

List NFT

List an NFT for sale in the marketplace. (✨ pNFT support added)

POST /sol/v1/marketplace/list

Input Parameters

Required Param:

  • network:string- either of [mainnet-beta, testnet, devnet]

  • nft_address: string - on-chain address of the NFT which has to be listed for sale.

  • marketplace_address: string - the address of the marketplace.

  • price: number - sale price of the NFT.

  • seller_wallet : string - wallet address of the NFT owner who wants to sell the NFT.

Optional Params:

  • service_charge : object - Transaction fee to be paid by the seller for listing an NFT on the marketplace. This fee can be charged in SOL or any SPL-20 token. Below is the structure of the service_charge key.

    • receiver : string - An address that will receive the service charge amount.

    • amount : number - The amount of currency to be charged.

    • token : string - The address of the SPL token, the service charge currency.

Charging Service charge in USDC:

{
    "receiver": "499qpPLdqgvVeGvvNjsWi27QHpC8GPkPfuL5Cn2DtZJe", 
    "token": "4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU", 
    "amount": 0.01
}

Charging Service charge in SOL:

{
    "receiver": "499qpPLdqgvVeGvvNjsWi27QHpC8GPkPfuL5Cn2DtZJe",
    "amount": 0.01
}

Response:

  • list properties

  • list_state : An on-chain address where all the transactions that happen on an NFT listing are stored. This is unique for each NFT listing created.

  • encoded_tranaction: A base64 encoded transaction string to be signed with the seller_wallet.

var myHeaders = new Headers();
myHeaders.append("x-api-key", "YOUR_API_KEY");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
    "network": "devnet",
    "marketplace_address": "6rwieGXAJ9xsMkMjTC8FXyjnttTw4th2x8ngcYeDar7K",
    "nft_address": "6PStcTWbV546dQCHbjVj4SP6Ht8e2eE4D8Mc951mH1yq",
    "price": 0.3,
    "seller_wallet": "2fmz8SuNVyxEP6QwKQs6LNaT2ATszySPEJdhUDesxktc",
    "service_charge": {
        "receiver": "499qpPLdqgvVeGvvNjsWi27QHpC8GPkPfuL5Cn2DtZJe",
        "token": "4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU",
        "amount": 0.01
    }
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://api.shyft.to/sol/v1/marketplace/list", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
{
    "success": true,
    "message": "Listing transaction created successfully",
    "result": {
        "network": "devnet",
        "marketplace_address": "6rwieGXAJ9xsMkMjTC8FXyjnttTw4th2x8ngcYeDar7K",
        "seller_address": "2fmz8SuNVyxEP6QwKQs6LNaT2ATszySPEJdhUDesxktc",
        "price": 0.3,
        "nft_address": "6PStcTWbV546dQCHbjVj4SP6Ht8e2eE4D8Mc951mH1yq",
        "list_state": "vt7XVgUxXh9Yf78vRjaMJp7yz5JukMbSCjE5TRZpFpe",
        "currency_symbol": "TEST",
        "encoded_transaction": "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAA8aGMqfUcVHHu2+lyU5gx9wU2rGxk2NoSXtodMSdev+DxUb3986VtfRHwHrvY6XX4lMf8sLBR1y1RoVWbuSr9WPQR52vd+5NTczhA26Ra4GnSXc+tpXtqmZBpPdVQ8uC4O+IoswDSgg5qfp1zy9N5IHqgHK1qbrM9G7FXFZKfqEZfuMBtJOM4oyzQYD2hm6+lWHZOeReP+7GOOAFoZEKNzSnZp01IDlLxO77egr7zFK3nnWDUlJxbT9SkV1UeRMgK4YsqEjqLzoAtEEvdpCDisSfoykvgPrw/HHDZbdqt3tAVbFhOUV7waKxq5qwRC2GjDD5AECG+07DZgtR2tw4ABQneJ6saUFuBFVfTNLFFHNEfI35BCSLSGESJ/40i8SRW8H47NhjYaWQXMnTdWyXqnAKcIXeKT/RZZlq1StURe3rYENzZNzrs9n4maEMqdqES2iowGE0f7cMxiJXr7qqW9qmwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALqm0XjDnPy0ojSqQ00wtrJyewP9/T99/JMbm23KG75c7RCyzkSFX8TqTPQE0KC0DK1/+zQGi2/G3eQYI3wAup1AKfHY1ATXWolpncvh8d3AIftzbt3Q3JbXJKrjhP1IgVxXDm0PpRqEnhIL/EEESpy14IpbDblB8YDv20qWI75qMlyWPTiSJ8bs9ECkUjg2DC1oTmdr/EIQEjnvY2+n4WQiv+JTD+mfAFjow8jSjPTRn8DqhZBcxXrS4FCe9m6btmFWYteRvJYw2HIfGgUAbGCrz00zOc1fx/ASNo7oRmvbZ32rjYo9+hFaOrhToDA/slUS05ZpAOcFKDBNLSeHz3Qplk4Y8ukYVZOrkE3NyFUbrAVHJMIJ2u9StKhw6QhB79CRel3WTEl+xWUG2wKkmCvRDi80QNVKSpAsF34f11SALcGWx49F8RTidUn9rBMPNWLhscxqg/bVJttG8A/gpRgan1RcYe9FmNdrUBFX9wsDBJMaPIVZ1pdu6y18IAAAABqfVFxksXFEhjMlMPUrxf1ja7gibof1E49vZigAAAAAG3fbh12Whk9nL4UbO63msHLSF7V9bN5E6jPWFfv8AqYyyaMe2lLEXrIAhXvUrBGv68KK8gsKwgE4v9OcnHGMvBBQUAAgJEg8DCgEZCxUYFgYEDhMRFhcbM+aFpAF/g63///8Ao+ERAAAAAAEAAAAAAAAAFAUFAAsYFwnPayygS97DG/4QBwAHDA0LGRgAGQQCDQcACgwQJwAAAAAAAAY="
    }
}

Gasless NFT Listing

Users can list an NFT for sale in the marketplace, without paying the transaction gas fee. (✨ pNFT support added)

Under the hood, this API pays the transaction fee from 2 accounts:

  1. marketplace fee_account: This is the account that is returned as fee_account in marketplace creation/find request. This is a PDA generated by the auction house protocol for a particular auction house. Pays the listing creation fee.

  2. marketplace authority: This is the address of the marketplace authority, specified at the time of creating/updating a marketplace. This information can be found using marketplace find/get_marketplaces API calls. Pays the Listing receipt generation fee and network gas fee.

For the successful execution of this request, both fee_account and authority should have sufficient SOL balance.

Important Note: Please ensure that these two wallets should have a SOL balance greater than 0 for listing an NFT gaslessly. The fee_account created by the auction house protocol, by default has a SOL balance of 0, so it is important we transfer some SOL to the fee_account before attempting to list an NFT gaslessly.

POST /sol/v1/marketplace/list_gasless

Input Parameters

Required Param:

  • network:string- either of [mainnet-beta, testnet, devnet]

  • nft_address: string - on-chain address of the NFT which has to be listed for sale.

  • marketplace_address: string - the address of the marketplace.

  • price: number - sale price of the NFT.

  • seller_wallet : string - wallet address of the NFT owner who wants to sell the NFT.

Response:

  • list properties

  • list_state : An on-chain address where all the transactions that happen on an NFT listing are stored. This is unique for each NFT listing created.

  • encoded_tranaction: A base64 encoded transaction string to be signed by:

    • marketplace_authority : The authority address of the marketplace in which the NFT needs to be listed.

    • seller_wallet

var myHeaders = new Headers();
myHeaders.append("x-api-key", "YOUR_API_KEY");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
    "network": "devnet",
    "marketplace_address": "6rwieGXAJ9xsMkMjTC8FXyjnttTw4th2x8ngcYeDar7K",
    "nft_address": "6PStcTWbV546dQCHbjVj4SP6Ht8e2eE4D8Mc951mH1yq",
    "price": 0.3,
    "seller_wallet": "2fmz8SuNVyxEP6QwKQs6LNaT2ATszySPEJdhUDesxktc",
    "service_charge": {
        "receiver": "499qpPLdqgvVeGvvNjsWi27QHpC8GPkPfuL5Cn2DtZJe",
        "token": "4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU",
        "amount": 0.01
    }
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://api.shyft.to/sol/v1/marketplace/list_gasless", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
{
    "success": true,
    "message": "Listing transaction created successfully",
    "result": {
        "network": "devnet",
        "marketplace_address": "6rwieGXAJ9xsMkMjTC8FXyjnttTw4th2x8ngcYeDar7K",
        "seller_address": "2fmz8SuNVyxEP6QwKQs6LNaT2ATszySPEJdhUDesxktc",
        "price": 0.3,
        "nft_address": "6PStcTWbV546dQCHbjVj4SP6Ht8e2eE4D8Mc951mH1yq",
        "list_state": "vt7XVgUxXh9Yf78vRjaMJp7yz5JukMbSCjE5TRZpFpe",
        "currency_symbol": "TEST",
        "encoded_transaction": "AgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAOGphVmLXkbyWMNhyHxoFAGxgq89NMznNX8fwEjaO6EZr2GMqfUcVHHu2+lyU5gx9wU2rGxk2NoSXtodMSdev+DxUb3986VtfRHwHrvY6XX4lMf8sLBR1y1RoVWbuSr9WPQR52vd+5NTczhA26Ra4GnSXc+tpXtqmZBpPdVQ8uC4O+IoswDSgg5qfp1zy9N5IHqgHK1qbrM9G7FXFZKfqEZfuMBtJOM4oyzQYD2hm6+lWHZOeReP+7GOOAFoZEKNzSnZp01IDlLxO77egr7zFK3nnWDUlJxbT9SkV1UeRMgK4YsqEjqLzoAtEEvdpCDisSfoykvgPrw/HHDZbdqt3tAVbFhOUV7waKxq5qwRC2GjDD5AECG+07DZgtR2tw4ABQneJ6saUFuBFVfTNLFFHNEfI35BCSLSGESJ/40i8SRW8H47NhjYaWQXMnTdWyXqnAKcIXeKT/RZZlq1StURe3rYENzZNzrs9n4maEMqdqES2iowGE0f7cMxiJXr7qqW9qmwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALqm0XjDnPy0ojSqQ00wtrJyewP9/T99/JMbm23KG75c7RCyzkSFX8TqTPQE0KC0DK1/+zQGi2/G3eQYI3wAup1AKfHY1ATXWolpncvh8d3AIftzbt3Q3JbXJKrjhP1IgVxXDm0PpRqEnhIL/EEESpy14IpbDblB8YDv20qWI75qMlyWPTiSJ8bs9ECkUjg2DC1oTmdr/EIQEjnvY2+n4WQiv+JTD+mfAFjow8jSjPTRn8DqhZBcxXrS4FCe9m6bt2d9q42KPfoRWjq4U6AwP7JVEtOWaQDnBSgwTS0nh890KZZOGPLpGFWTq5BNzchVG6wFRyTCCdrvUrSocOkIQe/QkXpd1kxJfsVlBtsCpJgr0Q4vNEDVSkqQLBd+H9dUgC3BlsePRfEU4nVJ/awTDzVi4bHMaoP21SbbRvAP4KUYGp9UXGHvRZjXa1ARV/cLAwSTGjyFWdaXbustfCAAAAAan1RcZLFxRIYzJTD1K8X9Y2u4Im6H9ROPb2YoAAAAABt324ddloZPZy+FGzut5rBy0he1fWzeROoz1hX7/AKk/JxQRCtP4NPHg3VVT1wI5sbjhNhUQOe1P07fTlbTrwAQUFAEJCgAQBAsCGQwVGBYHBQ8TEhYXGzPmhaQBf4Ot////AKPhEQAAAAABAAAAAAAAABQFBgAMGBcJz2ssoEvewxv+EQcBCA0ODBkYABkEAw4IAQoMECcAAAAAAAAG"
    }
}

Buy NFT

Buy the listed NFT from the marketplace (✨ pNFT support added)

POST /sol/v1/marketplace/buy

Input Parameters

Required Params:

  • network:string- either of [mainnet-beta, testnet, devnet]

  • nft_address: string - on-chain address of the NFT which has to be listed for sale.

  • marketplace_address: string - the address of the marketplace.

  • price: number - sale price of the NFT listing.

  • seller_address : string - address of the NFT seller.

  • buyer_wallet: string - wallet address of the buyer who wants to purchase the NFT.

Optional Params:

  • service_charge : object - Transaction fee to be paid by the buyer for buying the NFT from the marketplace. This fee can be charged in SOL or any SPL-20 token. Below is the structure of the service_charge key.

    • receiver : string - An address that will receive the service charge amount.

    • amount : number - The amount of currency to be charged.

    • token : string - The address of the SPL token, the service charge currency.

Please note that the wallet from which an NFT was listed, cannot buy the same NFT. When buying listed pNFT generated transaction need to signed by buyer and marketplace_authority.

Charging Service charge in USDC:

{
    "receiver": "499qpPLdqgvVeGvvNjsWi27QHpC8GPkPfuL5Cn2DtZJe", 
    "token": "4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU", 
    "amount": 0.01
}

Charging Service charge in SOL:

{
    "receiver": "499qpPLdqgvVeGvvNjsWi27QHpC8GPkPfuL5Cn2DtZJe",
    "amount": 0.01
}

Response:

  • purchase listing details.

  • purchase_receipt: on-chain purchase receipt of the NFT listing.

  • buyer_address : address of the NFT buyer.

  • encoded_tranaction: A base64 encoded transaction string to be signed with the buyer_wallet.

  • transaction_version: returns either 'lagacy' or 0. To overcome legacy transaction size (1232 bytes), in some special condition returns 'v0' transaction.

  • signers: generated transaction need to signed by these signers.

var myHeaders = new Headers();
myHeaders.append("x-api-key", "YOUR_API_KEY");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
    "network": "devnet",
    "marketplace_address": "5LSMwR5GLr4WjDHS5FoUXQCN5osZYHRoDGjmcEsS843B",
    "nft_address": "6PStcTWbV546dQCHbjVj4SP6Ht8e2eE4D8Mc951mH1yq",
    "price": 0.3,
    "seller_address": "2fmz8SuNVyxEP6QwKQs6LNaT2ATszySPEJdhUDesxktc",
    "buyer_wallet": "5KW2twHzRsAaiLeEx4zYNV35CV2hRrZGw7NYbwMfL4a2",
    "service_charge": {
        "receiver": "5KW2twHzRsAaiLeEx4zYNV35CV2hRrZGw7NYbwMfL4a2",
        "token": "HtXwt7NchBTV7xoqmjhQJqEjSrApq5FNnB8rxYu6eC7k",
        "amount": 0.01
    }
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://api.shyft.to/sol/v1/marketplace/buy", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
{
    "success": true,
    "message": "Buy transaction created successfully",
    "result": {
        "network": "devnet",
        "marketplace_address": "5LSMwR5GLr4WjDHS5FoUXQCN5osZYHRoDGjmcEsS843B",
        "seller_address": "2fmz8SuNVyxEP6QwKQs6LNaT2ATszySPEJdhUDesxktc",
        "price": 0.3,
        "nft_address": "6PStcTWbV546dQCHbjVj4SP6Ht8e2eE4D8Mc951mH1yq",
        "currecy_symbol": "SOL",
        "buyer_address": "5KW2twHzRsAaiLeEx4zYNV35CV2hRrZGw7NYbwMfL4a2",
        "encoded_transaction": "AgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAIACBlALAeVfwkorAqlrAeN8dOn8Jeu6H4u3ofHzGz4FntQP5hVmLXkbyWMNhyHxoFAGxgq89NMznNX8fwEjaO6EZr24nqxpQW4EVV9M0sUUc0R8jfkEJItIYRIn/jSLxJFbwfjs2GNhpZBcydN1bJeqcApwhd4pP9FlmWrVK1RF7etgQcJk4vP2okeeoHbuxlIEhVpqd90qLlHJqOAJQpdB7F02Agk8m/6JHA3kGEmQQPYP49m/tiuG6p/JKxxUngziaRQZvqF8mcu4h1IoWIsAMfUwraD2WgcpDn8aRBMM1lsUxjKn1HFRx7tvpclOYMfcFNqxsZNjaEl7aHTEnXr/g8V31cZUsagJiZ0xld/bQZ6A7FN2qT4e85JjOtn5fQBkjTi1dRPjdsGV0rMndfXtUDrlLRY8SVuitAvAkL7ZtGr1ityNypoUiG7MwCrv+yY+vV//u8iW994CoOZWBb1s1yBcIRoBSMBb49xx8pDlJGl4HVGtNIDtvfFWGXYIHMB90MsLagmF5c4a6vJhMr74YTUznxniMs9+z4QYlMJ1x2b+Cuhs1g2wgJGxiuuGOwBNAe/6U84iwKWfrWqITYPA2+IjAbSTjOKMs0GA9oZuvpVh2TnkXj/uxjjgBaGRCjc0p3cjFLJWVgXfevNnmRkabNDrvNZDDZLfyFwpVg5N7PifCo8mKEWzXdDR26t6qsRVen6k+vadJcxRTDycGYnYnFFAwZGb+UhFzL/7K26csOb57yM5bvF9xJrLEObOkAAAAAKZZOGPLpGFWTq5BNzchVG6wFRyTCCdrvUrSocOkIQewabiFf+q4GE+2h/Y0YYwDXaxDncGus7VZig8AAAAAABQGl1d5C8owDqkO9zKSp5uxeLU/ICgwUgFQTYs5c/K5IG3fbh12Whk9nL4UbO63msHLSF7V9bN5E6jPWFfv8AqVAKfHY1ATXWolpncvh8d3AIftzbt3Q3JbXJKrjhP1Ig2d9q42KPfoRWjq4U6AwP7JVEtOWaQDnBSgwTS0nh89367ppkedrVggQmR4f/RnL8DsuZf/SiG/N3EJyAjlPp6wW26bLF7O7utGMFE2zBHmjW7HE1IuY8tuBF4MJG9PW/BBEABQIANQwAEg4AAAATAgMEARQFBhUZGhpmBj0SAdrr6v/+AKPhEQAAAAABAAAAAAAAABIgAAcCFgMTBAcIARQFCQYKCxUZGxwaAAcMDR0XDg8eHR8bJUrZnU8xIwb+/f8Ao+ERAAAAAAEAAAAAAAAAFQQQGBAACgyAlpgAAAAAAAkBDantSS3vx5jxayUauDJpbJpHnhJwoBYSrEkU86djYQwABwACAwQHCAk=",
        "transaction_version": 0,
        "signers": [
            "5KW2twHzRsAaiLeEx4zYNV35CV2hRrZGw7NYbwMfL4a2",
            "BFefyp7jNF5Xq2A4JDLLFFGpxLq5oPEFKBAQ46KJHW2R"
        ]
    }
}

Unlist NFT

Unlist an already listed NFT. This operation will make the NFT unavailable for sale, and nobody would be able to buy this NFT until it is listed back again. (✨ pNFT support added)

POST /sol/v1/marketplace/unlist

Input Parameters:

  • network:string- either of [mainnet-beta, testnet, devnet]

  • marketplace_address: string - the address of the marketplace.

  • list_state: string - an on-chain address where all the transactions that happen on an NFT listing are stored. This is unique for each NFT listing created. Generated at the time of list creation.

  • seller_wallet : string - wallet address of the NFT seller who created the listing in the first place.

  • fee_payer (optional) : string - public key of the account from which unlinsting fee would be taken.

Response:

  • encoded_transaction: A base64 encoded transaction string to be signed with the seller_wallet.

var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
myHeaders.append("x-api-key", "YOUR_API_KEY");

var raw = JSON.stringify({
    "network":"devnet",
    "marketplace_address": "5LSMwR5GLr4WjDHS5FoUXQCN5osZYHRoDGjmcEsS843B",
    "list_state": "3vbYYDeup22vPgxEVuGeCaXCdHhCDMwChVTgtY9xHafJ",
    "seller_wallet": "2fmz8SuNVyxEP6QwKQs6LNaT2ATszySPEJdhUDesxktc",
    "fee_payer": "BFefyp7jNF5Xq2A4JDLLFFGpxLq5oPEFKBAQ46KJHW2R"
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://api.shyft.to/sol/v1/marketplace/unlist", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
{
    "success": true,
    "message": "NFT unlist transaction created successfully",
    "result": {
        "encoded_transaction": "AgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAKE5hVmLXkbyWMNhyHxoFAGxgq89NMznNX8fwEjaO6EZr2GMqfUcVHHu2+lyU5gx9wU2rGxk2NoSXtodMSdev+DxUrcjcqaFIhuzMAq7/smPr1f/7vIlvfeAqDmVgW9bNcgYwG0k4zijLNBgPaGbr6VYdk55F4/7sY44AWhkQo3NKdoD4+qI8zwyJy8PxicPwwJY1ZYWlhYcx5exmkeSyIXImyoSOovOgC0QS92kIOKxJ+jKS+A+vD8ccNlt2q3e0BVtgIJPJv+iRwN5BhJkED2D+PZv7YrhuqfySscVJ4M4mk4nqxpQW4EVV9M0sUUc0R8jfkEJItIYRIn/jSLxJFbwfjs2GNhpZBcydN1bJeqcApwhd4pP9FlmWrVK1RF7etgQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQGl1d5C8owDqkO9zKSp5uxeLU/ICgwUgFQTYs5c/K5JQCnx2NQE11qJaZ3L4fHdwCH7c27d0NyW1ySq44T9SIAiv+JTD+mfAFjow8jSjPTRn8DqhZBcxXrS4FCe9m6bt2d9q42KPfoRWjq4U6AwP7JVEtOWaQDnBSgwTS0nh890KZZOGPLpGFWTq5BNzchVG6wFRyTCCdrvUrSocOkIQe/QkXpd1kxJfsVlBtsCpJgr0Q4vNEDVSkqQLBd+H9dUgC3BlsePRfEU4nVJ/awTDzVi4bHMaoP21SbbRvAP4KUYGp9UXGHvRZjXa1ARV/cLAwSTGjyFWdaXbustfCAAAAAbd9uHXZaGT2cvhRs7reawctIXtX1s3kTqM9YV+/wCpOu3Od0P+XqKxuoownKBRtXNne7XN6j0JGy0E9Jd7XRsCDhMBBwsACgYCEhAFDwgNAwsMEBEJGOjb3ynb7Ny+AKPhEQAAAAABAAAAAAAAAA4DBAkRCKs7in72vVsL"
    }
}

Bid NFT

You can place a public bid on an unlisted NFT without specifying the seller and tokenAccount properties. Public bids are associated with the token itself and are not tied to a particular auction. This implies that a bid can remain active even after an auction ends and will be considered if it meets the criteria for future auctions involving that token.

POST /sol/v1/marketplace/bid

Input Parameters

Required Param:

  • network:string- either of [mainnet-beta, testnet, devnet]

  • nft_address: string - on-chain address of the NFT which has to be listed for sale.

  • marketplace_address: string - the address of the marketplace.

  • price: number - sale price of the NFT.

  • buyer_wallet: string - the address of the wallet seeking to purchase the NFT.

Optional Params:

  • on_the_house: boolean - if this option enabled transaction gas fee would be taken from auctionhouse authority.

  • service_charge: object - Transaction fee to be paid by the seller for listing an NFT on the marketplace. This fee can be charged in SOL or any SPL-20 token. Below is the structure of the service_charge key.

    • receiver: string - An address that will receive the service charge amount.

    • amount: number - The amount of currency to be charged.

    • token: string - The address of the SPL token, the service charge currency.

Charging Service charge in SOL:

{
    "receiver": "499qpPLdqgvVeGvvNjsWi27QHpC8GPkPfuL5Cn2DtZJe",
    "amount": 0.01
}

Charging Service charge in USDC:

{
    "receiver": "499qpPLdqgvVeGvvNjsWi27QHpC8GPkPfuL5Cn2DtZJe", 
    "token": "4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU", 
    "amount": 0.01
}

Response:

  • bid_state : An on-chain address where all the transactions that happen on an NFT bidding are stored. This is unique for each NFT bid created.

  • encoded_tranaction: A base64 encoded transaction string to be signed with the buyer_wallet.

var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
myHeaders.append("x-api-key", "YOUR_API_KEY");

var raw = JSON.stringify({
    "network": "devnet",
    "marketplace_address": "5LSMwR5GLr4WjDHS5FoUXQCN5osZYHRoDGjmcEsS843B",
    "nft_address": "FPEkgMzrhV7ZspZBGP4fd8VCkY6Ga4SmkjSVkgZFVBYL",
    "price": 0.4,
    "buyer_wallet": "3yTKSCKoDcjBFpbgxyJUh4cM1NG77gFXBimkVBx2hKrf"
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://api.shyft.to/sol/v1/marketplace/bid", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
{
    "success": true,
    "message": "Bidding transaction created successfully",
    "result": {
        "network": "devnet",
        "marketplace_address": "5LSMwR5GLr4WjDHS5FoUXQCN5osZYHRoDGjmcEsS843B",
        "buyer_address": "3yTKSCKoDcjBFpbgxyJUh4cM1NG77gFXBimkVBx2hKrf",
        "price": 0.4,
        "nft_address": "FPEkgMzrhV7ZspZBGP4fd8VCkY6Ga4SmkjSVkgZFVBYL",
        "bid_state": "GG3Wdgex5iMvP1VJ36fomK2abZR5JPG46QWsPKRJq8Pd",
        "currency_symbol": "SOL",
        "encoded_transaction": "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAsRLC2oJheXOGuryYTK++GE1M58Z4jLPfs+EGJTCdcdm/jIG6CKPc8pSTmcDJmWcAS0O+bDIErVkqR5FjcbakJWwNgIJPJv+iRwN5BhJkED2D+PZv7YrhuqfySscVJ4M4mk4rna6S1fGMlZIGSyD/JuXjSetTaUGg99zf7QZ0frfSzvhRN8RQmUa3wATPgG3e1lVWYG9ENPdZ8bzEPUEctZrAcLuNTXJWDbk2swwM/ERuteFAwW1qx+vppDFd6lwYQwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAaXV3kLyjAOqQ73MpKnm7F4tT8gKDBSAVBNizlz8rkoyXJY9OJInxuz0QKRSODYMLWhOZ2v8QhASOe9jb6fhZApCBGhX3OJ9lXty/FC7EhVUmORV51SFbG8d76Bm7Bk2YVZi15G8ljDYch8aBQBsYKvPTTM5zV/H8BI2juhGa9tW18gdwkY7EaW5fz7M2KN6yTn/RokR65VlqFNJnKE8BCmWThjy6RhVk6uQTc3IVRusBUckwgna71K0qHDpCEHsGm4hX/quBhPtof2NGGMA12sQ53BrrO1WYoPAAAAAAAQan1RcYe9FmNdrUBFX9wsDBJMaPIVZ1pdu6y18IAAAABqfVFxksXFEhjMlMPUrxf1ja7gibof1E49vZigAAAAAG3fbh12Whk9nL4UbO63msHLSF7V9bN5E6jPWFfv8AqZE9+5OSuWTCkXyAlCdmgslA3fQD6Y2WxQ4ChaN6tvr2AwgHAAUACwYQDwAMDgAAAA0FCQQKBwIDEAYPGqlU2iMqzhCr//8AhNcXAAAAAAEAAAAAAAAADAUBAAYPDgle+Vrm70BE2v8="
    }
}

Accept Bid

The NFT's current owner has the option to accept the bid, resulting in the bid's price being transferred to the NFT owner, while the bidder receives the NFT.

POST /sol/v1/marketplace/accept_bid

Input Parameters

Required Param:

  • network:string- either of [mainnet-beta, testnet, devnet]

  • marketplace_address: string - the address of the marketplace.

  • bid_state: string - a unique on-chain address records all transactions related to an NFT bidding, created at the time of bid initiation.

  • seller_wallet: string - the address of the NFT owner.

Response:

  • purchase_receipt: on-chain purchase receipt of the NFT listing.

  • buyer_address : address of the NFT buyer.

  • encoded_tranaction: A base64 encoded transaction string to be signed with the seller_wallet.

  • transaction_version: returns either 'lagacy' or 0. To overcome legacy transaction size (1232 bytes), in some special condition returns 'v0' transaction.

var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
myHeaders.append("x-api-key", "YOUR_API_KEY");

var raw = JSON.stringify({
    "network": "devnet",
    "marketplace_address": "5LSMwR5GLr4WjDHS5FoUXQCN5osZYHRoDGjmcEsS843B",
    "bid_state": "CjuEr7tYExFVsa9eSnd5p86DFG2GqKdgDXKy14ag1VEQ",
    "seller_wallet": "2fmz8SuNVyxEP6QwKQs6LNaT2ATszySPEJdhUDesxktc"
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://api.shyft.to/sol/v1/marketplace/accept_bid", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
{
    "success": true,
    "message": "Accept bid transaction created successfully",
    "result": {
        "network": "devnet",
        "marketplace_address": "5LSMwR5GLr4WjDHS5FoUXQCN5osZYHRoDGjmcEsS843B",
        "seller_address": "2fmz8SuNVyxEP6QwKQs6LNaT2ATszySPEJdhUDesxktc",
        "price": 0.4,
        "nft_address": "8pNjm9UmY6RhGQaLuCdtDt6uXhqXg5rFQX9t2oWq3PL1",
        "purchase_receipt": "A15dfTMrggqnN6gRaxxkPvN1NCimHRBLBmBhCBgXm3bo",
        "currecy_symbol": "P2",
        "buyer_address": "3yTKSCKoDcjBFpbgxyJUh4cM1NG77gFXBimkVBx2hKrf",
        "encoded_transaction": "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAwaGMqfUcVHHu2+lyU5gx9wU2rGxk2NoSXtodMSdev+DxUsLagmF5c4a6vJhMr74YTUznxniMs9+z4QYlMJ1x2b+EW47KKP/tj5O8nsnqCbP/ibkqfarh+6COV0GpEwjbwRQCwHlX8JKKwKpawHjfHTp/CXruh+Lt6Hx8xs+BZ7UD9yESF+ueko+RTzuz0v2rAR7PPjJQfk7gdWVw78Iq3+83kcqaEMaakznxM+2nyvrdnl1Ni05VdlGdvQAEdGJ6Gqhb5rfhnB/liRDKADvOjdZTSjyi4PKO2RNlK7EdD9gkqubgRGkWgGYqEM7d8BLqZ6zSzk18gSlU18BCBOsjaAyatsLUfR0Z0MkDUv5CbeHhtPRRybMUei7U59xqecVqkNuCAyT10noSAQfrJtqnRvN/yu78TQ78YoXKB/OmGzglDYCCTyb/okcDeQYSZBA9g/j2b+2K4bqn8krHFSeDOJpOkSa8GvVlUK+VQU+ZPB0X77gFyQ2FYuO2AD7oiYamEv4tXUT43bBldKzJ3X17VA65S0WPElborQLwJC+2bRq9bvhRN8RQmUa3wATPgG3e1lVWYG9ENPdZ8bzEPUEctZrAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQGl1d5C8owDqkO9zKSp5uxeLU/ICgwUgFQTYs5c/K5J0JK9WSiHFj1SN2JFvoZ7VgfmoUng3v6uOaKR3LS7c1oyXJY9OJInxuz0QKRSODYMLWhOZ2v8QhASOe9jb6fhZmFWYteRvJYw2HIfGgUAbGCrz00zOc1fx/ASNo7oRmvYKZZOGPLpGFWTq5BNzchVG6wFRyTCCdrvUrSocOkIQe/mWqpZBlR3FKG2qN5Su+c5Og+poyc4Lm3l/pi3rRaZG9CRel3WTEl+xWUG2wKkmCvRDi80QNVKSpAsF34f11SAGm4hX/quBhPtof2NGGMA12sQ53BrrO1WYoPAAAAAAAQan1RcYe9FmNdrUBFX9wsDBJMaPIVZ1pdu6y18IAAAABqfVFxksXFEhjMlMPUrxf1ja7gibof1E49vZigAAAAAG3fbh12Whk9nL4UbO63msHLSF7V9bN5E6jPWFfv8AqYAP5G2njOH8ke9ypWLJdztoH/VmC0QmrAfLX/KGgsnjBBMMAAQUEg8KBQgZDhUYGzPmhaQBf4Ot////AITXFwAAAAABAAAAAAAAABMFCQAOGBcJz2ssoEvewxv6ExYBAAQQFBYNAAISDwoMBwUIGQ4RFRgDGyVK2Z1PMSMG////AITXFwAAAAABAAAAAAAAABMHBgkLAA4YFwnjmvsHtDhkj/4=",
        "transaction_version": "legacy"
    }
}

Cancel Bid

Cancels a specific bid for an NFT.

POST /sol/v1/marketplace/cancel_bid

Input Parameters

Required Param:

  • network:string- either of [mainnet-beta, testnet, devnet]

  • marketplace_address: string - the address of the marketplace.

  • bid_state: string - a unique on-chain address records all transactions related to an NFT bidding, created at the time of bid initiation.

  • buyer_wallet: string - the address of the bidder.

Optional Params:

  • on_the_house: boolean - if this option enabled transaction gas fee would be taken from auctionhouse authority.

Response:

  • encoded_transaction: A base64 encoded transaction string to be signed with the buyer_wallet.

var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
myHeaders.append("x-api-key", "YOUR_API_KEY");

var raw = JSON.stringify({
    "network": "devnet",
    "marketplace_address": "5LSMwR5GLr4WjDHS5FoUXQCN5osZYHRoDGjmcEsS843B",
    "bid_state": "2pTTd61MW5hcNiiDvLar2ffEMkg7k8x4gnbSe35LQngC",
    "buyer_wallet": "2fmz8SuNVyxEP6QwKQs6LNaT2ATszySPEJdhUDesxktc",
    "on_the_house": false
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://api.shyft.to/sol/v1/marketplace/cancel_bid", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
{
    "success": true,
    "message": "NFT bid cancelled transaction created successfully",
    "result": {
        "encoded_transaction": "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAcMGMqfUcVHHu2+lyU5gx9wU2rGxk2NoSXtodMSdev+DxUbA+b5ZhXFnFZQRA9T2+56RUMLPhITwUrq/Lc5Ofgafaf97KbPstiKTEHYcXDVePk5ky3FynVEr9Nz08I+you1ypAOIGVIFku2rqtBWxaHGlnkEnQqtX7SrUpw0QUn2ZHYCCTyb/okcDeQYSZBA9g/j2b+2K4bqn8krHFSeDOJpAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQGl1d5C8owDqkO9zKSp5uxeLU/ICgwUgFQTYs5c/K5JYEF3bMc4Eh2PW+gZqDzDnpsvjwFyZ23u4G4rvPBu9rphVmLXkbyWMNhyHxoFAGxgq89NMznNX8fwEjaO6EZr2CmWThjy6RhVk6uQTc3IVRusBUckwgna71K0qHDpCEHsGp9UXGHvRZjXa1ARV/cLAwSTGjyFWdaXbustfCAAAAAbd9uHXZaGT2cvhRs7reawctIXtX1s3kTqM9YV+/wCptX1YGUJ94BAo5h3PiqmUBJyT7y4yutJgog4b8RF1DdoCCQgAAgcIBgQBCxjo298p2+zcvoCWmAAAAAAAAQAAAAAAAAAJAwMFCgj2bBvl3CqwKw=="
    }
}

Active Listings

Get details of all the active listings in a marketplace.

GET /sol/v1/marketplace/active_listings

Query parameters:

  • network:string- either of [mainnet-beta, testnet, devnet]

  • marketplace_address:string - the address of the marketplace.

var myHeaders = new Headers();
myHeaders.append("x-api-key", "20CcwuFeQOIcfuHx");

var raw = "";

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://api.shyft.to/sol/v1/marketplace/active_listings?network=devnet&marketplace_address=5LSMwR5GLr4WjDHS5FoUXQCN5osZYHRoDGjmcEsS843B", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
{
    "success": true,
    "message": "Active listing fetched successfully",
    "result": [
        {
            "network": "devnet",
            "marketplace_address": "5LSMwR5GLr4WjDHS5FoUXQCN5osZYHRoDGjmcEsS843B",
            "seller_address": "2fmz8SuNVyxEP6QwKQs6LNaT2ATszySPEJdhUDesxktc",
            "price": 2,
            "currency_symbol": "SOL",
            "nft_address": "CxKYibvYT9H8qBw827LvGuz6BWvXSsSJSeCsbm5t27hN",
            "nft": {
                "name": "GetBoxie",
                "symbol": "GB",
                "royalty": 5,
                "image_uri": "https://nftstorage.link/ipfs/bafkreiff7tzd2n3dskowfvp3bcua4zc33ohumqwn7v764nuyhd3rw5qgom",
                "cached_image_uri": "https://cdn.shyft.to/img/https%253A%252F%252Fnftstorage.link%252Fipfs%252Fbafkreiff7tzd2n3dskowfvp3bcua4zc33ohumqwn7v764nuyhd3rw5qgom.gif",
                "metadata_uri": "https://nftstorage.link/ipfs/bafkreibmbhmhvpknzc3lsbzmmgo26crn3pi4sjhj4ue3jpichnul5i74cq",
                "description": "Shyft makes web3 development so easy.",
                "mint": "CxKYibvYT9H8qBw827LvGuz6BWvXSsSJSeCsbm5t27hN",
                "owner": "2fmz8SuNVyxEP6QwKQs6LNaT2ATszySPEJdhUDesxktc",
                "creators": [
                    {
                        "address": "2fmz8SuNVyxEP6QwKQs6LNaT2ATszySPEJdhUDesxktc",
                        "share": 100,
                        "verified": 1
                    }
                ],
                "attributes": {
                    "edification": "100"
                },
                "attributes_array": [
                    {
                        "trait_type": "edification",
                        "value": "100"
                    }
                ],
                "files": [],
                "update_authority": "2fmz8SuNVyxEP6QwKQs6LNaT2ATszySPEJdhUDesxktc"
            },
            "list_state": "69pkD5zvA5fWudm6TsY5bzRyKYuLipvuUSUpsUJyi12Z",
            "created_at": "2022-09-07T06:29:00.000Z",
            "status": "active",
            "receipt": "G7v45jKhMupjzf2zzLpeVWcUmGWg1o4sPuKe3rG9TGyd"
        },
        {
            "network": "devnet",
            "marketplace_address": "5LSMwR5GLr4WjDHS5FoUXQCN5osZYHRoDGjmcEsS843B",
            "seller_address": "5xSbS5PCkxPeZeJLHRBw57hMbCBNzSRoRaVfpQt5rxAg",
            "price": 5,
            "currency_symbol": "SOL",
            "nft_address": "48rLtqWcGros2eJ1anmYydTecxvkyErfaeD3dmNx1dUM",
            "nft": {
                "name": "Ok ks",
                "symbol": "OKS",
                "royalty": 5,
                "image_uri": "https://nftstorage.link/ipfs/bafkreifa3z7jcudv3fq2o6km6synd3arskviaq5ikhhy73c5p6ie4br6em",
                "cached_image_uri": "https://cdn.shyft.to/img/https%253A%252F%252Fnftstorage.link%252Fipfs%252Fbafkreifa3z7jcudv3fq2o6km6synd3arskviaq5ikhhy73c5p6ie4br6em.webp",
                "metadata_uri": "https://nftstorage.link/ipfs/bafkreicbpbda2yhkemga2tfoncujkfgkcqpmlpsya22bngpfbf2tyd7hkm",
                "description": "Shyft makes web3 development so easy.",
                "mint": "48rLtqWcGros2eJ1anmYydTecxvkyErfaeD3dmNx1dUM",
                "owner": "5xSbS5PCkxPeZeJLHRBw57hMbCBNzSRoRaVfpQt5rxAg",
                "creators": [
                    {
                        "address": "2fmz8SuNVyxEP6QwKQs6LNaT2ATszySPEJdhUDesxktc",
                        "share": 100,
                        "verified": 1
                    }
                ],
                "attributes": {
                    "edification": "100"
                },
                "attributes_array": [
                    {
                        "trait_type": "edification",
                        "value": "100"
                    }
                ],
                "files": [],
                "update_authority": "2fmz8SuNVyxEP6QwKQs6LNaT2ATszySPEJdhUDesxktc"
            },
            "list_state": "9Li7urEuzXnsvWqUBid9EztGebo3KGV4T1RHJFKpn1hz",
            "created_at": "2022-09-07T07:02:28.000Z",
            "status": "active",
            "receipt": "Ee581TwSUPtCQzLQDf5cdthZqsi8uEeN1xXDGRUdjkoh"
        },
        {
            "network": "devnet",
            "marketplace_address": "5LSMwR5GLr4WjDHS5FoUXQCN5osZYHRoDGjmcEsS843B",
            "seller_address": "2fmz8SuNVyxEP6QwKQs6LNaT2ATszySPEJdhUDesxktc",
            "price": 0.1,
            "currency_symbol": "SOL",
            "nft_address": "2e4J9pn6vMz4EhHLGnuMX5wJMeXyJQDhM779YXwzvsJU",
            "nft": {
                "name": "monkey",
                "symbol": "MON",
                "royalty": 1,
                "image_uri": "https://ipfs.io/ipfs/bafkreiay6d5zvn3qvnafbcbi5zsrvvtfbtodb32z4hxsz7inz6rxksyani",
                "cached_image_uri": "https://cdn.shyft.to/img/https%253A%252F%252Fipfs.io%252Fipfs%252Fbafkreiay6d5zvn3qvnafbcbi5zsrvvtfbtodb32z4hxsz7inz6rxksyani.png",
                "metadata_uri": "https://ipfs.io/ipfs/bafkreidiqfm75x53uo6x2ycki7tt6v35cz3vev7dyogp235ehqemqo2uxa",
                "description": "monkey",
                "mint": "2e4J9pn6vMz4EhHLGnuMX5wJMeXyJQDhM779YXwzvsJU",
                "owner": "5xSbS5PCkxPeZeJLHRBw57hMbCBNzSRoRaVfpQt5rxAg",
                "creators": [
                    {
                        "address": "2fmz8SuNVyxEP6QwKQs6LNaT2ATszySPEJdhUDesxktc",
                        "share": 100,
                        "verified": 1
                    }
                ],
                "attributes": {
                    "edification": "100"
                },
                "attributes_array": [
                    {
                        "trait_type": "edification",
                        "value": "100"
                    }
                ],
                "files": [],
                "update_authority": "2fmz8SuNVyxEP6QwKQs6LNaT2ATszySPEJdhUDesxktc"
            },
            "list_state": "4DEmhR8fJuKHXtXWjem9NQDA7nyiiK4LU28R1N2rUfCa",
            "created_at": "2022-09-08T12:10:50.000Z",
            "status": "active",
            "receipt": "3U1BvzgqNJ2gQ5j8G7tD7Q9wFFDRn3T6MWobr7mr2uns"
        },
        {
            "network": "devnet",
            "marketplace_address": "5LSMwR5GLr4WjDHS5FoUXQCN5osZYHRoDGjmcEsS843B",
            "seller_address": "5xSbS5PCkxPeZeJLHRBw57hMbCBNzSRoRaVfpQt5rxAg",
            "price": 0.5,
            "currency_symbol": "SOL",
            "nft_address": "3vv1QNVH5buEjxqYFZ6N5HPweW57T4kpP6VnrkHBtuT2",
            "nft": {
                "name": "some updated description",
                "symbol": "SH",
                "royalty": 50,
                "image_uri": "https://nftstorage.link/ipfs/bafkreiggebsgtf5llija7yr6sbafgk6vbg6v3qbonm2vmcqdtnwrqpoixi",
                "cached_image_uri": "https://cdn.shyft.to/img/https%253A%252F%252Fnftstorage.link%252Fipfs%252Fbafkreiggebsgtf5llija7yr6sbafgk6vbg6v3qbonm2vmcqdtnwrqpoixi.jpeg",
                "metadata_uri": "https://nftstorage.link/ipfs/bafkreicb53w3npl4o6i7hhcbphxlf3qfiysjg2g33vay66wc5mg7gbzmk4",
                "description": "some updated description",
                "mint": "3vv1QNVH5buEjxqYFZ6N5HPweW57T4kpP6VnrkHBtuT2",
                "owner": "5xSbS5PCkxPeZeJLHRBw57hMbCBNzSRoRaVfpQt5rxAg",
                "creators": [
                    {
                        "address": "BvzKvn6nUUAYtKu2pH3h5SbUkUNcRPQawg4bURBiojJx",
                        "share": 100,
                        "verified": 1
                    }
                ],
                "attributes": {
                    "attack": 100
                },
                "attributes_array": [
                    {
                        "trait_type": "attack",
                        "value": 100
                    }
                ],
                "files": [],
                "update_authority": "BvzKvn6nUUAYtKu2pH3h5SbUkUNcRPQawg4bURBiojJx"
            },
            "list_state": "F4GWzFXDDMfR81ws2nodaVhPCimHJc6SUw1XAK95P471",
            "created_at": "2022-09-09T08:29:41.000Z",
            "status": "active",
            "receipt": "GFpG1Tri66T7KxLaXaBFY8V8anXyg4LdKJ72nfdtsu3J"
        }
    ]
}

Active Listings V2

Get details of all the active listings in a marketplace. This endpoint allows you to filter the active listings based on a variety of filters. Also, you can sort the result based on price or list_date

GET /sol/v2/marketplace/active_listings

Query parameters:

  • network:string- either of [mainnet-beta, testnet, devnet]

  • marketplace_address:string - the address of the marketplace.

  • collection_address:string (optional) - filter listings based on the collection to which the NFTs belong.

  • seller_address:string (optional) - filter based on the address of a seller.

  • nft_address:string (optional) - filter based on the address of an NFT.

  • sort_by:string (optional) - sort is available on the listed price or listing creation time. The value should be price or list_date.

  • sort_order:string (optional) - order either in asc(ascending) or desc(descending). Default value is asc.

  • page:number (optional) - which page data want to fetch? Default is 1.

  • size:number (optional) - number of listings on a single page. Default is 10, maximum 50.

var myHeaders = new Headers();
myHeaders.append("x-api-key", "20CcwuFeQOIcfuHx");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://api.shyft.to/sol/v2/marketplace/active_listings?network=mainnet-beta&marketplace_address=AxrRwpzk4T6BsWhttPwVCmfeEMbfbasv1QxVc5JhUfvB&collection_address=4bm9S9hojj6iF2kTuVDaoBGLFXmNFwh7WKXBhyU4S3Do&sort_by=list_date&sort_order=desc&page=1&size=2", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
{
    "success": true,
    "message": "Active listing fetched successfully",
    "result": {
        "data": [
            {
                "network": "mainnet-beta",
                "marketplace_address": "AxrRwpzk4T6BsWhttPwVCmfeEMbfbasv1QxVc5JhUfvB",
                "seller_address": "34Ssnm2mpviMRurwy2rXbQB8gYDKpzULd8iLS3tbS21v",
                "price": 15,
                "currency_symbol": "ROUNDIE",
                "nft_address": "2Yma5SYbUjvnjxSMMcn6rYF16yTeGtLNgXPtpDo1AHzy",
                "nft": {
                    "name": "Bronze Key #256",
                    "symbol": "RNDIEVKEY",
                    "royalty": 9.99,
                    "image_uri": "https://arweave.net/M6vY7xEEK7hT2gXcaNkbrTfbh5ym6T-osZ98gCDlyrg?ext=png",
                    "cached_image_uri": "https://cdn.shyft.to/img/https%253A%252F%252Farweave.net%252FM6vY7xEEK7hT2gXcaNkbrTfbh5ym6T-osZ98gCDlyrg%253Fext%253Dpng",
                    "animation_url": "",
                    "cached_animation_url": "",
                    "metadata_uri": "https://arweave.net/0UwmJMJY4U1xDnYl9eYaouDDTJ0fYOa5jBvykNeauXk",
                    "description": "1111 Roundie Vault Staking Keys living on the Solana Blockchain. Holding a key will earn you $ROUNDIE staking rewards. You must hold a Roundie NFT in order to earn rewards.",
                    "mint": "2Yma5SYbUjvnjxSMMcn6rYF16yTeGtLNgXPtpDo1AHzy",
                    "owner": "34Ssnm2mpviMRurwy2rXbQB8gYDKpzULd8iLS3tbS21v",
                    "update_authority": "4AQHWYvT647XtdoW7KcVzjEwG3ZqmMDhBpZ316yJWrTp",
                    "creators": [
                        {
                            "address": "CtedZoEfevKiUZ9hg2YwZyMSfX3F7y4ZJjUhY5gzxE6Z",
                            "share": 0,
                            "verified": true
                        },
                        {
                            "address": "6QnsAtSvUKWh4BY476rhHiZT9ezXeN7LksyLJ1qhGhJr",
                            "share": 35,
                            "verified": false
                        },
                        {
                            "address": "zfPeauoEeXMimC5aa6FJti6dxTU8w7D2tewhRokw5AS",
                            "share": 35,
                            "verified": false
                        },
                        {
                            "address": "uDJbznWNjnkXTpMZNHqcpXJfQUhTz6BRCTdAKXndW9j",
                            "share": 30,
                            "verified": false
                        }
                    ],
                    "collection": {
                        "address": "4bm9S9hojj6iF2kTuVDaoBGLFXmNFwh7WKXBhyU4S3Do",
                        "verified": true,
                        "name": "Roundie Vault Keys",
                        "family": "The Roundies"
                    },
                    "attributes": {
                        "Material": "Bronze",
                        "Weekly Rewards": "1"
                    },
                    "attributes_array": [
                        {
                            "trait_type": "Material",
                            "value": "Bronze"
                        },
                        {
                            "trait_type": "Weekly Rewards",
                            "value": "1"
                        }
                    ],
                    "files": [
                        {
                            "uri": "https://arweave.net/M6vY7xEEK7hT2gXcaNkbrTfbh5ym6T-osZ98gCDlyrg?ext=png",
                            "type": "image/png"
                        }
                    ],
                    "external_url": "",
                    "is_loaded_metadata": true,
                    "primary_sale_happened": true,
                    "is_mutable": true
                },
                "list_state": "HsbdTt1uRDj7YQSyaSk5RwoeEehNbU9M3zvd8DHeohug",
                "status": "active",
                "created_at": "2023-02-27T08:58:58.000Z",
                "receipt": "HHRmQYj6PCV6QevDjbSqg7P5YjMJsAP1wZPH1WWiu8WH"
            },
            {
                "network": "mainnet-beta",
                "marketplace_address": "AxrRwpzk4T6BsWhttPwVCmfeEMbfbasv1QxVc5JhUfvB",
                "seller_address": "4AQHWYvT647XtdoW7KcVzjEwG3ZqmMDhBpZ316yJWrTp",
                "price": 20,
                "currency_symbol": "ROUNDIE",
                "nft_address": "AD7sUFJ7GkgSQsDV58DD27UUrcAVnT29wypPWaCYSWqG",
                "nft": {
                    "name": "Bronze Key #595",
                    "symbol": "RNDIEVKEY",
                    "royalty": 9.99,
                    "image_uri": "https://arweave.net/jS83CYo2Sj31js59xW2lEt3DP449r4CEU1lhte4W0iY?ext=png",
                    "cached_image_uri": "https://cdn.shyft.to/img/https%253A%252F%252Farweave.net%252FjS83CYo2Sj31js59xW2lEt3DP449r4CEU1lhte4W0iY%253Fext%253Dpng",
                    "animation_url": "",
                    "cached_animation_url": "",
                    "metadata_uri": "https://arweave.net/kqsnTyFUStCfD41de5XPXwROWhJMpUrKWnSBcEMxJOE",
                    "description": "1111 Roundie Vault Staking Keys living on the Solana Blockchain. Holding a key will earn you $ROUNDIE staking rewards. You must hold a Roundie NFT in order to earn rewards.",
                    "mint": "AD7sUFJ7GkgSQsDV58DD27UUrcAVnT29wypPWaCYSWqG",
                    "owner": "4AQHWYvT647XtdoW7KcVzjEwG3ZqmMDhBpZ316yJWrTp",
                    "update_authority": "4AQHWYvT647XtdoW7KcVzjEwG3ZqmMDhBpZ316yJWrTp",
                    "creators": [
                        {
                            "address": "CtedZoEfevKiUZ9hg2YwZyMSfX3F7y4ZJjUhY5gzxE6Z",
                            "share": 0,
                            "verified": true
                        },
                        {
                            "address": "6QnsAtSvUKWh4BY476rhHiZT9ezXeN7LksyLJ1qhGhJr",
                            "share": 35,
                            "verified": false
                        },
                        {
                            "address": "zfPeauoEeXMimC5aa6FJti6dxTU8w7D2tewhRokw5AS",
                            "share": 35,
                            "verified": false
                        },
                        {
                            "address": "uDJbznWNjnkXTpMZNHqcpXJfQUhTz6BRCTdAKXndW9j",
                            "share": 30,
                            "verified": false
                        }
                    ],
                    "collection": {
                        "address": "4bm9S9hojj6iF2kTuVDaoBGLFXmNFwh7WKXBhyU4S3Do",
                        "verified": true,
                        "name": "Roundie Vault Keys",
                        "family": "The Roundies"
                    },
                    "attributes": {
                        "Material": "Bronze",
                        "Weekly Rewards": "1"
                    },
                    "attributes_array": [
                        {
                            "trait_type": "Material",
                            "value": "Bronze"
                        },
                        {
                            "trait_type": "Weekly Rewards",
                            "value": "1"
                        }
                    ],
                    "files": [
                        {
                            "uri": "https://arweave.net/jS83CYo2Sj31js59xW2lEt3DP449r4CEU1lhte4W0iY?ext=png",
                            "type": "image/png"
                        }
                    ],
                    "external_url": "",
                    "is_loaded_metadata": true,
                    "primary_sale_happened": true,
                    "is_mutable": true
                },
                "list_state": "EuT9RjbPSTAWEdxP6kSmrearogoPhaiDoKioaJXSnEeA",
                "status": "active",
                "created_at": "2023-02-10T18:55:35.000Z",
                "receipt": "GRDXt3t9E2GiC2qssBquq7f1wn9qH5VznNKYRdwD7xSc"
            }
        ],
        "page": 1,
        "size": 2,
        "total_data": 3,
        "total_page": 2
    }
}

Listing Details

Get details of a particular listing in a marketplace.

GET sol/v1/marketplace/list_details

Query parameters:

  • network: string- either of [mainnet-beta, testnet, devnet]

  • marketplace_address: string - the address of the marketplace.

  • list_state: string - list state address of the listing.

var myHeaders = new Headers();
myHeaders.append("x-api-key", "20CcwuFeQOIcfuHx");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://api.shyft.to/sol/v1/marketplace/list_details?network=devnet&marketplace_address=5LSMwR5GLr4WjDHS5FoUXQCN5osZYHRoDGjmcEsS843B&list_state=69pkD5zvA5fWudm6TsY5bzRyKYuLipvuUSUpsUJyi12Z", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
{
    "success": true,
    "message": "Listing details fetched successfully",
    "result": {
        "network": "devnet",
        "marketplace_address": "5LSMwR5GLr4WjDHS5FoUXQCN5osZYHRoDGjmcEsS843B",
        "seller_address": "2fmz8SuNVyxEP6QwKQs6LNaT2ATszySPEJdhUDesxktc",
        "price": 2,
        "nft_address": "CxKYibvYT9H8qBw827LvGuz6BWvXSsSJSeCsbm5t27hN",
        "nft": {
            "name": "GetBoxie",
            "symbol": "GB",
            "royalty": 5,
            "image_uri": "https://nftstorage.link/ipfs/bafkreiff7tzd2n3dskowfvp3bcua4zc33ohumqwn7v764nuyhd3rw5qgom",
            "cached_image_uri": "https://cdn.shyft.to/img/https%253A%252F%252Fnftstorage.link%252Fipfs%252Fbafkreiff7tzd2n3dskowfvp3bcua4zc33ohumqwn7v764nuyhd3rw5qgom.gif",
            "metadata_uri": "https://nftstorage.link/ipfs/bafkreibmbhmhvpknzc3lsbzmmgo26crn3pi4sjhj4ue3jpichnul5i74cq",
            "description": "Shyft makes web3 development so easy.",
            "mint": "CxKYibvYT9H8qBw827LvGuz6BWvXSsSJSeCsbm5t27hN",
            "owner": "2fmz8SuNVyxEP6QwKQs6LNaT2ATszySPEJdhUDesxktc",
            "creators": [
                {
                    "address": "2fmz8SuNVyxEP6QwKQs6LNaT2ATszySPEJdhUDesxktc",
                    "share": 100,
                    "verified": 1
                }
            ],
            "attributes": {
                "edification": "100"
            },
            "attributes_array": [
                {
                    "trait_type": "edification",
                    "value": "100"
                }
            ],
            "files": [],
            "update_authority": "2fmz8SuNVyxEP6QwKQs6LNaT2ATszySPEJdhUDesxktc"
        },
        "list_state": "69pkD5zvA5fWudm6TsY5bzRyKYuLipvuUSUpsUJyi12Z",
        "currency_symbol": "SOL",
        "created_at": "2022-09-07T06:29:00.000Z",
        "receipt": "G7v45jKhMupjzf2zzLpeVWcUmGWg1o4sPuKe3rG9TGyd"
    }
}

Seller Listings

Get all the listings created by a particular seller (wallet address) in a marketplace.

GET /sol/v1/marketplace/seller_listings

Query parameters:

  • network: string- either of [mainnet-beta, testnet, devnet]

  • marketplace_address: string - the address of the marketplace.

  • seller_address: string - address of the seller whose listings need to be fetched.

Note: If some NFT listings were canceled/purchased and then got burnt, on response NFT returned as a blank object.

var myHeaders = new Headers();
myHeaders.append("x-api-key", "20CcwuFeQOIcfuHx");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://api.shyft.to/sol/v1/marketplace/seller_listings?network=devnet&marketplace_address=8svcgCzGTT12h3uvDNR3BUY27hJvKtYdxcMKjEQzh14q&seller_address=AaYFExyZuMHbJHzjimKyQBAH1yfA9sKTxSzBc6Nr5X4s", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
{
    "success": true,
    "message": "Seller listings fetched successfully",
    "result": [
        {
            "network": "devnet",
            "marketplace_address": "3y4rUzcCRZH4TstRJGYmUUKuod8hd4Rvu2Fnf2FhQoY4",
            "seller_address": "5hbm5nSmtNFdwyhWyG9XsC5rWXAREfPMG3Wj8Wxm6MD4",
            "price": 50,
            "nft_address": "D12CdcZmpgBK2WpwnLTW8e6rem7tqFaWxZA7R7Fv8vng",
            "nft": {
                "name": "Shyft",
                "symbol": "SH",
                "royalty": 5,
                "image_uri": "https://nftstorage.link/ipfs/bafybeifa73zza4pff25fyhrjqgkatovwy25ppcqj76rkl7gp2ej74qpupe",
                "cached_image_uri": "https://cdn.shyft.to/img/https%253A%252F%252Fnftstorage.link%252Fipfs%252Fbafybeifa73zza4pff25fyhrjqgkatovwy25ppcqj76rkl7gp2ej74qpupe",
                "metadata_uri": "https://nftstorage.link/ipfs/bafkreidd7yzhlhokfpdjcujomkc4ntoxcoerdpqz34s3bs763odwux6tpi",
                "description": "Shyft makes web3 dev sooo easy.",
                "mint": "D12CdcZmpgBK2WpwnLTW8e6rem7tqFaWxZA7R7Fv8vng",
                "owner": "5hbm5nSmtNFdwyhWyG9XsC5rWXAREfPMG3Wj8Wxm6MD4",
                "creators": [
                    {
                        "address": "5hbm5nSmtNFdwyhWyG9XsC5rWXAREfPMG3Wj8Wxm6MD4",
                        "share": 100,
                        "verified": 1
                    }
                ],
                "attributes": {
                    "awesomeness": "100"
                },
                "attributes_array": [
                    {
                        "trait_type": "awesomeness",
                        "value": "100"
                    }
                ],
                "files": [],
                "update_authority": "5hbm5nSmtNFdwyhWyG9XsC5rWXAREfPMG3Wj8Wxm6MD4"
            },
            "currency_symbol": "SOL",
            "created_at": "2022-09-03T14:59:45.000Z",
            "list_state": "Ctm78EkAZrTeg16kvczpSP63FWSHBCDWBZ37XcwJDk6Z",
            "receipt": "FU33nEVUS5fJ2AUvaWh19qkURDue4ETFcSigafDLXFHs",
            "cancelled_at": null
        },
        {
            "network": "devnet",
            "marketplace_address": "3y4rUzcCRZH4TstRJGYmUUKuod8hd4Rvu2Fnf2FhQoY4",
            "seller_address": "5xSbS5PCkxPeZeJLHRBw57hMbCBNzSRoRaVfpQt5rxAg",
            "price": 0.01,
            "nft_address": "4VEj63tATjBSfd22Mxbe6n7ainckFU9ewRVTvfrthGDU",
            "nft": {},
            "currency_symbol": "SOL",
            "created_at": "2022-11-09T09:14:51.000Z",
            "list_state": "GvfUsSE7JQMuz7Vi6PcbNepeTgUpKfVuadM9vHjSp6nK",
            "receipt": "FAA6m8M4n7vyPahCZZvXJHWaKyPuLFRrG34jN7CXhqhL",
            "cancelled_at": "2022-09-03T09:16:58.767Z"
        }
    ]
}

Active Sellers

Fetches a list of all the sellers (wallet addresses) who presently have active listings in the marketplace.

GET /sol/v1/marketplace/active_sellers

Query parameters:

  • network: string- either of [mainnet-beta, testnet, devnet]

  • marketplace_address: string - the address of the marketplace.

var myHeaders = new Headers();
myHeaders.append("x-api-key", "20CcwuFeQOIcfuHx");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://api.shyft.to/sol/v1/marketplace/active_sellers?network=devnet&marketplace_address=7b2dSy4F26A6WweKgdmXzyi5FhhN5AqhuXAQHYcaXfqW", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
{
    "success": true,
    "message": "active listing fetched successfully",
    "result": [
        "97a3giHcGsk8YoEgWv4rP1ooWwJBgS72fpckZM6mQiFH",
        "EijtaNNHqqaPmWwAmUi8f1TC6gSPnqkoodQd2BLFpA8T",
        "GE4kh5FsCDWeJfqLsKx7zC9ijkqKpCuYQxh8FYBiTJe",
        "AaYFExyZuMHbJHzjimKyQBAH1yfA9sKTxSzBc6Nr5X4s"
    ]
}

Order History

Fetches all the listings purchased by a particular buyer (wallet address).

GET /sol/v1/marketplace/order_history

Query parameters:

  • network: string- either of [mainnet-beta, testnet, devnet]

  • marketplace_address: string - the address of the marketplace.

  • buyer_address : string - the address of the buyer whose order history is to be fetched.

var myHeaders = new Headers();
myHeaders.append("x-api-key", "20CcwuFeQOIcfuHx");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://api.shyft.to/sol/v1/marketplace/buy_history?network=devnet&marketplace_address=8svcgCzGTT12h3uvDNR3BUY27hJvKtYdxcMKjEQzh14q&buyer_address=GE4kh5FsCDWeJfqLsKx7zC9ijkqKpCuYQxh8FYBiTJe", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
{
    "success": true,
    "message": "order history fetched successfully",
    "result": [
        {
            "network": "devnet",
            "marketplace_address": "7b2dSy4F26A6WweKgdmXzyi5FhhN5AqhuXAQHYcaXfqW",
            "seller_address": "GE4kh5FsCDWeJfqLsKx7zC9ijkqKpCuYQxh8FYBiTJe",
            "price": 1,
            "nft_address": "DcxcgowdRg2bXFP4CcgFMaeppYY7GFquNhbZ5RwTVz3L",
            "buyer_address": "AaYFExyZuMHbJHzjimKyQBAH1yfA9sKTxSzBc6Nr5X4s",
            "created_at": "2022-08-17T04:36:16.094Z"
        }
    ]

Marketplace Stats

Fetches detailed statistics of a marketplace.

GET /sol/v1/marketplace/stats

Query parameters:

  • network: string- either of [mainnet-beta, testnet, devnet]

  • marketplace_address: string - the address of the marketplace.

  • start_date: string (optional) - from the date, you want to see the stats (format: YYYY-MM-DD). If not provided, shows all stats from the marketplace's creation date.

  • end_date: string(optional) - to the date you want to see the stats (default value: today's date)

const myHeaders = new Headers();
myHeaders.append("x-api-key", "QEbMrBRQEP92ToRo");

const requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("http://localhost:4000/sol/v1/marketplace/stats?network=devnet&marketplace_address=5LSMwR5GLr4WjDHS5FoUXQCN5osZYHRoDGjmcEsS843B&start_date=2022-09-02&end_date=2022-09-06", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
{
    "success": true,
    "message": "Marketplace stats fetched successfully",
    "result": {
        "total_sales": 1,
        "sales_volume": 0.1,
        "total_sellers": 1,
        "total_listings": 2,
        "listed_volume": 0.2,
        "start_date": "2021-09-02T00:00:00.000Z",
        "end_date": "2022-09-06T00:00:00.000Z"
    }
}

Active Bids

Retrieve information about all active bids within a marketplace. This endpoint provides the flexibility to apply various filters for refining active bids and allows sorting results based on either price or bid_date.

GET /sol/v2/marketplace/active_bids

Query parameters:

  • network: string- either of [mainnet-beta, testnet, devnet]

  • marketplace_address: string - the address of the marketplace.

  • collection_address: string (optional) - filter listings based on the collection to which the NFTs belong.

  • buyer_address: string (optional) - filter based on the address of a bidder.

  • nft_address: string (optional) - filter based on the address of an NFT.

  • sort_by: string (optional) - sort is available on the listed price or listing creation time. The value should be price or bid_date.

  • sort_order: string (optional) - order either in asc(ascending) or desc(descending). Default value is asc.

  • page: number (optional) - which page data want to fetch? Default is 1.

  • size: number (optional) - number of listings on a single page. Default is 10, maximum 50.

var myHeaders = new Headers();
myHeaders.append("x-api-key", "YOUR_API_KEY");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://api.shyft.to/sol/v1/marketplace/active_bids?network=devnet&marketplace_address=5LSMwR5GLr4WjDHS5FoUXQCN5osZYHRoDGjmcEsS843B&sort_by=bid_date&sort_order=desc&page=1&size=5&buyer_address=3yTKSCKoDcjBFpbgxyJUh4cM1NG77gFXBimkVBx2hKrf", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
{
    "success": true,
    "message": "Active bids fetched successfully",
    "result": {
        "data": [
            {
                "network": "devnet",
                "marketplace_address": "5LSMwR5GLr4WjDHS5FoUXQCN5osZYHRoDGjmcEsS843B",
                "buyer_address": "3yTKSCKoDcjBFpbgxyJUh4cM1NG77gFXBimkVBx2hKrf",
                "price": 0.01,
                "currency_symbol": "SOL",
                "nft_address": "7rzkaLG3TGcYYedXpTBKUfnDYMYqtfjAP2zgpchHeD97",
                "nft": {
                    "name": "Cyborg #19553",
                    "symbol": "SG",
                    "royalty": 5,
                    "image_uri": "https://jpeg.stellargalactics.com/1_3_2_27_6_1_1.png",
                    "cached_image_uri": "https://jpeg.stellargalactics.com/1_3_2_27_6_1_1.png",
                    "animation_url": "",
                    "cached_animation_url": "",
                    "metadata_uri": "https://meta.stellargalactics.com/1_3_2_27_6_1.json",
                    "description": "Unique & mutable cyborgs ready to begin their adventure in Stellar Galactics - The Ultimate Strategic Battler.",
                    "mint": "7rzkaLG3TGcYYedXpTBKUfnDYMYqtfjAP2zgpchHeD97",
                    "owner": "238KG47ESGhBYjiyvtX3sAEgPojkVJGHxMFmF3GhdncE",
                    "update_authority": "238KG47ESGhBYjiyvtX3sAEgPojkVJGHxMFmF3GhdncE",
                    "creators": [
                        {
                            "address": "AfQSDK4nQUZrPvW7DxN9gxmRCa3xdKoGvPGkpKcLoh7X",
                            "share": 50,
                            "verified": false
                        },
                        {
                            "address": "59nhhKKwAs9WqR9wfMSaRuwSVU5DmURcL89CLWFHn7rz",
                            "share": 50,
                            "verified": false
                        }
                    ],
                    "collection": {},
                    "attributes": {
                        "OriginPlanet": "Arcturia",
                        "Gender": "Male",
                        "Class": "Brawler",
                        "Helmet": "BrawlerCorporal",
                        "Vest": "BrawlerCorporal",
                        "Eye": "QuantumSight",
                        "Neck": "GalacticForged",
                        "Skin": "Chocolate",
                        "Rank": "Corporal",
                        "Level": "1",
                        "Medal": "Gensis",
                        "Stress": "0",
                        "Life point": "100",
                        "Health": "93.03",
                        "Attack": "14.81",
                        "Accuracy": "61.38",
                        "Critical Hit": "9.76",
                        "Speed": "17.68",
                        "Luck": "2.43",
                        "Persistence": "13.10",
                        "Status": "Alive"
                    },
                    "attributes_array": [
                        {
                            "trait_type": "OriginPlanet",
                            "value": "Arcturia"
                        },
                        {
                            "trait_type": "Gender",
                            "value": "Male"
                        },
                        {
                            "trait_type": "Class",
                            "value": "Brawler"
                        },
                        {
                            "trait_type": "Helmet",
                            "value": "BrawlerCorporal"
                        },
                        {
                            "trait_type": "Vest",
                            "value": "BrawlerCorporal"
                        },
                        {
                            "trait_type": "Eye",
                            "value": "QuantumSight"
                        },
                        {
                            "trait_type": "Neck",
                            "value": "GalacticForged"
                        },
                        {
                            "trait_type": "Skin",
                            "value": "Chocolate"
                        },
                        {
                            "trait_type": "Rank",
                            "value": "Corporal"
                        },
                        {
                            "trait_type": "Level",
                            "value": "1"
                        },
                        {
                            "trait_type": "Medal",
                            "value": "Gensis"
                        },
                        {
                            "trait_type": "Stress",
                            "value": "0"
                        },
                        {
                            "trait_type": "Life point",
                            "value": "100"
                        },
                        {
                            "trait_type": "Health",
                            "value": "93.03"
                        },
                        {
                            "trait_type": "Attack",
                            "value": "14.81"
                        },
                        {
                            "trait_type": "Accuracy",
                            "value": "61.38"
                        },
                        {
                            "trait_type": "Critical Hit",
                            "value": "9.76"
                        },
                        {
                            "trait_type": "Speed",
                            "value": "17.68"
                        },
                        {
                            "trait_type": "Luck",
                            "value": "2.43"
                        },
                        {
                            "trait_type": "Persistence",
                            "value": "13.10"
                        },
                        {
                            "trait_type": "Status",
                            "value": "Alive"
                        }
                    ],
                    "files": [
                        {
                            "uri": "https://jpeg.stellargalactics.com/1_3_2_27_6_1.png",
                            "type": "image/png"
                        }
                    ],
                    "external_url": "https://stellargalactics.com/",
                    "is_loaded_metadata": true,
                    "primary_sale_happened": false,
                    "is_mutable": true,
                    "token_standard": "NonFungible",
                    "is_compressed": false,
                    "merkle_tree": ""
                },
                "bid_state": "3BWb34a3oQBvAU752Tb8yU9SN25f6uSNwC2SHYntNfYo",
                "status": "stale",
                "created_at": "2023-09-26T06:25:30.000Z",
                "receipt": "9s9iYzEaJRvWxcppnWnr6CW4Hb8yXntDH6HXu7KbjSC3"
            }
        ],
        "page": 1,
        "size": 5,
        "total_data": 1,
        "total_page": 1
    }
}

Index Marketplace

This endpoint helps to cache the marketplace and its listings. After indexing a marketplace, you can view and explore active listings, seller listings, marketplace stats, etc.

This is an async endpoint. It'll take 5 minutes to cache given the marketplace.

PUT /sol/v1/marketplace/index

Body Params

  • network: string Solana blockchain environment (testnet/devnet/mainnet-beta)

  • marketplace_address: string - the address of the marketplace that wanted to cache.

var myHeaders = new Headers();
myHeaders.append("x-api-key", "YOUR_API_KEY");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "network": "mainnet-beta",
  "marketplace_address": "AxrRwpzk4T6BsWhttPwVCmfeEMbfbasv1QxVc5JhUfvB"
});

var requestOptions = {
  method: 'PUT',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://api.shyft.to/sol/v1/marketplace/index", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
{
    "success": true,
    "message": "Marketplace will be synced within 2 minutes"
}
https://documenter.getpostman.com/view/18419720/UzQvt5Kf#a93079e6-8cfd-42f8-a04b-72d9b4099540
https://shyft.to/get-api-key
https://nfts.shyft.to/marketplace
create your own
With and Without SHYFT
Page cover image