See WebSocket Protocol for the full auth upgrade flow, heartbeat behavior, and
close-code reference. This page focuses on user-specific events.
Connect and authenticate
No initial state is sent on authentication. Use
GET /execution/balances,
GET /execution/positions, and GET /execution/orders for the current user state, then use the
WebSocket to keep the UI fresh.Events
Order submitted
Sent after a trade is accepted for execution:Balance update
Sent when a trade changes the user’s venue balance:Order event
Venue-agnostic stream of DAG lifecycle and terminal order status. Discriminate on the innerevent field. Common shapes:
event values: dag_started, dag_completed, dag_failed, dag_cancelled, step_started, step_completed, step_waiting, step_failed, step_retrying, filled, partial_fill, failed. The gateway broadcasts every event verbatim — switch on event and ignore types your UI doesn’t care about.
Handle messages
Refresh-aware reconnect
If the socket closes and your access token may have expired, refresh it before reconnecting:Related
WebSocket Protocol
Full auth upgrade, heartbeat, error, and reconnect reference.
Real-Time Orderbook
Outcome-level orderbook subscriptions on the same socket connection.
Real-Time Charts
Build live charts from orderbook and trade events.
Token Refresh
Session renewal patterns for REST and WebSocket clients.