# Oracles

Provides connectivity across the various **Oracles** available on the EVM and Non-EVM chains.&#x20;

Following are the common functions implemented for all the Oracle protocols:-

| Name               | Type | Description                                                                   |
| ------------------ | ---- | ----------------------------------------------------------------------------- |
| getprice           | Read | Get the Price(in USDT) of a token on either all or the specified protocol.    |
| getsupportedtokens | Read | Get the list of supported tokens on Expand.network, for the specified oracle. |

***

### /getprice

## Get the Price(in USDT) of a token.

<mark style="color:blue;">`GET`</mark> `https://api.expand.network/oracle/getprice`

#### Query Parameters

| Name                                    | Type   | Description                                                                |
| --------------------------------------- | ------ | -------------------------------------------------------------------------- |
| asset<mark style="color:red;">\*</mark> | String | Name of the token, whose price is to be fetched.                           |
| oracleId                                | String | Refer to the [Oracle IDs](/ids/oracle-ids.md) page for details.            |
| oracleName                              | String | Refer to the [Oracle IDs](/ids/oracle-ids.md) page for details.            |
| timestamp                               | String | Specify the particular point in time for which we have to fetch the price. |

{% tabs %}
{% tab title="Sample Request" %}

```url
https://api.expand.network/oracle/getprice?asset=usdc&timestamp=1714030330
```

{% endtab %}

{% tab title="Sample Response" %}

```json
{
    "status": 200,
    "msg": "success",
    "data": {
        "ChainLink": {
            "priceFeedAddress": "0x8fFfFfd4AfB6115b954Bd326cbe7B4BA576818f6",
            "roundId": "36893488147419104863",
            "answer": "0.99994098",
            "startedAt": "1713945803",
            "updatedAt": "1713945803",
            "answeredInRound": "36893488147419104863"
        },
        "Pyth": {
            "priceFeedAddress": "eaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a",
            "roundId": null,
            "answer": "1.000125",
            "startedAt": null,
            "updatedAt": null,
            "answeredInRound": null
        },
        "averagePrice": "1.00003"
    }
}
```

{% 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.expand.network/integrations/oracles.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.
