description |
---|
How do I access chart points from several exchanges using the DIA oracle system? |
The oracle contains information about chart points of an ever growing list of exchanges and assets. You can access a price quotation and the timestamp of the last update.
- Access our oracle smart contract.
- Call
getCoinInfo(exchange)
withexchange
being the full name of the exchange such asUniswap
. You can use the "Read" section on Etherscan to execute this call. - The response of the call contains three values:
- The current asset price in USD with a fix-comma notation of five decimals.
- The UNIX timestamp of the last oracle update.
- The short name of the quoted asset, e.g.,
ETH
for Ethereum.
As of now, the following list of exchanges is available in this oracle:
- 0x (ETH)
- Bancor (ETH)
- Bitmax (ETH)
- CREX24 (CREX)
- Curvefi (DAI)
- Gnosis (ETH)
- Kyber (ETH)
- Loopring (ETH)
- STEX (PLEX)
- SushiSwap (ETH)
- Uniswap (ETH)
- PanCakeSwap (WBNB)