A high-performance, strictly-typed Async Rust SDK for Kraken with a built-in Terminal UI (648k msg/sec).
Building reliable trading systems on raw WebSockets is painful:- Dynamic languages like Python are prone to runtime errors when API schemas change- Handling millions of messages per hour requires robust infrastructure- Manual state management leads to data inconsistencies
The Kraken Rust SDK is a production-grade library designed for high-frequency trading systems.
Key Architecture:
Tested against Python's `json.loads` processing 10,000 Kraken messages:
| Implementation | Throughput | Type Safety |
|-----------------|-----------------|-------------------|
| Rust SDK | 648,000 msg/s | ✅ Compile-time |
| Python (Raw) | 602,000 msg/s | ❌ Runtime-only |
Result: 8% faster with full compile-time safety.
✅ 648k msg/sec Throughput - Zero-copy deserialization with Serde
✅ Grandmaster Terminal UI - Full TUI (ratatui) with orderbook, liquidity depth, and live candles
✅ CRC32 Checksum Validation - Mathematically verify orderbook integrity on every update
✅ Auto-Reconnection - Deterministic state machine for subscription restoration
✅ HMAC-SHA512 Authentication - Verified private feed support
✅ 10 Working Examples - Including algorithmic trading bot
✅ Docker Support - One-command deployment
✅ CI/CD Pipeline - GitHub Actions with automated testing
Repository URL
https://github.com/Nihal-Pandey-2302/kraken-rs
Documentation URL
https://nihal-pandey-2302.github.io/kraken-rs/kraken_sdk/
Demo Video URL
Installation (2 lines):
cargo add tokio --features full cargo add kraken_sdk --git https://github.com/Nihal-Pandey-2302/kraken-rs
Usage (5 lines):
let client = KrakenClient::new();
client.connect().await?;
client.subscribe(vec!["XBT/USD"], "trade", None).await?;
let mut rx = client.subscribe_events();
while let Ok(event) = rx.recv().await { /* Process typed events */ }Run Examples:
cargo run --example 01_basic_subscribe # Basic streaming cargo run --example 07_terminal_ui # Professional TUI ./run_all_examples.sh # Verify all 10 examples
Requirements Met:
✅ Lightweight SDK connecting to Kraken WebSocket API
✅ Processes updates efficiently (648k msg/s benchmarked)
✅ Exposes clean API for downstream consumers
✅ Reusable with comprehensive documentation
Beyond Requirements:
✅ Enables Track #2 visualizers with typed data models
✅ Enables Track #3 strategy builders with trading bot example
✅ Production-ready: CI/CD, Docker, monitoring, checksums
✅ Proven correctness: 65+ checksum validations in verification script
Competitive Advantages:
Watch the 4-minute demo: [YouTube Link]
Unlike other SDKs that just list features, we PROVE ours works:
- ✅ 648,000 msg/sec (benchmarked against Python)
- ✅ 65+ CRC32 checksums validated (shown in video)
- ✅ Trading bot with SMA strategy (example 10)
- ✅ Professional TUI with live charts (examples 7)
- ✅ CI/CD pipeline passing (GitHub Actions)
See the proof, not just the promises.
Snippet 1: The "Simple" Start shows how easy it is to use.
Snippet 2: The "Type Safety" Flex Shows why Rust is superior to Python.
Snippet 3: Auto-Reconnection (Production Feature):
Snippet 4: Trading Bot (Real-World Usage):
Live TUI: