The unofficial Deribit API SDK, by Tribulnation. Compatible with Trading SDK.
Project description
Deribit Trading SDK
The unofficial, fully-typed async Python SDK for Deribit, by Tribulnation.
Quick Start
pip install deribit-trading-sdk
from deribit import Deribit
async with Deribit.new(API_KEY, API_SECRET) as client:
candles = await client.buy('BTC_USDT', {
'price': '50000',
'quantity': '0.001',
'type': 'LIMIT',
'side': 'BUY',
})
Why Deribit SDK?
- 🚀 Fully Async - Built with
httpxfor high-performance async operations - 🔒 Type Safe - Complete type annotations with
TypedDictandpydanticvalidation - ⚡ Easy to Use - Simple context-managed API with
async with - 📊 Comprehensive - Spot trading, market data, wallet, and WebSocket streams
- 🎯 No Setup Required - Start exploring markets immediately
What's Included
- Market Data - Real-time prices, order books, and historical data
- Spot Trading - Place, cancel, and query orders
- User Data - Account balances, trade history, and order status
- Wallet Operations - Deposits, withdrawals, and address management
- WebSocket Streams - Live market data and user notifications
Authentication
Get your API keys from the Deribit dashboard.
Or, you can use public methods:
from deribit import MarketData
async with MarketData.new() as client:
r = await client.get_order_book('BTC_USDC')
Supported APIs
The SDK covers the following Deribit endpoints:
Account
Market Data
get_contract_sizeget_index_priceget_instrumentget_instrumentsget_last_trades_by_instrumentget_order_book
Private Subscriptions
Public Subscriptions
Trading
buycancelcancel_all_by_currency_paircancel_all_by_currencycancel_all_by_instrumentcancel_all_by_kind_or_typecancel_allcancel_by_labeleditedit_by_labelget_open_ordersget_open_orders_by_currencyget_open_orders_by_instrumentget_open_orders_by_labelget_order_stateget_order_state_by_labelget_user_trades_by_currencyget_user_trades_by_instrument
Wallet
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
deribit_trading_sdk-0.1.1.tar.gz
(23.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file deribit_trading_sdk-0.1.1.tar.gz.
File metadata
- Download URL: deribit_trading_sdk-0.1.1.tar.gz
- Upload date:
- Size: 23.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c05c3129ccc2e0aebc11d395bdf6f31fad17ee850ba50fb3fb6354d1a29f421
|
|
| MD5 |
f8b1349f4a621c8bcc562be9d23675c6
|
|
| BLAKE2b-256 |
64bcb7f32a9b8c3f0c7cc5fa54affa2bb5c9f1c48a9d45803d3295f73c5709a8
|
File details
Details for the file deribit_trading_sdk-0.1.1-py3-none-any.whl.
File metadata
- Download URL: deribit_trading_sdk-0.1.1-py3-none-any.whl
- Upload date:
- Size: 52.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4add99a76b10a4bbb763cc3c4d6b457f1e5effaf9f145b2ae81899af5d798cd4
|
|
| MD5 |
4d109a36712976d5237f9bf77fc4ea8c
|
|
| BLAKE2b-256 |
1cb0ec384c969b79b7db4d641bced494fe404a08e35db89d8a7f12507186004a
|