# 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
* ✅ WAX
* ✅ XPR

Supported DEXes:

* ✅ Alcor Swap
* ✅ A-DEX Swap
* ✅ Proton Swap
* ✅ Taco Swap
* ✅ PayCash Swap
* ✅ DefiBox

## Examples:

{% tabs %}
{% tab title="cURL" %}

<pre class="language-javascript"><code class="lang-javascript"><strong>curl -X POST https://wax.a-dex.io/v1/graphql \
</strong>-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 } }"
}'
</code></pre>

{% endtab %}

{% tab title="Javascript" %}

```python
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();
```

{% endtab %}
{% endtabs %}
