Skip to main content

Typed dYdX

A fully typed, validated async client for the dYdX Indexer, Node, Cosmos gRPC, and CometBFT APIs.

PyPI version Python versions Docs License



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, and client.node.

Installation

pip install typed-dydx

How To

Reference

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.1.2.tar.gz (257.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

typed_dydx-2.1.2-py3-none-any.whl (406.8 kB view details)

Uploaded Python 3

File details

Details for the file typed_dydx-2.1.2.tar.gz.

File metadata

  • Download URL: typed_dydx-2.1.2.tar.gz
  • Upload date:
  • Size: 257.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for typed_dydx-2.1.2.tar.gz
Algorithm Hash digest
SHA256 e8f5a1984e6dfaace3701766be848bf776a4418e404e7d66f04befe091ab788a
MD5 d30dfb4df4c0df9a3cf8c350c3bd32f4
BLAKE2b-256 aa107e175e96dc698d37fa501617e5bfe3b6b1311f2429eeeb27226587d63aa7

See more details on using hashes here.

File details

Details for the file typed_dydx-2.1.2-py3-none-any.whl.

File metadata

  • Download URL: typed_dydx-2.1.2-py3-none-any.whl
  • Upload date:
  • Size: 406.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for typed_dydx-2.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5b1627b438a8a589e1f79142107641ccf51cc92b50fb4b5b3f44e9f2d54e5224
MD5 ca42bc3ce326f309804df7cc532ffcad
BLAKE2b-256 a70ef8cbc76fd1143d87215ba41459ac3ffea92cde259d8cf89047fd6bb0681f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page