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.5.tar.gz (265.7 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.5-py3-none-any.whl (413.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for typed_dydx-2.0.5.tar.gz
Algorithm Hash digest
SHA256 00e3c809bbc4a31d8996bfe29c13cd24d7cecd6073548db74f07567015eac736
MD5 5166a09f59bc29ed4e1de0336c1113ba
BLAKE2b-256 f10d73fb8f69df9464295df231b02c70f9cce642faf9a98f4c3d0ed863949a0c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: typed_dydx-2.0.5-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

Hashes for typed_dydx-2.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 45d6189cc1aa414398d1c24d391ac111afcff34d262a863e90d5716635b513f1
MD5 0bcfbb9cdb78567c44a77d81ec0d2879
BLAKE2b-256 e79d426e5e6acd50519f206af3724a04154d026b5e897ecdc2f6637371e177d4

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