Expand description
WebSocket message handler for OKX.
The handler is a thin I/O boundary between the network layer and the client. It owns the
WebSocketClient, deserializes raw venue messages into OKXWsMessage events, and handles
subscription management, authentication, and retry logic.
All domain parsing (venue types to Nautilus types) occurs outside the handler:
- Data parsing in
PyOKXWebSocketClient(uses an instruments cache) - Execution parsing in
execution.rs(uses the system Cache)
Enums§
- Handler
Command - Commands sent from the outer client to the inner message handler.
Functions§
- is_
post_ only_ auto_ cancel - Returns
truewhen an OKX WebSocket order message represents a post-only auto-cancel. - is_
post_ only_ rejection - Returns
truewhen an OKX WebSocket error payload represents a post-only rejection.