Skip to main content

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

Project description

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

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

typed_dydx-2.0.7.tar.gz (266.8 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.0.7-py3-none-any.whl (414.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: typed_dydx-2.0.7.tar.gz
  • Upload date:
  • Size: 266.8 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.0.7.tar.gz
Algorithm Hash digest
SHA256 802d81c771247436f668ca04589c2de229c0f00ebe889b7d47afa3b1e74dd231
MD5 b3d01270ffc5b54276dd9688843bce8d
BLAKE2b-256 02436f305151b6f6d01d843c21048a50e6e9026690020be91a4230a0527d8e3c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: typed_dydx-2.0.7-py3-none-any.whl
  • Upload date:
  • Size: 414.7 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.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 34692086cd1b2be13e3f0039eaf9b4223227896e685f690b62b5788530162d17
MD5 d3656fc3f286b8386dc85f8f995019b8
BLAKE2b-256 aa1a4ff3959b28af4c78a6c47cd52fe840d1755b2f907a5404cb395058d34ecb

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 Pingdom Monitoring Sentry Error logging StatusPage Status page