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>
| Parameter | Description |
|---|---|
| interval | Interval |
| symbol | indicates 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
| Name | Type | Description |
|---|---|---|
| e | STRING | Topic |
| E | LONG | event time |
| s | STRING | trading pair |
| t | LONG | Kline start time |
| T | LONG | Kline end time |
| s | STRING | trading pair |
| i | STRING | Kline interval |
| f | LONG | First trade ID during this Kline period |
| L | LONG | Last trade ID during this Kline period |
| o | STRING | First trade price during this Kline period |
| c | STRING | Last trade price during this Kline period |
| h | STRING | Highest trade price during this Kline period |
| l | STRING | Lowest trade price during this Kline period |
| v | STRING | Volume during this Kline period |
| q | STRING | Quote volume during this Kline period |
| n | LONG | Number of trades during this Kline period |
| x | BOOLEAN | Whether 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: