GEB Docs
  • Quick Start
  • GEB Consensus
    • Mother Consensus
    • Sub Consensus(Agere)
  • Learn
    • BitAgere Guide
      • Auditor Reference Concepts
      • Executor Reference Concepts
  • Build
    • Validator
      • Wasm Operation
      • L-BTC Validator Operation
    • BitAgere
      • RelayAgere
      • Agere Auditor
      • Agere Executor
  • Use
    • Wasm Wallet
    • Earn $GEB
      • Stake L-BTC
        • What is L-BTC?
        • Download and Run LND Desk
        • Config LND
        • Node Asset Management
          • Open Channel(Get L-BTC)
          • L-BTC ⇌ BTC (on GEB chain)
        • Stake L-BTC Earn $GEB
      • Stake GEB on Agere
    • Earn $BTC
      • Claim and Other Operations
      • Transfer BTC to EVM
    • Bridge
      • Official Bridge
        • BEVM Mainnet
        • BEVM Canary
      • Third-Party Bridge
        • BEVM Mainnet
          • Swap from EVM to BEVM Mainnet
        • BEVM Canary
          • Swap from EVM to BEVM Canary
          • Other assets
            • Bridge PCX from BEVM Canary to Chainx
      • Transfer(EVM<-->Wasm)
  • EVM Development
    • Fee Calculation
      • GEB Mainnet
      • BEVM Canary
    • Smart Contract
      • Write a Contract
        • Set Up the Metamask Configuration
        • Deploy Smart Contract on GEB Signet
        • Deploy Smart Contract on BEVM Canary
      • Foundry
        • Deploy and verify contract by Foundry
      • Contract Verification (BlockScout)
      • ThirdWeb
    • Integrations
      • Oracle
        • Supra
        • DIA
      • Indexer
        • SubQuery
      • Account Abstraction
        • Particle Network
    • Libraries
      • ethereum-list/chains
      • Wagmi
      • Multicall3
    • Canonical contracts
    • Finality
  • Tokenomics
  • The Journy of GEB
  • Audit Reports
  • Community
Powered by GitBook
On this page
  • Overview
  • DIA's API
  • API Access
  • DIA's Oracle
  • Deployed Contracts
  • Example (Solidity)
  1. EVM Development
  2. Integrations
  3. Oracle

DIA

PreviousSupraNextIndexer

Last updated 9 months ago

Overview

DIA is a cross-chain oracle platform for Web3. It serves as an ecosystem for transparent financial data within a smart contract environment dedicated to finance. DIA's mission is to foster a collaborative environment among data analysts, providers, and consumers. Essentially, DIA offers a trustworthy and verifiable conduit linking external data from diverse origins to on-chain smart contracts, facilitating the creation of a myriad of financial decentralized applications. DIA is architected as a hybrid framework, integrating off-chain mechanisms for the storage and manipulation of extensive datasets, with on-chain elements that supply data to financial smart contracts.

DIA's API

Display the most transparent data to your users using DIA's API. Whether you're developing a financial service, a portfolio management tool, a new media platform, or anything else, DIA provides the most advanced and up-to-date data for your product.

API Access

The base URL for DIA is . All API paths are extensions of this base URL. Detailed documentation for our API endpoints can be found on the .

DIA's Oracle

Here is an overview of the deployed oracle contracts on each supported chain.

DIA Development Oracle contracts are smart contracts that offer a selected range of asset prices for live testing on our Mainnet and Testnet. These contracts are regularly updated and replaced, not maintained indefinitely.

DIA Development Oracle contracts are not meant to be integrated into a dApp. DIA creates specific contracts for dApps. To request a dedicated oracle, please contact the team on their websiteor the .

Deployed Contracts

Parameter
Value

Smart Contract

Oracle Type

Seeds

"BTC/USD" "ORDI/USD" "ETH/USD"

"SATS/USD"

Parameter
Value

Smart Contract

0x719108DC653CC3a9055ab8d9018c5D7924912631

Oracle Type

Seeds

"BTC/USD" "ORDI/USD"

Example (Solidity)

pragma solidity ^0.8.13;

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

contract IntegrationSample{

    address immutable ORACLE = 0x719108DC653CC3a9055ab8d9018c5D7924912631;
    uint128 public latestPrice; 
    uint128 public timestampOflatestPrice; 
   
    function getPriceInfo(string memory key) external {
        (latestPrice, timestampOflatestPrice) = IDIAOracleV2(ORACLE).getValue(key); 
    }
   
    function checkPriceAge(uint128 maxTimePassed) external view returns (bool inTime){
         if((block.timestamp - timestampOflatestPrice) < maxTimePassed){
             inTime = true;
         } else {
             inTime = false;
         }
    }
}

Result

https://api.diadata.org/v1
API documentation site
Discord
DIA DAO Forum
0x9a9a5113b853b394E9BA5FdB7e72bC5797C85191
Key/Value Oracle
Key/Value Oracle