Currently Spot-only. Derivatives support is planned.
Requirements
Requires Rust 1.88 or later and the tokio async runtime.Install
What it covers
- Spot REST — complete public market data, plus authenticated account and trading endpoints
- Spot WebSocket v2 — public data streams and the authenticated
executionsandbalanceschannels - Order operations: add, amend, cancel, batch add, batch cancel, cancel-all, and a dead man’s switch
- Order routing over REST or authenticated WebSocket, selectable per call
- Real-time order book construction with CRC32 checksum validation and automatic reseeding on mismatch
- Automatic reconnect with subscription replay
- Typed errors carrying a stable code, category, retryable flag and request id
- An event bus for connection state, rate-limit warnings, order book gaps and order lifecycle
Example
Notes for developers coming from other Kraken SDKs
- Symbols use the modern format only.
BTC/USD, notXBTUSDorXXBTZUSD. Legacy codes return a typed error rather than being silently translated. Asset codes in responses are normalised the same way, so balances are keyedBTCandUSD. - Prices and quantities are decimals, not floats. Parse them from strings (
"0.01".parse()?). The API does not acceptf64. - A WebSocket subscription is two steps: register a handler, then subscribe. The
on_*_forhelpers do both in one call and unsubscribe when dropped. - Rate limits are reported, not enforced. The SDK emits a warning event as you approach your tier limit and never sleeps on your behalf, so pacing stays under your control.