DIA Nexus Documentation
  • Nexus Overview
  • Intro to Nexus
    • How it works
    • Nexus vs. Lumina
    • Integrated Chains
  • Data products
    • Token Price Feeds
    • RWA Price Feeds
    • Randomness
    • Fair-value Feeds
  • How-to Guides
    • Fetch Price Data
      • Solidity
      • Vyper
      • Demo Oracles
      • Chain-specific Guide
        • Aleph Zero
        • Alephium
        • Edu Chain
        • Hydration
        • Kadena
        • LUKSO
        • Somnia
        • Stacks
        • Superseed
        • XRP Ledger (XRPL)
    • Generate Randomness
      • Solidity
      • WASM
      • Demo Oracles
      • Chain-specific Guide
        • Alephium
    • Migrate to DIA
    • Fund the Oracle
    • Build a Scraper
      • Development Cluster Stack
      • DIA Test‐Space with Docker Compose
      • DIA Test‐Space with Minikube
      • Add a new exchange scraper
      • Add a new foreign scraper
      • Add a new liquidity scraper
      • Additional notes
  • Request a Custom Oracle
  • Reference
    • Architecture
      • Data sourcing
      • Data computation
      • Data delivery
    • APIs
      • Token prices
        • RestAPI
          • Request Samples
        • GraphQL
          • Request Samples
      • RWA prices
    • Pricing Methodologies
      • IR: Interquartile Range Filter
      • MAIR: Moving Average with Interquartile Range Filter
      • VWAP: Volume Weighted Average Price
      • VWAPIR: Volume Weighted Average Price with Interquartile Range Filter
      • LST fair price
    • Data Sources
      • CEXes Data
      • DEXes Data
    • Smart Contracts
      • DIAOracleV2.sol
      • DIARandomOracle.sol
    • Randomness Protocol
  • Resources
    • Audits
    • Community & Support
    • Security Bounty Program
    • Research
      • Return Rates in Crypto Farming
      • Crypto Volatility Index
      • Compounded Rates
      • Polkadot Medianizer
    • T&C
      • Licence Agreement
      • Contributor Covenant Code of Conduct
      • Disclaimer
Powered by GitBook
On this page
  • Oracle Details
  • Oracle Configuration
  • Asset Feeds
  • Mainnet
  • Testnet
  • How to Access Data
  • Accessing the oracle on-chain (Solidity)
  • Adapter contracts
  • Support
Export as PDF
  1. How-to Guides
  2. Fetch Price Data
  3. Chain-specific Guide

Superseed

dApps built on Superseed can leverage DIA oracles to access up-to-date asset price information.

PreviousStacksNextXRP Ledger (XRPL)

Last updated 1 month ago

is a cross-chain oracle provider that sources granular market data from diverse exchanges, including CEXs and DEXs. Its data sourcing is thorough, enabling unparalleled transparency and customizability for resilient price feeds for 20,000+ assets. Its versatile data processing and delivery ensures adaptability and reliability for any decentralized application.

Oracle Details

Chain
Address

Mainnet

Testnet

Oracle Configuration

Parameter
Value

Pricing Methodology

Deviation (%) & Refresh Frequency

0.5% and 120 seconds

Heartbeat

24h

Asset Feeds

Mainnet

Asset Ticker
Adapter Address
Asset Markets

WETH

cbBTC

Testnet

Asset Ticker
Adapter Address
Asset Markets

WETH

cbBTC

How to Access Data

Accessing the oracle on-chain (Solidity)

Below is an example of a contract consuming data from our oracle on Sepolia testnet using the IDIAOracleV2 interface. If you pass WETH/USD as the key, it will return the most recent price of WETH in USD with 8 decimal places (e.g. 177101990135 is $1,771.01990135) along with the Unix timestamp of the last price update.

pragma solidity ^0.8.13;

interface IDIAOracleV2 {
    function getValue(string memory) external view returns (uint128, 
             uint128);
}

contract DIAOracleSample {

    address immutable ORACLE = 0x6f021bF081840F96bdd90fd756b700072C7E68A5;

    function getPrice(string memory key) 
    external 
    view
    returns (
        uint128 latestPrice, 
        uint128 timestampOflatestPrice
    ) {
        (latestPrice, timestampOflatestPrice) =   
                 IDIAOracleV2(ORACLE).getValue(key); 
    }
}

Adapter contracts

Support

To consume price data, you’ll need to invoke the getValue method on the oracle contract which you can access through the or the .

See the full example .

To consume price data from our oracle, you can use the adapter smart contract located at the for each asset. This will allow you to access the same methods on the AggregatorV3Interface such as getRoundData & latestRoundData. You can learn more .

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

Developers seeking other specialized, production-grade oracle with tailored price feeds and configurations can initiate the request by .

DIA
here
Discord
Telegram
contacting the DIA BD Team via Telegram
here
adapter address
0xF526dC0D2B73488d32b58E55C17Cef5a53AD002A
0x6f021bF081840F96bdd90fd756b700072C7E68A5
MAIR
0xAdEfc2264c21A05D3f83bf7694438F81E119620B
WETH markets
0x7F760344c9Cde8DD342120FA0F908CE0Cd42B1E6
cbBTC markets
0xA09A4e4297a06e284a4ACdf2Ca1F9998d5280F6e
WETH markets
0x61790e8F9bf02E4272E273F2615eD4fc7d8F95D9
cbBTC markets
DIA Oracle library
interface