Open APIs
Get Kline Data
Code
Request Body
| Field | Type | Mandatory | Remarks |
|---|---|---|---|
| cryptoCurrency | string | Yes | Cryptocurrency trading pair symbol, e.g., BTC, ETH |
| interval | string | Yes | Kline interval (see supported intervals below) |
| startTime | long | Yes | Start time in milliseconds (UTC) |
| endTime | long | Yes | End time in milliseconds (UTC) |
Supported Kline Intervals
| Interval | Value |
|---|---|
| 3 minutes | 3m |
| 1 hour | 1h |
| 1 day | 1d |
Example
Code
Code
Response Body
The response is an array of kline data. Each kline is represented as an array of values:
| Index | Type | Remarks |
|---|---|---|
| 0 | long | Kline open time in milliseconds |
| 1 | string | Opening price |
| 2 | string | Highest price during the interval |
| 3 | string | Lowest price during the interval |
| 4 | string | Closing price |
| 5 | string | Trading volume (base asset) |
| 6 | long | Kline close time in milliseconds |
| 7 | string | Trading volume (quote asset) |
| 8 | int | Number of trades during the interval |
| 9 | string | Taker buy volume (base asset) |
| 10 | string | Taker buy volume (quote asset) |
| 11 | string | Unused field, can be ignored |
Example
Code
Notes
startTimeandendTimeare required and must be provided in milliseconds (UTC).- Interval values are case-sensitive.
- Klines are uniquely identified by their open time.
Was this page helpful?
Last modified on