Skip to main content

KLines

Historical OHLCV (open / high / low / close / volume) candles for a futures symbol.

HTTP

MethodGET
Endpoint/trade/api/v2/futures/klines
Rate limit30 requests per 60 seconds

Request Parameters

ParameterTypeMandatoryDescription
exchangestringYesEXCHANGE_2.
symbolstringYesSymbol, e.g. BTCUSDT.
intervalstringYesCandle duration in minutes. One of '1', '5', '15', '30', '60', '120', '240', '360', '720', '1440'.
start_timeintegerNoRange start (Unix ms).
end_timeintegerNoRange end (Unix ms).
limitintegerNoNumber of candles to return.

Example

import requests

headers, path = sign_request("GET", "/trade/api/v2/futures/klines", params={
"symbol": "btcusdt",
"exchange": "EXCHANGE_2",
"interval": "1",
"start_time": "1731555003792",
"end_time": "1732555003792",
"limit": 10,
})
response = requests.get(BASE_URL + path, headers=headers)
print(response.json())

Response

{
"data": [
{
"o": "95500.100000000000",
"h": "95875.000000000000",
"l": "94707.000000000000",
"c": "95524.000000000000",
"symbol": "BTCUSDT",
"close_time": "1732795200000",
"volume": "22426.480000000000",
"start_time": "1732773600000",
"interval": "360"
}
]
}

Response Parameters

data is an array of candles:

FieldTypeDescription
symbolstringSymbol.
intervalstringEcho of the requested interval, in minutes.
ostringOpen price.
hstringHigh price.
lstringLow price.
cstringClose price.
volumestringTrade volume in base asset over the candle period.
start_timestringCandle start (Unix ms).
close_timestringCandle close (Unix ms).

For real-time candle pushes, use the KLines WebSocket.