book endpoints, while every other live feed uses nonbook endpoints.
When to use WebSocket vs REST
| REST API | WebSocket API | |
|---|---|---|
| Best for | Historical queries, one-off lookups | Real-time dashboards, trading bots, live feeds |
| Data delivery | Request-response | Server pushes updates as they occur |
| Connection | New HTTP request per query | JSON WebSocket connection(s) by endpoint family |
| Latency | Higher (per-request overhead) | Lower (no connection overhead per message) |
Available channels
| Channel | Description | Key parameters |
|---|---|---|
TRADE | Individual trades | — |
TRADE_AGG | Aggregated trades (OHLCV batches) | batchInterval |
BLOCK_BOOK_SNAPSHOT | Orderbook depth snapshots | blockSize, maxDepth, updateFrequency |
LIQUIDATION | Individual liquidation events | — |
FUNDING_RATE | Funding rate updates | — |
OPEN_INTEREST | Open interest updates | — |
VOLUME_PROFILE_AGG | Real-time volume profile | groupByType |
Endpoint selection
Choose the endpoint family that matches the channels you want:| Endpoint family | Channels | Singapore | Europe |
|---|---|---|---|
book | BLOCK_BOOK_SNAPSHOT | wss://ap-sin3.ws.api.kiyotaka.ai/ws | wss://eu-de3.ws.api.kiyotaka.ai/ws |
nonbook | TRADE, TRADE_AGG, LIQUIDATION, FUNDING_RATE, OPEN_INTEREST, VOLUME_PROFILE_AGG | wss://ap-sin3.ws.api.kiyotaka.ai/nonbook/ws | wss://eu-de3.ws.api.kiyotaka.ai/nonbook/ws |
?encoding=json to the endpoint you use. If you consume both orderbook and non-orderbook data, keep one connection to each endpoint family.
Quick example
Connect, authenticate, subscribe, and receive non-orderbook data:Connect
Authenticate
Subscribe
Receive
Next steps
Connecting
Set up a WebSocket connection and authenticate.
Subscribing
Subscribe to channels and manage subscriptions.