A fully typed, validated async client for the dYdX Indexer, Chain (Cosmos gRPC + CometBFT), and Node APIs.
- Documentation: https://tribulnation.com/typed/dydx
- Source Code: https://github.com/tribulnation/typed/tree/main/packages/dydx
from typed_dydx import Dydx
async with Dydx.testnet(public=True) as client:
market = await client.indexer.data.get_market('BTC-USD')
candles = await client.indexer.streams.candles('ETH-USD', resolution='1MIN')
async for candle in candles:
print(candle)
break
await candles.unsubscribe()
balances = await client.chain.bank.all_balances('dydx1...', resolve_denom=False)
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 inputs and responses across the Indexer, Chain, and Node surfaces.
- ✅ Runtime Validation: Indexer and Comet responses validated by default.
- ⚡ Async First: Indexer HTTP and WebSocket streams, Cosmos gRPC queries, and signed node transactions.
- 📚 Full Surface:
client.indexer,client.chain, andclient.nodecover market data, account history, chain state, and order placement.
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
Design Philosophy
Typed dYdX follows the principles outlined in this blog post.
Details matter. Developer experience matters.
License
MIT — see LICENSE.
Release files for typed-dydx 3.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| typed_dydx-3.4.0.tar.gz | 272.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| typed_dydx-3.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 711.4 kB
Release files / typed_dydx-3.4.0.tar.gz
| Download URL | typed_dydx-3.4.0.tar.gz |
|---|---|
| Size | 272.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
98b0f42e76b812845109a0d938592647c62205c177210fc4f0f021da21dcb33e
|
|
BLAKE2b-256 checksum How to use checksums |
267eb12c714c2010086152275820ebce1b4638d8c6d389afb0dd31816f6e348e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.
Transparency logRelease files / typed_dydx-3.4.0-py3-none-any.whl
| Download URL | typed_dydx-3.4.0-py3-none-any.whl |
|---|---|
| Size | 438.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
99a8fbd9e01202d0bdb7fe3e260274f0cff77052697e0fd7e2c264ebfe75388b
|
|
BLAKE2b-256 checksum How to use checksums |
32276c5c1990486b6a3e94fcd61f9ef996896d75c7a32c86f76bf63b90c1bd6d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.
Transparency log