> For the complete documentation index, see [llms.txt](https://ajaib.gitbook.io/ajaib-exchange-open-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ajaib.gitbook.io/ajaib-exchange-open-api/api-references/editor/kline-candlestick.md).

# Kline / Candlestick

## Retrieve kline / candlestick price

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

**Functionality:** Retrieves kline / candlestick bars for a symbol. Klines are uniquely identified by their open time.

**Authentication**: Required

#### URL Parameters

<table><thead><tr><th width="182">Name</th><th width="107">Type</th><th width="123" data-type="checkbox">Mandatory</th><th>Description</th></tr></thead><tbody><tr><td>symbol</td><td>string</td><td>true</td><td>Symbol of trading pair. Refer to <a href="https://ajaib.gitbook.io/coin-exchange-open-api/getting-started/quickstart#:~:text=Asset%20Symbols%20/%20Trading%20Pairs">this</a>.</td></tr><tr><td>interval</td><td>string</td><td>true</td><td>Kline interval. Refer to <a href="https://ajaib.gitbook.io/coin-exchange-open-api/getting-started/quickstart#:~:text=Time%20Intervals%20(Candlestick%20/%20Kline)">this</a>.</td></tr><tr><td>startTime</td><td>long</td><td>false</td><td></td></tr><tr><td>endTime</td><td>long</td><td>false</td><td></td></tr><tr><td>limit</td><td>long</td><td>false</td><td>Default 500, max 1000</td></tr><tr><td>timestamp</td><td>long</td><td>true</td><td>Timestamp when client sending request.</td></tr><tr><td>recvWindow</td><td>long</td><td>false</td><td>Number of milliseconds after timestamp the request is valid for. Refer to <a href="https://ajaib.gitbook.io/ajaib-exchange-open-api/getting-started/timing-security">this</a>.</td></tr></tbody></table>

**Number of Kline prices that will be returned per interval:**

<table><thead><tr><th width="216.58984375">Interval</th></tr></thead><tbody><tr><td>1m</td></tr><tr><td>15m</td></tr><tr><td>1h</td></tr><tr><td>4h</td></tr><tr><td>1d</td></tr><tr><td>1w</td></tr></tbody></table>

**Response Body**

<table><thead><tr><th width="186">Index</th><th width="97">Type</th><th>Description</th></tr></thead><tbody><tr><td>0</td><td>long</td><td>Kline start timestamp. Using UTC timezone in unix epoch.</td></tr><tr><td>1</td><td>string</td><td>Kline open price.</td></tr><tr><td>2</td><td>string</td><td>Kline high price.</td></tr><tr><td>3</td><td>string</td><td>Kline low price.</td></tr><tr><td>4</td><td>string</td><td>Kline close price.</td></tr><tr><td>5</td><td>string</td><td>Kline volume.</td></tr><tr><td>6</td><td>long</td><td>Kline end timestamp. Using UTC timezone in unix epoch.</td></tr></tbody></table>

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

```javascript
[
  [
    1499040000000,
    "0.01634790",
    "0.80000000",
    "0.01575800",
    "0.01577100",
    "148976.11427815",
    1499644799999
  ]
]
```

{% endtab %}

{% tab title="401 Permission denied" %}

```
{
  "code": -1121,
  "msg": "Invalid symbol."
}
```

{% endtab %}
{% endtabs %}
