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
  • Introduction to DIA Oracles
  • Usage of DIA Oracles on Stacks
  • Deployed Contracts
  • How to Access DIA Oracles?
  • Included Price Feeds & Data Sources
  • Oracle Configuration Settings
  • Methodology: MAIR
  • Update frequency: 15-minute heartbeat
  • Support
Export as PDF
  1. How-to Guides
  2. Fetch Price Data
  3. Chain-specific Guide

Stacks

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

PreviousSomniaNextSuperseed

Last updated 1 month ago

Introduction to DIA Oracles

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.

Usage of DIA Oracles on Stacks

dApps building on Stacks can utilize DIA oracles to obtain up-to-date asset price information. These deployed oracles are suitable for use in production environments. They come with a list of supported assets and settings. However, if dApps require a custom oracle with a different set of assets and configurations, they should .

Deployed Contracts

Access the oracles in the smart contracts below:

Network
Oracle address
Explorer

Stacks Testnet

ST3Q982CNNQ00E3FH6853EMTA5FPF1M3ENJTHB8PY

Stacks Mainnet

SP1G48FZ4Y7JY8G2Z0N51QTCYGBQ6F4J43J77BQC0

How to Access DIA Oracles?

You can query for assets like "STX/USD" or "stSTX/USD" in the get-value() read function. It returns two values:

  1. The price of STX/USD with 8 decimals

  2. The timestamp of the last update (UTC timezone)

Included Price Feeds & Data Sources

The Stacks oracle includes the following price feeds:

Asset Ticker
Asset Blockchain
Asset Address
Asset Sources

STX

Stacks

0x0000000000000000000000000000000000000000

stSTX

Stacks

SP4SZE494VC2YC5JYG7AYFQ44F5Q4PYV7DVMDPBG.ststx-token

DIKO

Stacks

SP2C2YFP12AJZB4MABJBAJ55XECVS7E4PMMZ89YZR.arkadiko-token

WELSH

Stacks

SP3NE50GEXFG9SZGTT51P40X2CKYSZ5CC4ZTZ7A2G.welshcorgicoin-token

VELAR

Stacks

SP1Y5YSTAHZ88XYK1VPDH24GY0HPX5J4JECTMY4A1.velar-token

ALEX

Stacks

SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.age000-governance-token

sBTC

Stacks

SM3VDXK3WZZSA84XXFKAFAF15NNZX32CTSG82JFQ4.sbtc-token

aeUSDC

Stacks

SP3Y2ZSH8P7D50B0VBTSX11S7XSG24M1VB9YFQA4K.token-aeusdc

USDh

Stacks

SPN5AKG35QZSK2M8GAMR4AFX45659RJHDW353HSG.usdh-token-v1

BTC

Bitcoin

0x0000000000000000000000000000000000000000

Oracle Configuration Settings

Methodology: MAIR

Update frequency: 15-minute heartbeat

A consistent heartbeat refreshes all asset prices every 15 minutes.

Support

Learn more about DIA’s and architecture.

The final price point for each asset is calculated by computing the assets' trade information across multiple DEXs and CEXs. This is done using a Moving Average with Interquartile Range (MAIR) methodology.

For 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 here:

DIA
contact DIA on Telegram
data sourcing
data computation
Learn more about MAIR
Discord
Telegram
Request a Custom Oracle | DIA Documentation
https://explorer.hiro.so/address/ST3Q982CNNQ00E3FH6853EMTA5FPF1M3ENJTHB8PY?chain=testnet
https://explorer.hiro.so/address/SP1G48FZ4Y7JY8G2Z0N51QTCYGBQ6F4J43J77BQC0?chain=mainnet
STX Asset Information
stSTX Asset Information
DIKO Asset Information
WELSH Asset Information
VELAR Asset Information
ALEX Asset Information
sBTC Asset Information
aeUSDC Asset Information
USDh Asset Information
BTC Asset Information