Client Commands
interval_ms sets the maximum lighter_orderbook or rh_lighter_orderbook book rate, from 100 to 5000. Leave it out for one book per second. Any other channel rejects it.
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. Live Lighterdata payloads also differ from Lighter replay historical_data rows; see Lighter WebSocket channels for both.
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 coin-specific command with no symbol, a replay with no symbol or start, or an unbounded replay window is a client bug.all_tickers is the exception for subscriptions and may omit symbol. 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.