TaifoonTAIFOON
Taifoon · Docs
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.
WSwss://api.taifoon.dev/ws/v1
PLANNED
Single multiplexed socket. Subscribe per-channel with a JSON message; receive deltas keyed by channel and seq.
Request body
FieldTypeRequiredDescription
opstringyes"subscribe" | "unsubscribe".
channelstringyes"book" | "fills" | "receipt".
marketstringnoFor book/fills channels.
sessionstringnoFor receipt channel.
attributionstringnoFilter fills.

Channels

  • book — incremental delta of the depth ladder. Snapshot on subscribe, deltas thereafter. seq is monotonic; gap = reconnect.
  • fills — every cross the matcher prints for the market. Same shape as /book/v1/fills items.
  • 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