Skip to content

Subscription

Trade event push uses a connect-and-subscribe model: once the client establishes a WebSocket connection and completes authentication, the server automatically pushes trade events for the authenticated user — no explicit subscription request is needed.

Difference from Quote Push

Quote push requires the client to explicitly declare which instruments and data types to subscribe to. Trade push works differently:

DimensionQuote PushTrade Push
Subscription methodExplicit — specify instrument code and data typeImplicit — takes effect automatically after authentication
Push scopeOnly subscribed instruments and typesAll event types for all accounts under the authenticated user
UnsubscribeUnsubscribe at any timeDisconnect to stop receiving

Event Coverage

After authentication succeeds, the client automatically receives all of the following event types. Individual event types cannot be filtered out:

Event TypeDescription
EVENT_NEWOrder placed successfully
EVENT_REPLACEDOrder modified successfully
EVENT_CANCELEDOrder cancelled successfully
EVENT_EXPIREDOrder expired
EVENT_FILLFill event (partial fill or full fill)
EVENT_NEW_REJECTEDOrder placement rejected
EVENT_REPLACE_REJECTEDOrder modification rejected
EVENT_CANCEL_REJECTEDOrder cancellation rejected
EVENT_FILL_CORRECTFill correction
EVENT_FILL_CANCELFill cancellation

See Data Format for the full message structure and field reference for each event.

Account Scope

The server pushes events at the account level of the authenticated user — events for all trading accounts under that user are included. The user_info.acc_id field in each push message identifies the specific trading account the event belongs to. If the same user holds multiple trading accounts, events from all accounts are pushed on the same connection. Clients should use acc_id to distinguish the source.

Behavior

When Events Are Pushed

The server pushes events in real time when trade events occur. Delivery time depends on network conditions and server-side processing latency — a fixed push interval is not guaranteed.

No Replay of Historical Events

Trade events that occur while the connection is down will not be replayed after reconnection. To query historical orders or fills, use the following REST APIs:

Recovery After Reconnection

After the connection drops and authentication is completed again, the server automatically re-establishes the push channel and continues pushing subsequent events.

Client Implementation Recommendations

  • Do not rely on push as the sole source of state: Push is suitable for real-time notifications. For the initial page load or catching up after a disconnect, call REST APIs first to query the complete state.
  • Handle duplicate events: In rare network jitter or server retry scenarios, duplicate event pushes may be received. Clients should implement idempotent handling keyed on event_id.
  • Do not rely on event order: Network jitter may cause events to arrive out of order. To reconstruct state, use fields such as order_status and event_time_us within each event rather than relying on push order.

Next Steps

  • Authentication — Learn about the authentication flow.
  • Keep Alive — Handle disconnections and reconnections.
  • Data Format — View the full field reference for event messages.