A fully typed, validated async client for the dYdX Indexer, Node and CosmosSDK/CometBFT APIs.
Project description
A fully typed, validated async client for the dYdX Indexer, Node, Cosmos gRPC, and CometBFT APIs.
- Documentation: https://dydx.tribulnation.com
- Source Code: https://github.com/tribulnation/dydx
from dydx import Dydx
async with Dydx.testnet(public=True) as client:
market = await client.indexer.data.get_market('BTC-USD')
stream = await client.indexer.streams.candles('ETH-USD', resolution='1MIN')
async for candle in stream:
await stream.unsubscribe()
balances = await client.chain.bank.all_balances('dydx1...')
block = await client.chain.comet.block()
result = await client.node.place_order(market, order={
'side': 'BUY',
'size': '0.0001',
'price': '50000',
'flags': 'LONG_TERM'
})
Why Typed dYdX?
- 🎯 Precise Types: Typed endpoint inputs and responses across dYdX services.
- ✅ Runtime Validation: Validated Indexer and Comet responses by default.
- ⚡ Async First: HTTP, WebSocket streams, gRPC queries, and transaction helpers.
- 📚 Full dYdX Surface:
client.indexer,client.chain, andclient.node.
Installation
pip install typed-dydx
How To
- Place & Manage Orders
- Fetch Market Data
- Manage Account Data
- Query Chain State
- Inspect Blocks & Transactions
- Listen To Streams
- Paginate Through Results
Reference
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
typed_dydx-2.0.6.tar.gz
(267.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
typed_dydx-2.0.6-py3-none-any.whl
(413.8 kB
view details)
File details
Details for the file typed_dydx-2.0.6.tar.gz.
File metadata
- Download URL: typed_dydx-2.0.6.tar.gz
- Upload date:
- Size: 267.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d96e8138cfb1ac5f12730ac2f55dd31c36d37a8dd839f4c243895c616e5e1d2f
|
|
| MD5 |
9ba7d8796435d8a31d252f583eb03db8
|
|
| BLAKE2b-256 |
653e462b658250966f8ef7cf09c93bb749946238a21a0f90e11d88acbd57fac3
|
File details
Details for the file typed_dydx-2.0.6-py3-none-any.whl.
File metadata
- Download URL: typed_dydx-2.0.6-py3-none-any.whl
- Upload date:
- Size: 413.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
59c8afcf257fbba7d8dd3701deb9b0bf3fde6b51cc55ea7f92c0e65c4a9b2c7b
|
|
| MD5 |
616900342c992d40cef97fb6f6f72d30
|
|
| BLAKE2b-256 |
e4a4eca2e13c342f189f173425c045884f1cfed2f687cfd51b2c7fb46415ac0c
|