Problem: Most exchange WebSocket examples are demos, not safe for long running systems. Developers building trading infra struggle with reconnect bugs, silent data gaps, order book corruption, and unstable APIs that break production systems.
Solution: A correctness first Kraken WebSocket SDK in Rust that guarantees ordered data, deterministic reconnect behavior, and safe order book state for production use.
What This Project Delivers
A stable Rust SDK for Kraken WebSocket v2 public market data
Unified event stream for ticker, trades, order book, and OHLC
Deterministic connection state machine with explicit transitions
Automatic reconnect and resubscription with backoff
Snapshot plus delta order book stitching with checksum validation
Clear API stability guarantees via prelude and extended modules
Key Innovation
Frozen API philosophy focused on long term reliability
Deterministic state machine instead of implicit reconnect logic
Built in gap detection and resync for correctness
Order book integrity enforced by sequence and checksum rules
Designed as infrastructure not a demo or trading bot
Target Users
Trading firms and quant developers
Market data ingestion pipelines
Research and backtesting systems
Long running monitoring or aggregation services
Why It Matters: Market data bugs are silent and expensive. This SDK prioritizes correctness over convenience and gives developers strong guarantees they can build on.
Tech Stack
Rust async ecosystem
Tokio runtime
WebSocket over TLS
Serde for parsing
Optional Prometheus metrics
Current Status
Public market data stable
Order book state management stable
Reconnect semantics stable
Private auth channels marked unstable by design