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.1.tar.gz (256.5 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.1-py3-none-any.whl (406.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: typed_dydx-2.1.1.tar.gz
  • Upload date:
  • Size: 256.5 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.1.tar.gz
Algorithm Hash digest
SHA256 808987729563e960fed37329385080719c07d83111a3aedd6096797e15867c76
MD5 0bf30331d387f516c74c8b0059c3c696
BLAKE2b-256 8b198dd941d4f0a0d8afe9b000a6563ee418179490aade99069e6191ab801743

See more details on using hashes here.

File details

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

File metadata

  • Download URL: typed_dydx-2.1.1-py3-none-any.whl
  • Upload date:
  • Size: 406.1 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0d2061c8512265b5da05fdfe4b54cb7e06f6f3e838bf9bed137755cae8c1d4c8
MD5 3d49a42f097ff54375b63a324f5f2465
BLAKE2b-256 245674a746cf1d57d6f994c515295dfe9c615c0091cc33daf196b9137e102a13

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