NFT Floor Pricing Feeds
Chainlink NFT Floor Pricing Feeds provide a conservative and risk averse floor price estimate for an NFT collection. These feeds operate the same way as other Chainlink Data Feeds. NFT Floor Pricing Feeds are supported by Coinbase Cloud’s aggregation algorithm and Chainlink’s oracle infrastructure to help eliminate extreme price outliers and make these feeds resistant to market manipulation. You can use NFT Floor Pricing Feeds for use cases that rely on high-quality NFT data, including lending and borrowing, on-chain derivatives, dynamic NFTs, gaming guilds, CeFi products, prediction markets, and more.
Find the list of testnet feeds on the Contract Addresses page. To sign up for access to NFT Floor Pricing feeds on Ethereum Mainnet, use this TypeForm.
Using NFT Floor Pricing Feeds
Read answers from NFT Floor Pricing Feeds the same way that you use Price Feeds.
Using Solidity, your smart contract should reference AggregatorV3Interface
, which defines the external functions implemented by Data Feeds.
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol";
contract NFTFloorPriceConsumerV3 {
AggregatorV3Interface internal nftFloorPriceFeed;
/**
* Network: Goerli - No Sepolia feeds available at this time
* Aggregator: CryptoPunks
* Address: 0x5c13b249846540F81c093Bc342b5d963a7518145
*/
constructor() {
nftFloorPriceFeed = AggregatorV3Interface(
0x5c13b249846540F81c093Bc342b5d963a7518145
);
}
/**
* Returns the latest price
*/
function getLatestPrice() public view returns (int) {
// prettier-ignore
(
/*uint80 roundID*/,
int nftFloorPrice,
/*uint startedAt*/,
/*uint timeStamp*/,
/*uint80 answeredInRound*/
) = nftFloorPriceFeed.latestRoundData();
return nftFloorPrice;
}
}