Expand description
WebSocket execution dispatch for the Kraken Spot and Futures clients.
Implements the two-tier execution dispatch contract from
docs/developer_guide/adapters.md (lines 1232-1296):
- The execution client registers an
OrderIdentityinWsDispatchStatewhen it submits an order. - WebSocket execution messages are routed through the per-product dispatch
functions in
futuresandspot. For tracked orders the dispatch builds typed [OrderEventAny] events and emits them directly via [ExecutionEventEmitter::send_order_event]. For untracked / external orders the dispatch falls back toOrderStatusReport/FillReportso the engine can reconcile.
The dispatch state lives in an Arc<WsDispatchState> shared between the
main client thread (which registers identities at submission time) and the
spawned WebSocket consumer task. DashMap/DashSet provide lock-free
concurrent access.
Modules§
- futures
- WebSocket execution dispatch for the Kraken Futures API.
- spot
- WebSocket execution dispatch for the Kraken Spot v2 API.
Structs§
- Delta
Snapshot - Snapshot of the mutable fields seen on a tracked
OpenOrdersDelta. - Order
Identity - Identity metadata captured when an order is submitted through this client.
- WsDispatch
State - Per-client dispatch state shared between order submission and the WebSocket consumer task.