Asset Specific Value Calling Convention

This page describes the oracle with custom calling convention for oracles

The Asset Specific Value Calling Convention allows developers to access oracles in a way where each value is accessible from a specific smart contract by calling a function without further parameters. To be specific, the smart contract is deployed as a separate contract which reads price data from a regular DIA oracle contract and provides the response for the latest available price of the specific asset (described in the contract).

To showcase the functionality, there's a demo contract deployed on Polygon Mumbai:

The contract allows to read values of the BTC/USD oracle by calling either of the two functions:

  1. latestAnswer - provides the latest available price data for BTC/USD

  2. latestRoundData - provides the latest available price data for BTC/USD with timestamp of the last update

Please note that the contract is for demo purposes and shouldn't be used in production. You can request a custom Oracle and Asset in the following page:

Last updated