# Broker WebSocket Streams API AsyncAPI file: https://bump.sh/tie-tech/hub/b2b-api/doc/broker-asyncapi.yaml ## Description This is version `1.0.0` of this API documentation. Last update on Sep 1, 2026. 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): 1. "GET\n" 2. path + query string + "\n" 3. timestamp + "\n" 4. "" (empty idempotency_key for WebSocket) + "\n" 5. broker_id + "\n" 6. access_key + "\n" 7. 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 General Principles: - All data frames include monotonic sequence numbers for ordering/gap detection - Heartbeat frames do not advance sequence numbers - Resume capability via 'since' parameter where applicable ('since' must be >0; value 0 is treated as absent) - Idempotent frame delivery (clients drop frames with seq <= last_applied) ## Servers - production: wss://api.example.com/v1/stream (Production WebSocket endpoint) - sandbox: wss://sandbox.api.example.com/v1/stream (Sandbox WebSocket endpoint) ## Topics ## Channels ### [Accounting](https://bump.sh/tie-tech/hub/b2b-api/doc/broker-asyncapi/group/channel-accounting.md) - [Receive real-time accounting and ledger updates](https://bump.sh/tie-tech/hub/b2b-api/doc/broker-asyncapi/operation/operation-subscribe-accounting.md) ### [Events](https://bump.sh/tie-tech/hub/b2b-api/doc/broker-asyncapi/group/channel-events.md) - [Receive real-time event/market lifecycle updates](https://bump.sh/tie-tech/hub/b2b-api/doc/broker-asyncapi/operation/operation-subscribe-events.md) ### [Market data](https://bump.sh/tie-tech/hub/b2b-api/doc/broker-asyncapi/group/channel-market-data.md) - [Receive real-time market data](https://bump.sh/tie-tech/hub/b2b-api/doc/broker-asyncapi/operation/operation-subscribe-market-data.md) - [Send subscription control messages](https://bump.sh/tie-tech/hub/b2b-api/doc/broker-asyncapi/operation/operation-publish-market-data.md) ### [Orders](https://bump.sh/tie-tech/hub/b2b-api/doc/broker-asyncapi/group/channel-orders.md) - [Receive real-time order updates](https://bump.sh/tie-tech/hub/b2b-api/doc/broker-asyncapi/operation/operation-subscribe-orders.md) ### [Payouts](https://bump.sh/tie-tech/hub/b2b-api/doc/broker-asyncapi/group/channel-payouts.md) - [Receive real-time payout/settlement updates (DEPRECATED)](https://bump.sh/tie-tech/hub/b2b-api/doc/broker-asyncapi/operation/operation-subscribe-payouts.md) [Powered by Bump.sh](https://bump.sh)