Skip to main content

Candlestick Channel

Get the candlestick (K-line) data

Supported Intervals

ChannelInterval
candle1m1 minute
candle5m5 minutes
candle15m15 minutes
candle30m30 minutes
candle1h1 hour
candle4h4 hours
candle6h6 hours
candle12h12 hours
candle1d1 day
candle1w1 week
candle1M1 month

Request Parameters

ParameterTypeRequiredDescription
opstringYesOperation, subscribe unsubscribe
argslistYesList of channels to request subscription
> instTypestringYesProduct type
> channelstringYesChannel name (candle1m, candle5m, etc.)
> instIdstringYesProduct ID E.g. BTCUSDT

Request Example

{
"op": "subscribe",
"args": [
{
"instType": "USDT-FUTURES",
"channel": "candle1h",
"instId": "BTCUSDT"
}
]
}

Response Parameters

ParameterTypeDescription
eventstringEvent
argobjectSubscribed channels
> instTypestringProduct type
> channelstringChannel name
> instIdstringProduct ID E.g. BTCUSDT
codestringError code
msgstringError message

Response Example

{
"event": "subscribe",
"arg": {
"instType": "USDT-FUTURES",
"channel": "candle1h",
"instId": "BTCUSDT"
}
}

Push Parameters

ParameterTypeDescription
actionstringPush data action
argobjectChannels with successful subscription
> instTypestringProduct type
> channelstringChannel name
> instIdstringProduct ID E.g. BTCUSDT
datalistCandlestick data array
> [0]numberOpen time (timestamp in ms)
> [1]stringOpen price
> [2]stringHigh price
> [3]stringLow price
> [4]stringClose price
> [5]stringVolume (base currency)
> [6]stringQuote asset volume
tsnumberPush timestamp

Push Data

{
"action": "snapshot",
"arg": {
"instType": "USDT-FUTURES",
"channel": "candle1h",
"instId": "BTCUSDT"
},
"data": [
[1695715200000, "26900.0", "27100.0", "26850.0", "27000.5", "1250.5", "33751350.25"],
[1695711600000, "26800.0", "26950.0", "26750.0", "26900.0", "980.3", "26370060.90"],
[1695708000000, "26750.0", "26850.0", "26700.0", "26800.0", "850.2", "22774360.00"]
],
"ts": 1695716761589
}