Skip to main content

Module dispatch

Module dispatch 

Source
Expand description

WebSocket message dispatch for the Bybit execution client.

Routes incoming BybitWsMessage variants to the appropriate parsing and event emission paths. Tracked orders (submitted through this client) produce proper order events; untracked orders fall back to execution reports for downstream reconciliation.

Structs§

OrderIdentity
Order identity context stored at submission time, used by the WS dispatch task to produce proper order events without Cache access.
OrderStateSnapshot
Snapshot of an order’s price, quantity, and trigger price at last dispatch. Used to detect modifications when Bybit sends back an order with the same status but changed fields.
WsDispatchState

Enums§

PendingOperation
Tracks which type of WS request is pending for a given req_id.

Functions§

dispatch_ws_message
Dispatches a WebSocket message with cross-stream deduplication.

Type Aliases§

PendingRequestData
Shared state for cross-stream event deduplication between the private and trade WebSocket dispatch loops.