Skip to main content

Module client

Module client 

Source
Expand description

Execution client implementations for various exchanges.

§Connector Comparison

ConnectorReconnectDedupFill RecoveryHeartbeat
[binance]Auto (1s→30s backoff)10k LRUREST after reconnect30s
[alpaca]Auto (1s→30s backoff)2k LRUREST after reconnect35s
[ibkr]Caller responsibilityN/ACaller responsibilityN/A
[hyperliquid]SDK-managedSDK-managedN/ASDK-managed

§Resilience Philosophy

WebSocket-based connectors (Binance, Alpaca) implement auto-reconnection with fill recovery and deduplication. After reconnect, they query REST APIs for missed fills and deduplicate against the LRU cache to prevent duplicate processing.

IBKR uses TCP to local TWS/Gateway. Reconnection requires IB Gateway availability and client ID coordination — decisions that belong in the caller’s wrapper. See [ibkr] module docs for caller responsibilities.

Hyperliquid delegates to the official SDK’s with_reconnect() mechanism.

§Known Limitations

All connectors have a gap between reconnection and fill recovery: order lifecycle events (NEW, CANCELED, EXPIRED) during disconnect are NOT recovered. Callers must call ExecutionClient::fetch_open_orders after reconnect to reconcile state.

Modules§

mock

Traits§

BracketOrderClient
Extension trait for exchanges that support native bracket orders.
ExecutionClient