Skip to main content
See WebSocket Protocol for the full auth upgrade flow, heartbeat behavior, and close-code reference. This page focuses on user-specific events.
Authenticated users automatically receive order and balance notifications over the WebSocket. No separate subscription action is required once the connection has user-level auth.

Connect and authenticate

You will receive a connection acknowledgement:
If the user signs in after the socket is already open, upgrade the connection in-place:
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 inner event 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:

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.