# 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
