# K-line/Candlestick data

Retrieve K-line/Candlestick data for the specified by making use of this endpoint. You can define the limit, period, start time and end time for the same.

### Endpoint <a href="#endpoint" id="endpoint"></a>

```bash
GET /sapi/v1/market/kline/
```

### Query Params <a href="#query-params" id="query-params"></a>

| Field       | Type    | Mandatory | Description                                                                          |
| ----------- | ------- | --------- | ------------------------------------------------------------------------------------ |
| market      | STRING  | YES       |                                                                                      |
| limit       | INTEGER | NO        | default 30                                                                           |
| period      | INTEGER | NO        | default 1, allowed values \[1, 5, 15, 30, 60, 120, 240, 360, 720, 1440, 4320, 10080] |
| start\_time | INTEGER | NO        |                                                                                      |
| end\_time   | INTEGER | NO        |                                                                                      |

#### Example:

```bash
{baseurl}/sapi/v1/market/kline/?market=ethusdc&limit=100&period=240&start_time=1639468412end_time=1660636472
```

#### Response <a href="#response" id="response"></a>

```json
{
  "status": "success",
  "message": "Retrieval Successful",
  "payload": [
    [1660634520, 1697, 1697, 1697, 1697, 0],
    [1660634520, 1697, 1697, 1697, 1697, 0],
    [1660634520, 1697, 1697, 1697, 1697, 0]
  ]
}
```

> **Note:** Kline payload item as array of numbers
>
> Example: \[1660634520, 0.0839, 0.0921, 0.0781, 0.0845, 0.5895]
>
> 1. Timestamp.
> 2. Open price.
> 3. Max price.
> 4. Min price.
> 5. Last price.
> 6. Period volume


---

# 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.tanx.fi/tech/api-documentation/market/k-line-candlestick-data.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.
