Token Price Feeds
Oracle details
Chain | Address |
---|---|
Mainnet | 285zrkZTPpUCpjKg9E3z238VmpUBQEAbESGsJT6yX7Rod |
Testnet | 216wgM3Xi5uBFYwwiw2T7iZoCy9vozPJ4XjToW74nQjbV |
Oracle configuration
Pricing Methodology | VWAPIR |
Deviation (%) & Refresh Frequency | 0.2% and 120 seconds |
Heartbeat | 10mins |
Asset feeds
Asset Ticker | getValue(key) | Asset Markets |
---|---|---|
BTC | BTC/USD | BTC markets |
USDC | USDC/USD | USDC markets |
ETH | ETH/USD | ETH markets |
WBTC | WBTC/USD | WBTC markets |
USDT | USDT/USD | USDT markets |
ALPH | ALPH/USD | ALPH markets |
AYIN | AYIN/USD | AYIN markets |
How to access data
Locate one of the deployed contracts (either testnet or mainnet) and call thegetValue
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.
DIAOracle
contract implementation in Ralph:
Verifiable Randomness
Oracle details
Chain | Address |
---|---|
Alephium Mainnet | v1v4cBXP9L7M9ryZZCx7tuXuNb9pnDLGb3JJkPBpbR1Z |
Alephium Testnet | 217k7FMPgahEQWCfSA1BN5TaxPsFovjPagpujkyxKDvS3 |
Oracle configuration
The oracle uses drand randomness from the quicknet mainnet to provide randomness on Alephium.How to access data
To consume randomness data, you’ll need to invoke thegetLastRound
method on the oracle contract. It will return the round ID of the latest update.
Using this round ID, you can call getRandomValue
and will receive a return value of that randomness, the round ID and the BLS signature from the drand API.
Note that round IDs are used round-robin and will repeat after 1000 iterations.
Below is the DIARandomOracle
contract implementation in Ralph:
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 Alephium. 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)