# APIs

## Get Tickers

<mark style="color:green;">`GET`</mark> `/v1/tickers`

provides 24-hour pricing and volume information on each market pair available on an exchange.

**Headers**

| Name         | Value              |
| ------------ | ------------------ |
| Content-Type | `application/json` |

**Response**

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

```json
[
    {
        "ticker_id": "WAVAX_USDC",
        "base_currency": "WAVAX",
        "target_currency": "USDC",
        "pool_id": "0x564b7b1262256A1B1C5dEA332bBF8b02A6a8E294",
        "last_price": "37.44822332076433549014",
        "base_volume": "56602187569191098140",
        "target_volume": "56602187569191098140",
        "liquidity_in_usd": "6010.00",
        "bid": "37.01665891326351628951",
        "ask": "37.44822332076433549014",
        "high": "37.448223320764335",
        "low": "37.01665891326352"
    }, 
    {
        "ticker_id": "CARL_WAVAX",
        "base_currency": "CARL",
        "target_currency": "WAVAX",
        "pool_id": "0x564b7b1262256A1B1C5dEA332bBF8b02A6a8E294",
        "last_price": "4.96790759118e-9",
        "base_volume": "57464149811728661654",
        "target_volume": "57464149811728661654",
        "liquidity_in_usd": "6010.00",
        "bid": "5.02706256286e-9",
        "ask": "4.96790759118e-9",
        "high": "5.02706256286e-9",
        "low": "4.96790759118e-9"
    },
]
```

{% endtab %}

{% tab title="400" %}

```json
{
  "error": "Invalid request"
}
```

{% endtab %}
{% endtabs %}

## Get Historical Data

<mark style="color:green;">`GET`</mark> `/v1/historical`

returns data on historical completed trades for a given market pair.

**Headers**

| Name         | Value              |
| ------------ | ------------------ |
| Content-Type | `application/json` |

**Parameters**

| ticker\_id  | string  | Mandatory   | A pair such as "AVAX\_USDC", with delimiter between                                                    |
| ----------- | ------- | ----------- | ------------------------------------------------------------------------------------------------------ |
| type        | string  | Mandatory   | To indicate nature of trade - *buy*/*sell*                                                             |
| limit       | integer | Recommended | Number of historical trades to retrieve from time of query. \[0, 200, 500...]. 0 returns full history. |
| start\_time | date    | Recommended | Start time from which to query historical trades from                                                  |
| end\_time   | date    | Recommended | End time for historical trades query                                                                   |

**Response**

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

```json
[
    {
        "trade_id": 262,
        "price": "34.31795211475100926756",
        "base_volume": "150000000000000000",
        "target_volume": "681955410942937777072492189",
        "trade_timestamp": 1717180236250,
        "type": "buy"
    },
    {
        "trade_id": 261,
        "price": "34.37684110577885566875",
        "base_volume": "300000000000000000",
        "target_volume": "1363849421338671808388454352",
        "trade_timestamp": 1717122346487,
        "type": "buy"
    },
]
```

{% endtab %}

{% tab title="400" %}

```json
{
  "error": "Invalid request"
}
```

{% 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.datnoid.com/developers/apis.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.
