# 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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.a-dex.io/oracle.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
