A-DEX
  • About Us
    • Intro
    • Audits
    • Roadmap
    • Brand
    • Services
    • Contacts
  • Products
    • Swap
    • Analytics
    • Signals
  • Oracle
  • Tutorials
    • Swap
      • How to login?
      • How to swap?
      • How to add liquidity?
      • How to remove liquidity?
      • How to get pools info?
  • Developers
    • Smart Contracts
      • Swap
        • Tables
        • Actions
        • Examples
          • How to open liquidity account?
          • How to close liquidity account?
          • How to add liquidity?
          • How to remove liquidity?
          • How to swap by market price?
          • How to swap tokens with min out required amount?
          • How to cross-swap tokens by market price?
          • How to cross-swap tokens with min out required amount?
    • SDK
    • API
Powered by GitBook
On this page
  • What is Oracle?
  • How oracle works?
  • Examples:

Was this helpful?

Oracle

What is Oracle?

Oracles play a foundational role in the creation of the verifiable web, connecting blockchains that would otherwise be isolated to offchain data and compute, and enabling interoperability between blockchains.

How oracle works?

Oracle provide tokens price from major liquidity pools(AMM) sorted by highest liquidity by cron job every hour. Data available from A-DEX GraphQL API via REST or WebSocket.

Supported networks:

  • ✅ EOS

  • ✅ XPR

  • ✅ WAX

Supported DEXes:

  • ✅ Alcor Swap

  • ✅ A-DEX Swap

  • ✅ Proton Swap

  • ✅ Taco Swap

  • ✅ PayCash Swap

  • ✅ DefiBox

Examples:

curl -X POST https://wax.a-dex.io/v1/graphql \
-H "Content-Type: application/json" \
-d '{
    "query": "query MyQuery { adex_oracle { contract precision price_amount price_contract price_precision price_symbol_code sha256 symbol_code updated_at } }"
}'
const query = `
   query MyQuery {
  adex_oracle {
    contract
    precision
    price_amount
    price_contract
    price_precision
    price_symbol_code
    sha256
    symbol_code
    updated_at
  }
}`;
    
const response = await fetch('https://wax.a-dex.io/v1/graphql', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({ query })
});

const responseData = await response.json();
PreviousSignalsNextSwap

Last updated 2 months ago

Was this helpful?