Crypto Assets
How do I access crypto asset information using the DIA oracle system?
The oracle exists on various blockchains and contains information about crypto assets. You can access a price quotation (see sources and methodology) and the current circulating supply as well as the timestamp of the last update.
  1. 1.
    Access the corresponding oracle smart contract.
  2. 2.
    Call getCoinInfo(coin_name) with coin_name being the full coin name such as Bitcoin. You can use the "Read" section on Etherscan to execute this call.
  3. 3.
    The response of the call contains four values:
    1. 1.
      The current asset price in USD with a fix-comma notation of five decimals.
    2. 2.
      The current circulating supply.
    3. 3.
      The UNIX timestamp of the last oracle update.
    4. 4.
      The short name of the asset, e.g., BTC for Bitcoin.
As of now, the following list of quotations is available in this oracle:
Ethereum Mainnet:
  • BTC
  • DIA
  • ETH
Binance Smart Chain:
  • BNB
  • BTC
  • DIA
  • ETH
  • USDT
  • XRP
Polygon (Matic):
  • BTC
  • DIA
  • ETH
  • MATIC
  • USDT
  • XRP
Moonbeam:
  • BTC
  • DIA
  • DOT
  • ETH
  • USDT
  • XRP

Other Chains:

  • BTC
  • ETH
  • DIA
  • USDC
  • FTM
  • SDN
  • KSM
  • MOVR
Last modified 18d ago
Export as PDF
Copy link