How to get NFT and collection floor prices

Floor prices indicate the lowest possible purchase price of an NFT within a given collection, or the lowest possible purchase price for a specific NFT. Mnemonic’s NFT Marketplace API enables you to look up real time floor prices by collection or by NFT.

This is extremely useful information to surface for multiple purposes. For example, you might want to show the current floor price across all marketplaces for a collection to help collectors find and act on deals. Or, you might want to display the real time floor prices for all the collections held by a given user in a portfolio view.

In this tutorial, we’ll explore the methods you can use to get floor prices with Mnemonic’s API, share a few examples, and provide a few tips along the way. This is a beginner-friendly tutorial. You will need a Mnemonic API key to get started.

Floor price of a collection

You can use the GetFloorPrice endpoint to look up the floor price for an entire collection, or for a specific NFT.

This endpoint has only one required parameter, the contract address of the collection you’re looking up. However, if you’re researching the floor price of a specific NFT within a collection, you will also need to include the tokenId of the NFT in your query.

Here’s how our query to look up floor prices for Pudgy Penguins collection:

curl --request GET \
     --url 'https://ethereum-rest.api.mnemonichq.com/marketplaces/v1beta2/floors/0xbd3531da5cf5857e7cfaa92426877b022e612cf8?marketplaceId=MARKETPLACE_ID_OPENSEA' \
     --header 'X-API-Key: <YOUR API KEY>' \
     --header 'accept: application/json'

Below, you can see the response to the above request:

{
  "price": {
    "totalNative": "4.1",
    "totalUsd": "7387.08677009056294",
    "fungibleAddress": "",
    "fungibleValue": "0"
  }
}

Before we jump into adding in the tokenId parameter to look up a specific NFT’s floor price, let’s review what you see in the response above.

  • totalNative: Indicates the value of the current floor price in the native token for the chain (i.e. ETH for Ethereum and MATIC for Polygon)
  • totalUsd: Indicates the value of the current floor price converted to USD at the conversion rate of the time of the event.
  • fungibleAddress: In cases where the floor price is in a token other than the native (ETH or MATIC) token, shows the contract address of the token.
  • fungibleValue: Shows the floor price value of the fungible token, if relevant.

Floor price of an NFT

Above, we demonstrated how to look up the floor price for a collection. Now, let’s add the token id parameter into our request to get the floor price for a specific NFT.

Here’s what the query would look like:

curl -L -X GET 'https://ethereum-rest.api.mnemonichq.com/marketplaces/v1beta2/floors/0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D?tokenId=5955' \
-H 'X-API-Key: YOUR_API_KEY_HERE'

And here is what the results look like for the example above:

{
    "price": {
        "totalNative": "81.0526",
        "totalUsd": "133027.17749620406305606",
        "fungibleAddress": "",
        "fungibleValue": "0"
    }
}

Conclusion

We love feedback here at Mnemonic! After you’ve completed this tutorial, let us know about your experience or share feedback by tagging us on Twitter @mnemonichq or reaching out directly to us at [email protected]!