getFloorPrice
Returns the floor prices of a NFT collection by marketplace
This endpoint is currently in BETA.
This endpoint is supported on the following chains and networks:
  • Ethereum: Mainnet
To see chain support across all features, check out the feature matrix.
  • contractAddress: [string] - contract address for the NFT collection
When using pricing information from marketplaces, we advise that all teams attribute the data to the respective marketplace with a View on {Marketplace} button/link that allows users to explore the collection more on OpenSea/LooksRare specifically.

Returns

  • [object] with the following properties
    • {marketplace}: [object] - name of the NFT marketplace where the collection is listed. Current marketplaces supported: OpenSea, LooksRare
      • floorPrice: [float] - the floor price of the collection on the given marketplace
      • priceCurrency: [enum] - the currency in which the floor price is denominated
        • Typically, denominated in ETH
      • collectionUrl: [string] - link to the collection on the given marketplace
      • retrievedAt: [string] - UTC timestamp of when the floor price was retrieved from the marketplace
      or
    • OR (if there is a marketplace error): {marketplace}: [object] - name of the NFT marketplace where the collection is listed. Current marketplaces supported: OpenSea, LooksRare
      • error: [string] - returns an error if there was an error fetching floor prices from the given marketplace

Examples

Request

Fetch (JS)
Axios (JS)
Postman
Curl
1
import fetch from 'node-fetch';
2
3
var requestOptions = {
4
method: 'GET',
5
redirect: 'follow'
6
};
7
8
const baseURL = "https://eth-mainnet.alchemyapi.io/nft/v2/demo/getFloorPrice";
9
const contractAddr = "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d";
10
const fetchURL = `${baseURL}?contractAddress=${contractAddr}`;
11
12
fetch(fetchURL, requestOptions)
13
.then(response => response.json())
14
.then(response => JSON.stringify(response, null, 2))
15
.then(result => console.log(result))
16
.catch(error => console.log('error', error))
Copied!
1
import axios from 'axios';
2
3
// replace with your Alchemy api key
4
const apiKey = "demo";
5
const baseURL = `https://eth-mainnet.alchemyapi.io/nft/v2/${apiKey}/getFloorPrice`;
6
// replace with the wallet address you want to query for NFTs
7
const contractAddr = "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d";
8
9
var config = {
10
method: 'get',
11
url: `${baseURL}?contractAddress=${contractAddr}`
12
};
13
14
axios(config)
15
.then(response => console.log(JSON.stringify(response.data, null, 2)))
16
.catch(error => console.log(error));
Copied!
1
URL: https://eth-mainnet.g.alchemy.com/nft/v2/demo/getFloorPrice?contractAddress=0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d
2
RequestType: GET
Copied!
1
curl 'https://eth-mainnet.g.alchemy.com/nft/v2/demo/getFloorPrice?contractAddress=0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d'
Copied!
If you're having trouble running requests via Alchemy Web3.js, Fetch, or Axios, please refer to: NFT API Quickstart Guide

Response

200
200 - marketplace error
1
{
2
"openSea": {
3
"floorPrice": 90,
4
"priceCurrency": "ETH",
5
"retrievedAt": "2022-06-21T13:50:17.080287240Z",
6
"collectionUrl": "https://opensea.io/collection/boredapeyachtclub"
7
},
8
"looksRare": {
9
"floorPrice": 87,
10
"priceCurrency": "ETH",
11
"retrievedAt": "2022-06-21T15:08:59.819Z",
12
"collectionUrl": "https://looksrare.org/collections/0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d"
13
}
14
}
Copied!
1
{
2
"openSea": {
3
"error": "unable to fetch floor price"
4
},
5
"looksRare": {
6
"error": "unable to fetch floor price"
7
}
8
}
Copied!