Get floor price of a collection
Get floor price of NFT collections with graphQl APIs.
Last updated
Get floor price of NFT collections with graphQl APIs.
Last updated
SHYFTâs SuperIndexer can also be used to create various utility functions which can readily be used in real-life dApps. One such example can be getting floor price of a particular NFT collection across 3 marketplaces. This also requires a little help from SHYFTâs DAS APIs. The steps are as follows,
Firstly, we get all NFTs belonging to a collection using DAS getAssetByGroup method, which accepts the collection address and returns the list of NFTs
This list can be used to filter the nftMint/tokenMint field of the marketplaces using graphQl, using the _in check, which enables graphQl to check for a list of values. This can be fetched using a single cross-program query
once we have the prices of all NFTs from all three marketplaces, we can easily find out the lowest price NFT from each marketplace belonging to that collection
The lowest price NFT among 3 marketplaces is the floor price of the collection
This step would give us all NFT listings across 3 marketplaces, along with their prices. In the next step we have to filter the listings to get NFTs with the lowest price.
The GraphQL _in filter can be used to check for keys in a range of values
This function can be used to retrieve the lowest priced NFT for each marketplace, and then the lowest price NFT among three is the floor price of the collection
You can also use our tool to get a collection's mint list.