Skip to main content

Available Price Feeds

Demo oracles are available for testing the new fully verifiable & decentralized Lumina stack on Arbitrum Mainnet & Testnet:

Oracle Contracts

Mainnet
ChainOracle TypeAddress
MainnetPush Oracle0xA42217338614B7e67D022C52D1CD38e02D619bb0
MainnetPull Oracle0xE74B7D236A97eED9026926073cBb436638266888
Testnet
ChainOracle TypeAddress
SepoliaPush Oracle0x9bb71344Ed950F9cFD85EE1C7258553B01d95FA0
SepoliaPull Oracle0x61D217a26D0Bff1D2b4c6f5880e621071326aadC

Oracle Configuration

Pricing MethodologyMedian
Deviation (%) & Refresh Frequency2% and 120 seconds
Heartbeat12h

Available Asset Feeds

Asset Tickerupdates(key)Asset Markets
ETHETH/USDETH Markets
BTCBTC/USDBTC Markets
DIADIA/USDDIA Markets
USDCUSDC/USDUSDC Markets

Oracle Contracts

Mainnet

ChainOracle TypeAddress
MainnetPush Oracle0xEB3b12FB37090ACc6773B59619799941536FA198

Oracle Configuration

Pricing MethodologyMedian
Deviation (%) & Refresh Frequency1% and 120 seconds
Heartbeat24h

Available Asset Feeds

  • APPL
  • XAU/USD
  • USD/EUR

How to Access Data

To consume price data, select the method required for your dapp. The updates method is available for Push-based oracles and request method for Pull-based oracles. The price updates are stored in both methods in an updates mapping. When accessing the updates mapping through the key BTC/USD, 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. Below are sample contracts that consume the BTC/USD price feed through both methods:

updates Method

pragma solidity ^0.8.13;

import { PushOracleReceiver } from "@dia-data/contracts-spectra/PushOracleReceiver.sol";

contract DIAOracleSample {

    PushOracleReceiver public diaOracle;
    string public key = "BTC/USD";

    constructor(address _oracle) {
        diaOracle = PushOracleReceiver(payable(_oracle));
    }

    function getPrice()
    external
    view
    returns (
        uint128 timestampOflatestPrice,
        uint128 latestPrice
    ) {
        (timestampOflatestPrice, latestPrice) =
                 diaOracle.updates(key);
    }
}

request Method

// SPDX-License-Identifier: MIT
pragma solidity 0.8.29;

import { RequestOracle } from "@dia-data/contracts-spectra/RequestOracle.sol";

contract PullOracleSample {
    address public constant DIA_RECIPIENT = 0x9bb71344Ed950F9cFD85EE1C7258553B01d95FA0; // testnet
    uint32 public constant DESTINATION_DOMAIN = 100640; // testnet chain id

    RequestOracle public diaOracle;
    string public key = "BTC/USD";

    constructor(address _requestOracle) {
        diaOracle = RequestOracle(payable(_requestOracle));
    }

    /*
    * To calculate the request fee on each chain, you can check the script below:
    * https://github.com/diadata-org/Spectra-interoperability/blob/main/contracts/scripts/sendTestMessage.mjs#L111
    */
    function requestPrice(string memory key) external payable {
        diaOracle.request{value: msg.value}(
            DIA_RECIPIENT,
            DESTINATION_DOMAIN,
            abi.encode(key)
        );
    }

    function getPrice()
    external
    view
    returns (
        uint128 timestampOflatestPrice,
        uint128 latestPrice
    ) {
        (timestampOflatestPrice, latestPrice) =
                 diaOracle.updates(key);
    }
}


Additional Details

You can find the contract addresses for the Arbitrum bridge’s components on mainnet and testnet below:
Learn more about DIA’s cross-chain messaging layer here.

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 Arbitrum. 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)
Get a tailored oracle for your dApp, request one below:

Support

For developer assistance, connect with the DIA team directly on Discord or Telegram.
I