Skip to main content
The WebSocket surface is a command-and-event API. Use this page as the human-readable schema contract for clients, coding agents, and test harnesses. REST route map stays in OpenAPI; WebSocket message shape lives here until a standalone machine contract is published.

Client Commands

Server Events

Message Envelope

WebSocket events should be processed with the same discipline as REST responses: preserve symbol, channel, venue family, timestamp, request or correlation IDs when present, and any data-quality or gap state. Do not assume every channel has the same payload shape. Order-book snapshots, trades, funding, and replay controls carry different fields. Client commands and server events use different naming patterns. Dotted names such as replay.pause, replay.resume, replay.seek, and replay.stop are commands sent by the client. Underscore names such as replay_paused, replay_resumed, replay_snapshot, historical_data, and replay_completed are events received from the server.
string
Event name emitted by the server, such as data, l4_snapshot, replay_snapshot, historical_data, gap_detected, or error.
string
Market-data channel associated with the event. Replay-control events may use replay-specific event names.
string
Symbol or pair in the route-family format selected by the client.
number
Event timestamp when the channel emits one. Store it in the same run manifest as the replay or live stream.

Client Contract

Clients should validate outbound commands before sending them. A command with no symbol, no channel, or an unbounded replay window is a client bug. For production jobs, keep a local state object with connection status, active subscriptions, last event timestamp, replay window, gap events, and reconnect count.

Command Review Checklist

Review this checklist before generating WebSocket commands. Use Connection for auth and reconnect behavior, Channels for channel selection, Replay for historical event streams, and Limits for subscription and throughput sizing.
Last modified on July 21, 2026