Candlestick Channel
Get the candlestick (K-line) data
Supported Intervals
| Channel | Interval |
|---|---|
| candle1m | 1 minute |
| candle5m | 5 minutes |
| candle15m | 15 minutes |
| candle30m | 30 minutes |
| candle1h | 1 hour |
| candle4h | 4 hours |
| candle6h | 6 hours |
| candle12h | 12 hours |
| candle1d | 1 day |
| candle1w | 1 week |
| candle1M | 1 month |
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| op | string | Yes | Operation, subscribe unsubscribe |
| args | list | Yes | List of channels to request subscription |
| > instType | string | Yes | Product type |
| > channel | string | Yes | Channel name (candle1m, candle5m, etc.) |
| > instId | string | Yes | Product ID E.g. BTCUSDT |
Request Example
{
"op": "subscribe",
"args": [
{
"instType": "USDT-FUTURES",
"channel": "candle1h",
"instId": "BTCUSDT"
}
]
}
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| event | string | Event |
| arg | object | Subscribed channels |
| > instType | string | Product type |
| > channel | string | Channel name |
| > instId | string | Product ID E.g. BTCUSDT |
| code | string | Error code |
| msg | string | Error message |
Response Example
{
"event": "subscribe",
"arg": {
"instType": "USDT-FUTURES",
"channel": "candle1h",
"instId": "BTCUSDT"
}
}
Push Parameters
| Parameter | Type | Description |
|---|---|---|
| action | string | Push data action |
| arg | object | Channels with successful subscription |
| > instType | string | Product type |
| > channel | string | Channel name |
| > instId | string | Product ID E.g. BTCUSDT |
| data | list | Candlestick data array |
| > [0] | number | Open time (timestamp in ms) |
| > [1] | string | Open price |
| > [2] | string | High price |
| > [3] | string | Low price |
| > [4] | string | Close price |
| > [5] | string | Volume (base currency) |
| > [6] | string | Quote asset volume |
| ts | number | Push 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
}