Klines (OHLCV)
GETπ Public
Retrieve kline (OHLCV) data for a symbol.
For the start and end parameter combinations:
| start | end | Behavior |
|---|---|---|
| not set | not set | Return recent limit data points (count backward). |
| set | not set | Return limit data points from start (count forward). |
| not set | set | Return limit data points from end (count backward). |
| set | set | If start/end and resolution would yield more than limit data points, the request is rejected. Otherwise return up to limit points from end to start (count backward). |
Request Parametersβ
| Name | Type | Required | Description |
|---|---|---|---|
| symbol | String | Yes | Symbol |
| resolution | String | Yes | Candle size in minutes: 1 (1m), 5 (5m), 15 (15m), 30 (30m), 60 (1h), 240 (4h), 360 (6h), 1440 (1d), 10080 (1w), 43200 (1mo). |
| start | Long | No | Start timestamp (seconds) |
| end | Long | No | End timestamp (seconds) |
| limit | Integer | No | The count of klines |
Response Contentβ
Successful response
example
GET
https://api.btse.com/public-api/market/v1/klinesResponse
{
"success": true,
"code": 1,
"msg": "Success",
"time": 1624989977940,
"data": [
[
"1667191500",
"20554.9",
"20581.2",
"20542.2",
"20565.9",
"2824854.568855"
],
[
"1667192400",
"20565.4",
"20594.5",
"20466.6",
"20585.9",
"3283055.501333"
]
]
}