Expand description
Provides the WebSocket client integration for the OKX WebSocket API.
The OKXWebSocketClient
ties together several recurring patterns:
- Heartbeats use text
ping
/pong
, responding to both text and control-frame pings. - Authentication re-runs on reconnect before resubscribing and skips private channels when credentials are unavailable.
- Subscriptions cache instrument type/family/ID groupings so reconnects rebuild the same set of channels while respecting the authentication guard described above.
Structs§
- OKXWeb
Socket Client - Provides a WebSocket client for connecting to OKX.
Statics§
- OKX_
WS_ ORDER_ QUOTA - Rate limit for order-related WebSocket operations: 250 requests per second.
- OKX_
WS_ QUOTA - Default OKX WebSocket rate limit: 3 requests per second.
Functions§
- is_
post_ only_ rejection - Returns
true
when an OKX error payload represents a post-only rejection.