Page cover
For the complete documentation index, see llms.txt. This page is also available as Markdown.

WebSocket (market streams)

Spot: wss://ws.koinbay.com/kline-api/ws

Futures: wss://futuresws.koinbay.com/kline-api/ws.

Transport is binary, gzip-compressed (except ping/pong text frames).

Channel symbol format

  • Spot: REST symbol as-is, lowercase — 'btcusdt' -> market_btcusdt_depth_step0.

  • Futures: {type}_{pair} — lowercase margin-type prefix + '_' + stripped pair. E-BTC-USDT -> 'e_btcusdt'; S-BTC-USDT -> 's_btcusdt'. So market_e_btcusdt_depth_step0.

Heartbeat

Server sends ping; client must reply pong or be disconnected.

{"ping": 1535975085052}   ->   {"pong": 1535975085052}

Subscribe frame

{
  "event": "sub|unsub|req",
  "params": { "channel": "...", "cb_id": "1" }
}

Channels

Channel
Description
Notes (

market_$symbol_depth_step0

Order book depth

tick has 'asks' and 'buys' (NOT 'bids' like REST). Each level [price, volume] as numbers.

market_$symbol_trade_ticker

Real-time trades

tick.data[] of trades; each has amount, ds (datetime str), price, side, ts, vol.

market_$symbol_kline_<interval>

Kline

Adds amount, ds (datetime str),

market_$symbol_ticker

24h ticker

Spot adds bidPrice/bidVolume/askPrice/askVolume; futures tick is only vol/rose/open/low/high/close/amount (no bid/ask).

mark_price_$symbol

Futures mark price + funding

Futures-only; NOT 'market_' prefixed. All values strings. Has nextSettlementTime (REST /index does not).

Last updated

Was this helpful?