Oracle details
WBTC, DOT, USDT and USDC oracle
Chain | Address |
---|---|
Mainnet | 0xdee629af973ebf5bf261ace12ffd1900ac715f5e |
Testnet | 0xc756bd338a97c1d2faab4f13b5444a08a1566917 |
tBTC, Aave, ETH, wstETH, sUSDs, & sUSDe oracle
Chain | Address |
---|---|
Mainnet | 0x48ae7803cd09c48434e3fc5629f15fb76f0b5ce5 |
Testnet | 0x5d8320f3ced9575d8e25b6f437e610fc6a03bf52 |
Oracle configuration
Pricing Methodology | VWAPIR |
Deviation (%) & Refresh Frequency | 0.5% and 120 seconds |
Heartbeat | 24h |
Asset feeds
Mainnet
Testnet
Asset Ticker | Adapter Address | Asset Markets |
---|---|---|
WBTC | 0xC9cCBe99bdD9538871f9756Ca5Ea64C2267cb0a7 | WBTC markets |
DOT | 0x422E745797EC0Ef399c17cE3E2348394F2944727 | DOT markets |
USDT | 0xb4aC9f0E6E207D5d81B756F8aF6efe3fe7B0E72c | USDT markets |
USDC | 0xEE7aFb45c094DC9fA404D6A86A7d795d4aA33D28 | USDC markets |
tBTC | 0x9f7abE73e656DB45F56B1d3755940CB3fc82Fcaa | tBTC markets |
Aave | 0xC9E1415Eb64281aD449f50C454873d92F312d6fE | Aave markets |
How to access data
getValue Method
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 Hydration testnet using the IDIAOracleV2 interface. If you pass BTC/USD
as the key, it will return the most recent price of BTC in USD with 8 decimal places (e.g. 9601458065403 is $96,014.58065403) along with the Unix timestamp of the last price update.
Adapter contracts
To consume price data from our oracle, you can use the adapter smart contract located at the adapter address for each asset. This will allow you to access the same methods on theAggregatorV3Interface
such as getRoundData
& latestRoundData
. You can learn more here.
This is a sample contract for consuming the WBTC/USD
price feed on Hydration mainnet:
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)