Available Streams
Authentication
WebSocket connections are authenticated using signed query parameters rather than headers. The SDK appends three parameters to every WebSocket URL it constructs:
The canonical WebSocket message format is:
subaccount_id or instrument_id) but excludes the signing parameters themselves to avoid circular dependencies. You do not need to construct this manually — the SDK handles it whenever a key_id and private_key are configured.
The signed timestamp must be within 30 seconds of the server clock. Connections with a stale timestamp are rejected with an
unauthorized / stale_timestamp error.Connecting with the SDK
client.iter_ws(path, params)
The primary way to consume a stream is client.iter_ws(path, params). It returns a synchronous iterator that yields parsed JSON messages from the stream. The iterator blocks until the connection closes or an exception is raised.
Subscribe to order updates:
Obtaining a Signed URL
If you prefer to manage the WebSocket connection yourself — for example, using a library with reconnect logic or async support — retrieve a pre-signed URL withclient.ws.url(path, params) or a convenience method, and pass it to your WebSocket client.
Convenience URL Methods
Theclient.ws sub-client provides named methods for every available stream. Each method returns a fully signed URL string ready for direct use with any WebSocket library.
Stream Reference
client.iter_ws() is a synchronous, blocking iterator. It holds the calling thread open for the duration of the connection. To consume multiple streams concurrently, run each in a separate thread or use the signed URL methods (client.ws.*) with an async WebSocket library in an asyncio event loop.