WebSocket Connection Guide

How to connect to the real-time stream, and every event it emits. Returned as JSON so it can be read programmatically.

Connect to: wss://<host>/api/broker/v1/stream

Authentication is by query parameter, because browsers cannot set headers on a WebSocket upgrade:

  • ?api_key=<X9 Connect key>, or
  • ?token=<staff JWT>

Scope matches REST — quotes are global, but position, order, trade, and balance events cover only the accounts your credential authorizes.

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

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