Skip to main content

Kline

Covers: USDT Perpetual, USDC Perpetual, Inverse Perpetual, Inverse Future

Interval supported:

  • 1 3 5 15 30 60 120 240 360 720minute
  • Dday
  • Wweek
  • Mmonth
info

If confirm is true, then the data is a final tick for this interval. Otherwise, it is a snapshot.

Push frequency: 1-60s

Topic: kline.{interval}.{symbol}

Response Parameters

ParameterTypeComments
topicstringTopic name
typestringMessage type. snapshot
tsnumberThe timestamp (ms) that system generates the data.
dataarrayObject
> startnumberCandle start timestamp (ms)
> endnumberCandle end timestamp (ms)
> intervalstringInterval
> openstringOpen price
> closestringClose price. If not closed, it is last price
> highstringHighest price
> lowstringLowest price
> volumestringTrading volume
> turnoverstringTrading turnover
> confirmbooleantrue: last tick. false: this is snapshot data
> timestampnumberThe timestamp (ms) of the last matched order in the candle

Subscription Example

{
"op": "subscribe",
"args": [
"kline.5.BTCPERP"
],
"req_id": "test" // optional
}

Stream Example

{
"topic": "kline.5.BTCPERP",
"data": [
{
"start": 1671187800000,
"end": 1671188099999,
"interval": "5",
"open": "16991",
"close": "16980.5",
"high": "16991",
"low": "16980.5",
"volume": "2.501",
"turnover": "42493.2305",
"confirm": false,
"timestamp": 1671187815755
}
],
"ts": 1671187815755,
"type": "snapshot"
}