Repository navigation
v0.1.0
Welcome to the first public release of kraken-api-sdk. 🎉 An async client written in Rust and covering Kraken Spot trading and portfolio data across Spot REST and Spot WebSocket v2.
Features
- Two-factor authentication.
- One client, five namespaces.
market(public data),account(balances, orders, ledgers),trade(order placement),subscription(WebSocket stream lifecycle), andevents(lifecycle bus), all reached through aClientbuilt byClientBuilder. - Market data.
ticker,orderbook,trades,ohlc,spreads,assets,pairs,server_time,statusover REST.ticker,book,trade,ohlcandstatusover WebSocket. - Account data. balance, extended balance, trade balance, open and closed orders, ledgers, trades history, positions, and 30-day volume over REST;
executionsandbalancesover WebSocket. - Trading. Shorthands for market, limit and stop, plus full control across 10 order types (Market, Limit, Iceberg, StopLoss, StopLossLimit, TakeProfit, TakeProfitLimit, TrailingStop, TrailingStopLimit, SettlePosition). Orders default to authenticated WebSocket v2, and REST calls can be forced with
.via(Transport::Rest). - Maintained order book. Order books built from snapshot and deltas, CRC32-checked on each update.
- Exact money. Every monetary value is a
rust_decimal::Decimal. The SDK never usesf64for a price, volume, or amount. - Modern symbols. Pairs are built with
Symbol::new("BTC/USD"). Legacy wire codes (XBT,XXBT,ZUSD,XXBTZUSD) are rejected on input and normalized away on decode. - Typed error taxonomy: Errors with
code,category,retryable,request_id, andmessage- Rate-limit awareness without blocking. The SDK tracks counter usage and emitsRateLimitWarningat a configurable threshold. - Observability: one event bus for connection state, rate-limit warnings, order book gaps, queue depth, slow callbacks and order lifecycle.
Next Steps
- Derivatives support
- Level 3 order book
- Expanding to additional languages, including C++, Python, Go, and TypeScript
- Expand to additional domains, including Funding, Subaccounts, and Earn