API Reference
WebSocket streams
Real-time streams for book deltas, fills, and receipt updates. Planned for Phase B; today the UI polls REST at 500ms–2s and bots should do the same.
Heads up
WebSocket is PLANNED. The shape below is the contract; the endpoint is not live today.wss://api.taifoon.dev/ws/v1PLANNED
Single multiplexed socket. Subscribe per-channel with a JSON message; receive deltas keyed by
channel and seq.Request body
| Field | Type | Required | Description |
|---|---|---|---|
| op | string | yes | "subscribe" | "unsubscribe". |
| channel | string | yes | "book" | "fills" | "receipt". |
| market | string | no | For book/fills channels. |
| session | string | no | For receipt channel. |
| attribution | string | no | Filter fills. |
Channels
- book — incremental delta of the depth ladder. Snapshot on subscribe, deltas thereafter.
seqis monotonic; gap = reconnect. - fills — every cross the matcher prints for the market. Same shape as
/book/v1/fillsitems. - receipt — live causality updates for a session. Each frame is a partial receipt; the final frame has
final: true.
Today: poll REST
# Imitates the eventual book channel while true; do curl -s https://api.taifoon.dev/book/v1/depth/BTC-PERP > /tmp/b.json sleep 0.5 done
