WebSocketTrade WebSocket

GET

Establish a WebSocket connection for order updates and order write operations.

Opening the connection requires an access token with the trade_view scope. Placing or canceling orders requires trade_trade on that same token.

Subscribe to live status updates for your orders, including individual fills.

You can also send place_order and cancel_order messages on an established WebSocket connection (see those operations). Subscribe to the orders channel to receive full lifecycle updates after placement or cancellation.

Correlation: Supply a unique reqId on each place_order or cancel_order to match the corresponding *_response. Use reqId only for response correlation — not for idempotency or order lookup (clientOrderId / orderId serve those roles).

Message ordering: place_order_response, cancel_order_response, and orders channel updates may arrive out of order on the same connection.

Header Params

  • Authorization string required
    Bearer token for authorization

Body Params

object

Subscribe or unsubscribe to order events for a specific account.

Multiple subscriptions are supported on a single connection — send separate subscribe messages for each accountId. Each subscribe/unsubscribe triggers a subscription_response message confirming the outcome.

Behavior changes (previously silent, now explicit):

  • Subscribing to an already-subscribed accountId returns status already_subscribed instead of being silently ignored.
  • Unsubscribing from an accountId that is not currently subscribed returns an error message instead of being silently ignored.
  • type string enum required
    The event type ("subscribe" or "unsubscribe")
    subscribeunsubscribe
  • channel string enum required
    The subscription channel for order events ("orders")
    orders
  • accountId string required
    The ID of the account

Responses

101

Switching Protocols. Once connected, the server may send:

  • WsSystemMessage — connection handshake (status: connected)
  • WsTradeOrdersResponse — order events
  • WsSubscriptionResponse — confirmation after every subscribe/unsubscribe request
  • WsPlaceOrderResponse — acknowledgement or rejection for a place_order request
  • WsCancelOrderResponse — acknowledgement or rejection for a cancel_order request

Response Body

ONE OF

  • type string enum required
    system
  • status string enum required
    Connection status.
    connected
  • session_id string
    Session ID for this WebSocket connection.
403
Forbidden - Insufficient permissions

Response Body

object

  • error string required
  • errorName string required
  • reqId string required