Oracle Configuration
Available Asset Feeds
Mainnet
How to Access Data
To consume price data, you’ll need to invoke thegetValue method on the oracle contract which you can access through the DIA Oracle library or the interface.
Below is an example of a contract consuming data from the oracle on Wanchain Mainnet using the IDIAOracleV2 interface. If you pass BTC/USD as the key, it will return the most recent price of BTC in USD with 18 decimal places (e.g. 64036673405438220304384 is $64,036.67) along with the Unix timestamp of the last price update.
Request a Custom Oracle
DIA offers highly customizable oracles that are individually tailored to each dApp’s needs. Each oracle can be customized in the following ways, including:- Data Sources & Asset Feeds
- Pricing Methodologies
- Update Triggers (Frequency, Deviation, Heartbeat, …etc)