Skip to main content
Each method on client.ws builds a signed wss:// URL for a specific stream. Pass an optional params dict of filter parameters — such as subaccount_id or instrument_id — to scope the stream to your use case. The returned URL includes key_id, ts, and sig query parameters derived from your Ed25519 key and is valid for 30 seconds from the moment it is generated.

ws.orders

Build a signed URL for the /v1/ws/orders stream, which delivers real-time order status transitions for your subaccount. Method: client.ws.orders(params=None) → signed URL for /v1/ws/orders
The returned URL includes key_id, ts, and sig query parameters from the Ed25519 signer. Regenerate the URL for each new connection — signed URLs expire after 30 seconds.

ws.fills

Build a signed URL for the /v1/ws/fills stream, which delivers fill events as your orders execute. Method: client.ws.fills(params=None) → signed URL for /v1/ws/fills
The returned URL includes key_id, ts, and sig query parameters from the Ed25519 signer. Regenerate the URL for each new connection — signed URLs expire after 30 seconds.

ws.positions

Build a signed URL for the /v1/ws/positions stream, which delivers position change events as your holdings update. Method: client.ws.positions(params=None) → signed URL for /v1/ws/positions
The returned URL includes key_id, ts, and sig query parameters from the Ed25519 signer. Regenerate the URL for each new connection — signed URLs expire after 30 seconds.

ws.balances

Build a signed URL for the /v1/ws/balances stream, which delivers balance change events as funds move or orders settle. Method: client.ws.balances(params=None) → signed URL for /v1/ws/balances
The returned URL includes key_id, ts, and sig query parameters from the Ed25519 signer. Regenerate the URL for each new connection — signed URLs expire after 30 seconds.

ws.orderbooks

Build a signed URL for the /v1/ws/orderbooks stream, which delivers order book snapshots and incremental updates for a specific instrument. Method: client.ws.orderbooks(params=None) → signed URL for /v1/ws/orderbooks
The returned URL includes key_id, ts, and sig query parameters from the Ed25519 signer. Regenerate the URL for each new connection — signed URLs expire after 30 seconds.

ws.generic_asset_orderbook

Build a signed URL for the /v1/ws/orderbooks/generic-asset/{id} stream, which aggregates order book data across venues for a cross-venue asset. Method: client.ws.generic_asset_orderbook(generic_asset_id, params=None) → signed URL for /v1/ws/orderbooks/generic-asset/{id}
integer | string
required
The cross-venue asset ID to subscribe to. The SDK embeds this directly in the URL path.
The returned URL includes key_id, ts, and sig query parameters from the Ed25519 signer. Regenerate the URL for each new connection — signed URLs expire after 30 seconds.

ws.tradeprints

Build a signed URL for the /v1/ws/tradeprints stream, which delivers public trade print events (last-sale records) as trades occur on the book. Method: client.ws.tradeprints(params=None) → signed URL for /v1/ws/tradeprints
The returned URL includes key_id, ts, and sig query parameters from the Ed25519 signer. Regenerate the URL for each new connection — signed URLs expire after 30 seconds.

ws.url

General-purpose signed URL builder. Accepts a full path or a short alias (see table below) and an optional params dict. Use this method when building integrations that reference stream names dynamically or when you need to pass a URL to a third-party WebSocket library. Method: client.ws.url(path, params=None) — general signed URL builder
Supported short aliases:
All URLs built by ws.url() include key_id, ts, and sig query parameters from the Ed25519 signer. Regenerate the URL for each new connection — signed URLs expire after 30 seconds.

ws.iter

Delegate to client.iter_ws() via the client.ws namespace. Connects to the signed URL for path and yields parsed JSON objects for each message. Method: client.ws.iter(path, params=None) — delegates to client.iter_ws(); yields parsed JSON
ws.iter() and client.iter_ws() both require the websockets package. Install it with pip install websockets. The iterator blocks until the connection closes.