Order-update WebSocket
GET{BASE_URL}/websocket
Streams order updates for every market over one connection.
Connect. Open wss://apac.uat.atomicvaults.com/v2/websocket (UAT)
or wss://apac.production.atomicvaults.com/v2/websocket (Production)
with an Authorization: Bearer <access_token> header. A missing or
invalid token gets an HTTP 401 error body instead of a WebSocket.
Connect from your server: browser clients on another origin are
refused. You may open more than one connection.
Which updates you receive. Updates for the orders your client places, on accounts it can access. Your client can also be enabled to receive updates for every order on its accounts; contact our team.
Keep the connection authenticated. The connection lasts until your access token expires. Before then, get a new token from the same client and send it as a text frame:
{"type": "authenticate", "access_token": "<new access token>"}
The server replies with
{"message_type": "authenticated", "expires_at": "..."}, the new
deadline. If you do not renew, the server closes the connection when
the token expires. An invalid token, or any other message from the
client, closes the connection with status 1008.
Messages. Order updates arrive as text frames shaped as
{"message_type": "order_update", "message": {...}}. The order
object has the same fields as Get order.
The server sends a WebSocket ping every 30 seconds.
Common order_event values: new, partial_fill, fill,
canceled, rejected, replaced, cancel_rejected and
replace_rejected. Ignore values you do not recognise.
No replay. Updates are delivered only to connections open at that moment. After reconnecting, reconcile with Get orders.
Responses
- 101
- 401
- 403
- default
WebSocket upgraded.
The Authorization header is missing, or the access token is invalid or expired.
The token is valid but not allowed to make this request: your client
does not have trading access (for a POST), or it cannot access the
account_number.
Text frames sent after the upgrade.