Typed Kraken
A fully typed, validated async client for the Kraken Spot API -- REST and WebSocket v2.
from typed_kraken import Kraken
async with Kraken.new(public=True) as client:
ticker = await client.spot.market_data.ticker(pair='XBTUSD')
print(ticker)Why Typed Kraken?
- 🎯 Precise Types: every
client.spot,client.streams, andclient.trading_wsparameter and response is typed, down toTypedDicts andLiterals for Kraken's own field names. - ✅ Runtime Validation: REST and WebSocket v2 responses are validated against their schema before you see them, not just typed on paper.
- ⚡ Async First: async REST calls and long-lived WebSocket v2 subscriptions, built for concurrent trading workflows.
- 📚 Full Surface: market data, account, trading, funding, and earn -- every documented Kraken Spot endpoint, not just the popular ones.
Installation
pip install typed-krakenHow To
- Fetch Market Data
- Listen To Streams
- Place & Manage Orders
- Fetch Account Data
- Query & Manage Earn Instruments
- Deposits & Withdrawals
Reference
Design Philosophy
Typed Kraken follows the principles outlined in this blog post.
Details matter. Developer experience matters.