Typed Deribit
A fully typed, validated async client for the Deribit API.
from typed_deribit import Deribit
async with Deribit.new(testnet=True) as client:
instruments = await client.http.market_data.get_instruments(
currency='BTC', kind='future'
)
print(instruments)Why Typed Deribit?
- 🎯 Precise Types: every request/reply method and channel subscription across
.http,.ws, and.streamsis typed, parameters and all — notdict/Any. - ✅ Runtime Validation: responses are validated against the real schema by default, not just typed on paper.
- ⚡ Async First: async HTTP and WebSocket transports, with
.streamsrunning concurrently on its own dedicated connection. - 📚 Full Surface: every documented endpoint across
market_data,trading,account,wallet,block_rfq,block_trade,combo_books,matching_engine,session,subscription_management, andsupporting— not just the popular ones.
Installation
pip install typed-deribitHow To
- Fetch Market Data
- Manage Account Data
- Place & Manage Orders
- Manage Deposits & Withdrawals
- Paginate Through Results
- Listen To Streams
Reference
Design Philosophy
Typed Deribit follows the principles outlined in this blog post.
Details matter. Developer experience matters.