> For the complete documentation index, see [llms.txt](https://docs.kaiko.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kaiko.com/rest-api/general/readme.md).

# Introduction

### Welcome to the Kaiko REST API documentation

This documentation covers two versions of the Kaiko REST API: the API and the New API. Both authenticate with the same Kaiko API key, but the New API has some structural improvements.

### URL format

New API, with parameters in the query string:

```
https://api.kaiko.io/market-data/trades/batch-ohlcv?exchange=cbse&class=spot&instrument=btc-usd,eth-usd&interval=1h
```

API, with the exchange, instrument class and instrument in the path:

```
https://us.market-api.kaiko.io/v3/data/trades.v1/exchanges/usp3/spot/usdc-weth/trades?start_time=2022-11-01T00:00:00.000Z
```

### Which API to use

Use the **New API** wherever an endpoint is available on it, and the **API** for endpoints that aren't on the New API yet. Each page is tagged with the version it covers.

### Get started

* Make your first request with [Getting started - New API](https://docs.kaiko.com/rest-api/general/getting-started-new-api.md).
* For endpoints only on the API, see [Getting started](https://docs.kaiko.com/rest-api/general/getting-started.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.kaiko.com/rest-api/general/readme.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
