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 |
| candle3D | 3 days |
| candle1W | 1 week |
| candle1M | 1 month |
| candle6Hutc | 6 hours UTC |
| candle12Hutc | 12 hours UTC |
| candle1Dutc | 1 day UTC |
| candle3Dutc | 3 days UTC |
| candle1Wutc | 1 week UTC |
| candle1Mutc | 1 month UTC |
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: SPOT |
| > channel | string | Yes | Channel name (candle1m, candle5m, etc.) |
| > instId | string | Yes | Product ID E.g. BTCUSDT |
Request Example
{
"op": "subscribe",
"args": [
{
"instType": "SPOT",
"channel": "candle1H",
"instId": "BTCUSDT"
}
]
}
Response Example
{
"event": "subscribe",
"arg": {
"instType": "SPOT",
"channel": "candle1H",
"instId": "BTCUSDT"
}
}
Push Parameters
| Parameter | Type | Description |
|---|---|---|
| action | string | Push data action: snapshot / update |
| arg | object | Channels with successful subscription |
| > instType | string | Product type: SPOT |
| > channel | string | Channel name |
| > instId | string | Product ID E.g. BTCUSDT |
| data | list | Candlestick data array |
| > [0] | string | 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": "SPOT",
"channel": "candle1H",
"instId": "BTCUSDT"
},
"data": [
["1695715200000", "26900", "27100", "26850", "27000.5", "1250.5000", "33751350.2500"],
["1695711600000", "26800", "26950", "26750", "26900", "980.3000", "26370060.9000"],
["1695708000000", "26750", "26850", "26700", "26800", "850.2000", "22774360.0000"]
],
"ts": 1695716761589
}