Re-exports§
pub use events::now_pair;pub use events::InvalidationReason;pub use events::SessionEvent;pub use events::WsUpdate;pub use stream::SessionStream;pub use stream::UpdateStream;pub use stream::WsDispatcher;pub use stream::WsDispatcherConfig;
Modules§
- events
- Multiplexed WebSocket event types.
- ndjson
- stream
- Concrete stream newtypes for the multiplexed WS surface.
Structs§
- Activity
Fill - Activity
Trade - Activity events still carried inside
WsUpdate::Trade/WsUpdate::Fill. Retained as a typed payload alongside the stream rather than as a separate per-token surface. - Atomic
WebSocket State - Lock-free atomic wrapper for WebSocketState. O(1) reads without acquiring any async lock.
Enums§
Constants§
- WS_
CRYPTO_ PING_ INTERVAL - WS_
MAX_ RECONNECT_ ATTEMPTS - WS_
PING_ INTERVAL - Shared WebSocket reconnect/keepalive constants for all exchange implementations.
- WS_
RECONNECT_ BASE_ DELAY - WS_
RECONNECT_ MAX_ DELAY - WS_
STALL_ CHECK_ INTERVAL - WS_
STALL_ TIMEOUT - Force a reconnect if no message has been received for this long. Sized for the quietest live venue: a 50-market Kalshi subscription at ~0.5 msg/s hit a 40s max-quiet window in smoke testing, so 60s was only 33% above observed worst-case. 90s gives ~2× headroom while still shrinking macOS’s ~30-minute silent-death window by ~20×.
Traits§
- Order
Book WebSocket - WebSocket driver trait. Surface is deliberately small: connect/disconnect, subscribe/unsubscribe per market, and hand out two multiplexed streams.
Functions§
- stall_
watchdog - Returns once
last_message_atis older thanWS_STALL_TIMEOUT.