/ws connection and JSON messaging model as public feeds, but the subscription kinds you choose carry account (and sometimes instrument) context in the subscribe payload—not an API key on the WebSocket handshake. Treat access control like the REST model: keys are for SDK signing off the socket; see Authentication.
Why use private WebSockets
REST gives you snapshots; private streams push incremental updates for:- Open orders and lifecycle changes
- Trades and fills attributed to your account
- Balances, margin, or position updates (when exposed for your subscription kinds)
Connection
- Open WSS using the host for your network — Environments.
- Subscribe only after the connection is ready to accept
Subscribeframes.
Stream pages (sidebar)
Expand Streams under this section for account-scoped subscriptions (order events, collateral, positions, open orders, and so on). Each page uses the samews AsyncAPI channel with an individual title for that feed.
Subscribing to account feeds
- Use the
Subscribekinds that take account or address parameters (see AsyncAPI). - Resubscribe after every reconnect; state is not guaranteed to persist across sessions.
- Treat each message as a partial update unless the schema defines a full snapshot; on gap or sequence break, reconnect and refresh from REST if needed.
Heartbeats
SendPing; expect Pong. Private clients should be at least as aggressive as public bots about heartbeats when you hold long-lived connections through proxies.
Errors and security
Errors arrive asServerMessage::Error — see Error responses. Never log API keys, signing material, or full account payloads to shared systems.
For market-wide data, see Public WebSocket streams and the stream reference.