WebSocket Connection Guide

How to connect to the real-time stream and every event it emits. The guide is returned as JSON so it can also be read programmatically.

Connect to: wss://<host>/api/broker/v1/stream?api_key=<X9 Connect key>

Authentication is a query parameter because browsers cannot set headers on a WebSocket upgrade. Quotes are global; position, order, trade, and account events cover only the accounts authorized by the credential. account_update replaces trading_account_details for X9 Connect clients. Trade history cannot be requested over this socket; use GET /v1/trades/by-account/{account_number}.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Responses

Language
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json