Protocol: wss
production
wss://api.example.com/v1/stream
Real-time WebSocket streams for order updates and market data.
Authentication:
- Keyed BLAKE2b-256 signature via HTTP headers during WebSocket Upgrade:
- PRE-ACCESS-KEY — broker access key identifier (unique API key)
- PRE-ACCESS-TIMESTAMP — RFC3339 timestamp with milliseconds (e.g., 2025-10-30T06:00:34.075Z)
- PRE-ACCESS-SIGNATURE — Keyed BLAKE2b-256 hex lowercase (64 chars)
- Signature computed over (each line ends with \n):
- "GET\n"
- path + query string + "\n"
- timestamp + "\n"
- "" (empty idempotency_key for WebSocket) + "\n"
- broker_id + "\n"
- access_key + "\n"
- body_digest (BLAKE2b-256 of empty body = hash of "")
- Keyed BLAKE2b-256 is computed using secret_key associated with the access_key
- The function returns 32 bytes, encoded as hex lowercase (64 chars) for PRE-ACCESS-SIGNATURE.
- Timestamp must be within clock_skew_tolerance (default 5m)
- Invalid signature or timestamp → HTTP 401 or WS close 4401
- All authz 403 responses, including upgrade refusal, use the public Error {error_code, message} with Content-Type: application/json; see private-api-broker-openapi.yaml#/components/schemas/Error.
- CIDR is checked first (HTTP 403, ip_not_allowed); disabled brokers are denied before upgrade (HTTP 403, broker_disabled).
- Missing brokers and unknown/revoked access keys return HTTP 401.
- Suspended brokers may open streams subject to permissions; suspension and CIDR changes keep existing sockets.
- Policy close 1008 reasons are broker_disabled, access_key_revoked (key-bound sockets), and broker_not_found.
- Restrictions apply after local registry updates; propagation lag remains. Clients reconnect themselves after restrictions are lifted; no separate notification is sent.
General Principles:
- All data frames include monotonic sequence numbers for ordering and resume; sequence numbers are not guaranteed to be contiguous
- Heartbeat frames do not advance sequence numbers
- Resume capability via 'since' parameter where applicable ('since' must be >0; value 0 is treated as absent)
- Historical replay is available for up to one hour; messages older than one hour cannot be replayed
- Idempotent frame delivery (clients drop frames with seq <= last_applied)
This is version 1.0.0 of this API documentation. Last update on Nov 19, 2026.