Skip to Content

Kline (UTC+0 Timezone)

Pushes updates per second for the requested kline type (latest kline). This update is based on UTC+0 timezone.

Subscribe URL

wss://stream.bittap.com/endpoint?format=JSON

Subscribe Parameters

Stream name: f_kline_<interval>@<symbol>

ParameterDescription
intervalInterval
symbolindicates the trading pair

Subscribing to Kline requires providing an interval parameter, shortest is minute line, longest is monthly line. The following intervals are supported: m -> minute; h -> hour; d -> day; w -> week; M -> month

  • 1m
  • 3m
  • 5m
  • 15m
  • 30m
  • 1h
  • 2h
  • 4h
  • 6h
  • 8h
  • 12h
  • 1d
  • 3d
  • 1w
  • 1M

Data Update

NameTypeDescription
eSTRINGTopic
ELONGevent time
sSTRINGtrading pair
tLONGKline start time
TLONGKline end time
sSTRINGtrading pair
iSTRINGKline interval
fLONGFirst trade ID during this Kline period
LLONGLast trade ID during this Kline period
oSTRINGFirst trade price during this Kline period
cSTRINGLast trade price during this Kline period
hSTRINGHighest trade price during this Kline period
lSTRINGLowest trade price during this Kline period
vSTRINGVolume during this Kline period
qSTRINGQuote volume during this Kline period
nLONGNumber of trades during this Kline period
xBOOLEANWhether this Kline is closed (whether next Kline has started)

Subscribe Example

{ "method": "SUBSCRIBE", "params": [ "f_kline_15m@BTC-USDT-M" ], "id": "mbnmv2p" }

Subscribe Success Example

{ "code": 0, // 0 means success, non-0 means failure "msg":"", // failure reason, null when success "topic": ["", ""], // topics that failed to subscribe "id": 1 }

Data Update Example

{ "e": "f_kline_15m", // topic "E": 1762218910503, // event time "s": "BTC-USDT-M", // trading pair "k": { "t": 1762218900000, // Kline start time "T": 1762219799999, // Kline end time "s": "BTC-USDT-M", // trading pair "i": "15m", // Kline interval "f": 738449604345856, // First trade ID during this Kline period "L": 738450289983488, // Last trade ID during this Kline period "o": "106580.8", // First trade price during this Kline period "c": "106610.66", // Last trade price during this Kline period "h": "106624.14", // Highest trade price during this Kline period "l": "106580.8", // Lowest trade price during this Kline period "v": "0.16059", // Volume during this Kline period "q": "17121.32099738", // Quote volume during this Kline period "n": 5, // Number of trades during this Kline period "x": false // Whether this Kline is closed (whether next Kline has started) } }

Unsubscribe Example

{ "method": "UNSUBSCRIBE", "params": [ "f_kline_15m@BTC-USDT-M" ], "id": "mbnmv2p" }

Error Codes

No information available

Code Example

Last updated on: