Access the oracle
Here is an example of how to retrieve NFT price value from a standard DIA xFloor oracle. For the purpose of this example, we will be using the following demo oracle on Ethereum Goerli: 0x890a...31c5
Access any DIA oracle smart contract.
Call
getValue(collection_id)
withcollection_id
being the stringBlockchain-Address
, for instanceEthereum-0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D
for Bored Apes Yacht Club. You can use the "Read" section on Etherscan to execute this call.The current version of the DIA demo oracle contains the following values:
The current floor price in the blockchain's native currency with a fix-comma notation of eight decimals (see API endpoint).
The 30-day moving average of the floor price (see API endpoint).
The UNIX timestamp of the last oracle update.
Learn more about the demo NFT oracle
pageDemo NFT oracleLast updated