Oracle Details
As Kadena allows for several chains in parallel, it is important to retrieve the price from the correct chain. Currently, DIA oracles are deployed on these chains:Network ID | Chain ID | DIA Contract Identifier |
---|---|---|
mainnet01 | 1 | n_bfb76eab37bf8c84359d6552a1d96a309e030b71.dia-oracle |
mainnet01 | 2 | n_bfb76eab37bf8c84359d6552a1d96a309e030b71.dia-oracle |
mainnet01 | 4 | n_bfb76eab37bf8c84359d6552a1d96a309e030b71.dia-oracle |
testnet04 | 4 | n_bfb76eab37bf8c84359d6552a1d96a309e030b71.dia-oracle |
Chainweb EVM Testnet 20
Network ID | Chain ID | DIA Contract Address |
---|---|---|
chain20 | 5920 | 0x2e034f073ee95db83b5498b90a53dd9b26525355 |
Oracle Configuration
Parameter | Value |
---|---|
Pricing Methodology | VWAPIR |
Deviation (%) & Refresh Frequency | 0.5% and 120 seconds |
Heartbeat | 24h |
Asset Feeds
The Kadena oracle includes the following price feeds. Use the Query Symbol as a parameter in theget-value
(or getValue
for chainweb EVM) function to receive the latest price information for any of these assets.
Asset | Query Symbol | Sources Overview |
---|---|---|
Bitcoin (BTC) | BTC/USD | BTC Sources |
USD Coin (USDC) | USDC/USD | USDC Sources |
Staked ETH (stETH) | STETH/USD | stETH Sources |
Ether (ETH) | ETH/USD | ETH Sources |
Wrapped Bitcoin (WBTC) | WBTC/USD | WBTC Sources |
Moonbeam (GLMR) | GLMR/USD | GLMR Sources |
Optimism (OP) | OP/USD | OP Sources |
DIA Token (DIA) | DIA/USD | DIA Sources |
Arbitrum (ARB) | ARB/USD | ARB Sources |
Binance Coin (BNB) | BNB/USD | BNB Sources |
Avalanche (AVAX) | AVAX/USD | AVAX Sources |
Celo Dollar (CUSD) | CUSD/USD | CUSD Sources |
Kadena (KDA) | KDA/USD | KDA Sources |
Gnosis (GNO) | GNO/USD | GNO Sources |
Wrapped Ether (WETH) | WETH/USD | WETH Sources |
How to Access Data
Locate one of the deployed contracts (either testnet or mainnet) and call theget-value
(or getValue
for chainweb EVM) function. This function expects one parameter, which is the symbols of the asset you want to retrieve and a “/USD”, so for example for the Bitcoin price the parameter must be “BTC/USD”.
This will return two values:
- The price of the asset, with 8 decimals.
- The timestamp of the last update in Unix time format, in UTC timezone.
Oracle Grants Program
The DIA Oracle Grants Program provides zero-cost oracle access for up to 1 year, covering deployment and update costs to accelerate dApp development on Kadena. Learn more about the grant here:DIA Oracle Grants Program | Apply Now
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)