# Exchange trading pair codes (instruments)

{% hint style="info" %}
You can explore all exchanges, assets, and get codes for them using our [instrument explorer](https://instruments.kaiko.com/#/instruments). Alternatively, if you want to obtain the data in a more programmatic way, use this endpoint.
{% endhint %}

### What is this endpoint for?

This endpoint retrieves information on instruments (exchange trading pairs) and their associated codes.

### Endpoint

```
https://reference-data-api.kaiko.io/v1/instruments
```

### Parameters

| Field                   | Required? | Description                                                                                                      |
| ----------------------- | --------- | ---------------------------------------------------------------------------------------------------------------- |
| `exchange_code`         | No        | Exchange `code`. See [Exchange codes](/rest-api/data-feeds/reference-data/basic-tier/exchange-codes.md)          |
| `base_asset`            | No        | The desired base asset `code`. See [Asset codes](/rest-api/data-feeds/reference-data/basic-tier/asset-codes.md)  |
| `quote_asset`           | No        | The desired quote asset `code`. See [Asset codes](/rest-api/data-feeds/reference-data/basic-tier/asset-codes.md) |
| `code`                  | No        | Kaiko identifier for the instrument. Always `base_asset-quote_asset` for `spot` instruments.                     |
| `kaiko_legacy_symbol`   | No        | Kaiko legacy instrument symbol.                                                                                  |
| `class`                 | No        | `spot`, `future`, `perpetual-future`, `option`, etc.                                                             |
| `base_asset_class`      | No        | Base asset `class`.                                                                                              |
| `quote_asset_class`     | No        | Quote asset `class`.                                                                                             |
| `trade_start_timestamp` | No        | Starting time in ISO 8601 (inclusive).                                                                           |
| `trade_end_timestamp`   | No        | Ending time in ISO 8601 (inclusive). Can also use "ongoing" to get ongoing instruments.                          |
| `trade_count_min`       | No        | Minimum number of trades.                                                                                        |
| `trade_count_max`       | No        | Maximum number of trades.                                                                                        |
| `with_list_pools`       | No        | `true` or `false`. For pairs traded on DEXs, provides the list of underlying pools to each instrument.           |
| `continuation_token`    | No        | See [Pagination](/rest-api/general/getting-started/pagination.md)                                                |
| `limit`                 | No        | Maximum number of records to return in one response                                                              |
| `orderBy`               | No        | Order results by a specific field. See below for all possible values.                                            |
| `order`                 | No        | Return the data in ascending (1) or descending (-1) order                                                        |
| `blockchain`            | No        | Filter on a specific blockchain for on-chain instruments.                                                        |

{% hint style="info" %}
**You can order your request by:**\
exchange\_code, class, kaiko\_legacy\_symbol, trade\_start\_timestamp, trade\_end\_timestamp, trade\_count, base\_asset, quote\_asset, code, trade\_count\_min, trade\_count\_max

\
**Repeated parameters**\
All parameters, except for `trade_count_min/max`, `trade_start/end_timestamp` can be repeated in the URL to filter. For example to get instruments for coinbase & deribit, the request would be `instruments?exchange_code=cbse&exchange_code=drbt`
{% endhint %}

### Fields

| Field                        | Description                                                                                                                                                                                                         |
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `base_asset`                 | Base asset.                                                                                                                                                                                                         |
| `class`                      | `spot`, `future`, `perpetual-future`,...                                                                                                                                                                            |
| `code`                       | Kaiko identifier for the instrument. Always `base_asset-quote_asset` for `spot` instruments.                                                                                                                        |
| `exchange_code`              | Exchange code. See [Exchange codes](/rest-api/data-feeds/reference-data/basic-tier/exchange-codes.md)                                                                                                               |
| `exchange_pair_code`         | <p>Identifier for the instrument used by the exchange.<br><br>For perpetual futures pairs, the code may differ from the exchange's and include a <code>\_perp</code> suffix (e.g., <code>btcusdt\_perp)</code>.</p> |
| `kaiko_legacy_exchange_slug` | Legacy slug for the exchange. See [Broken mention](broken://pages/vGAuhofqiYGAJCYlarFi)                                                                                                                             |
| `kaiko_legacy_symbol`        | Identifier used in past deliveries of historical market data and Data Feed.                                                                                                                                         |
| `quote_asset`                | Quote asset                                                                                                                                                                                                         |
| `trade_start_time`           | Time of the first available trade in Kaiko's data set.                                                                                                                                                              |
| `trade_start_timestamp`      | Timestamp of the first available trade in Kaiko's data set.                                                                                                                                                         |
| `trade_end_time`             | Time of the last available trade in Kaiko's data set. `null` if instrument is still active                                                                                                                          |
| `trade_end_timestamp`        | Timestamp of the last available trade in Kaiko's data set. `null` if instrument is still active                                                                                                                     |
| `trade_count`                | The total number of trades available through Kaiko Rest API and Kaiko Stream. For active pairs, this is an approximation.                                                                                           |
| `trade_compressed_size`      | Approximate size in bytes of all available trades in Kaiko Stream.                                                                                                                                                  |
| `list_pools`                 | The list of the underlying pools to each instrument. (Only when arg `with_list_pools=true` is provided).                                                                                                            |

{% hint style="warning" %}
Some exchanges may refer to "base" and "quote" currencies differently.

* When we report the "price" of a trade, we're referring to the "base\_asset" price as reported by the exchange.
* When we report the "volume" involved in a trade, we're referring to volume od the "base\_asset" as reported by the exchange.

Note: some exchanges reverse the ordering of base/quote in their pair codes.&#x20;
{% endhint %}

### Request example

{% tabs %}
{% tab title="cURL" %}
{% code overflow="wrap" %}

```url
curl --compressed -H 'Accept: application/json' 'https://reference-data-api.kaiko.io/v1/instruments'
```

{% endcode %}
{% endtab %}
{% endtabs %}

### Response example

{% tabs %}
{% tab title="JSON" %}
{% code fullWidth="false" %}

```json
{
  "result": "success",
  "data": [
    {
      "kaiko_legacy_exchange_slug": "bf",
      "trade_start_time": "2017-08-09T23:36:33.0000000Z",
      "trade_end_time": null,
      "code": "xmr-btc",
      "exchange_code": "bfnx",
      "exchange_pair_code": "XMRBTC",
      "base_asset": "xmr",
      "quote_asset": "btc",
      "kaiko_legacy_symbol": "xmrbtc",
      "class": "spot",
      "trade_start_timestamp": 1502321793000,
      "trade_end_timestamp": null,
      "trade_count": 2439870,
      "trade_compressed_size": 35037071
    },
    {
      "kaiko_legacy_exchange_slug": "kk",
      "trade_start_time": "2017-08-08T20:10:04.0000000Z",
      "trade_end_time": null,
      "code": "gno-eth",
      "exchange_code": "krkn",
      "exchange_pair_code": "GNOETH",
      "base_asset": "gno",
      "quote_asset": "eth",
      "kaiko_legacy_symbol": "gnoeth",
      "class": "spot",
      "trade_start_timestamp": 1502223004345,
      "trade_end_timestamp": null,
      "trade_count": 380822,
      "trade_compressed_size": 21119034
    },
    /* ... */
  ]
}
```

{% endcode %}
{% 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.kaiko.com/rest-api/data-feeds/reference-data/basic-tier/exchange-trading-pair-codes-instruments.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.
