Skip to main content
Oracles

DIA

Overview

DIA is a cross-chain, trustless oracle network delivering verifiable price feeds for Linea. DIA sources raw trade data directly from primary markets and computes it onchain, ensuring complete transparency and data integrity.

Key features:

  • Complete verifiability from source to destination smart contract.
  • Direct data sourcing from 100+ primary markets eliminating intermediary risk.
  • Support for 20,000+ assets across all major asset classes.
  • Custom oracle configuration with tailored sources and methodologies.

Data products:

  • Token Price Feeds: Real-time market prices for assets across CEXs and DEXs.
  • Fundamental Feeds: Fair value pricing and backing data (NAV, Proof of Reserve, and more).
  • Real-World Asset (RWA) Feeds: Traditional financial data including Equities, FX rates, commodities, and ETFs.
  • Randomness: Verifiable random number generation for gaming, lotteries, and more.

Querying DIA price feeds

note

This is a demo oracle which is not intended for use in production environments. Interested in a production-ready oracle? Contact the DIA team.

Call the getValue(string memory key) function on the oracle contract with the Query Symbol (e.g., "BTC/USD"). The function returns the asset price with 8 decimal precision and the timestamp of the last update. We'll use this address on Linea Sepolia: 0x533d3c1df8d238374065fb3341c34754e4bfce8e.

pragma solidity ^0.8.13;
interface IDIAOracleV2 {
function getValue(string memory) external view returns (uint128,
uint128);
}
contract DIAOracleSample {
/**
* @notice The DIA oracle to read from.
* Oracle Address: 0x533d3c1df8d238374065fb3341c34754e4bfce8e
* Network: Linea Sepolia
*/
address constant diaOracle = "0x...";
function getPrice(string memory key)
external
view
returns (
uint128 latestPrice,
uint128 timestampOfLatestPrice
) {
(latestPrice, timestampOfLatestPrice) =
IDIAOracleV2(diaOracle).getValue(key);
}
}

Please refer to DIA's documentation for the list of available price feeds.

Request a custom oracle

For dapps requiring specific configurations, DIA deploys production-grade custom oracles tailored to your requirements with configurable data sources, pricing methodologies, update triggers, and coverage for any of 20,000+ supported assets.

Request a custom oracle

Resources