Skip to main content

A fully typed, validated async client for the dYdX API.

Project description

Typed dYdX

A fully typed, validated async client for the dYdX v4 APIs

Use autocomplete instead of documentation.

from dydx import DYDX

async with DYDX.new() as dydx:
  market = await dydx.indexer.data.get_market('BTC-USD')
  print(market['oraclePrice'])

Why Typed dYdX?

  • 🎯 Precise Types: Strong typing throughout, so your editor can help before runtime does.
  • ✅ Automatic Validation: Catch upstream API changes earlier, where they are easier to debug.
  • ⚡ Async First: Built for concurrent, network-heavy workflows.
  • 🔒 Safer Usage: Typed inputs and explicit errors reduce avoidable mistakes.
  • 🎨 Better DX: Clear routing, sensible defaults, and minimal ceremony.
  • 📦 Practical Extras: Pagination, streams, and helpers where they actually help.

Package Shape

This package intentionally follows the way dYdX itself is split:

  • DYDX from dydx as the default authenticated entry point when you want both indexer and trading access together
  • Indexer from dydx for HTTP market/account data and WebSocket streams
  • PublicNode from dydx.node for public node reads like prices, CLOB pair data, and fee tiers
  • PrivateNode from dydx.node for signed trading actions like placing and cancelling orders

Indexer.data includes the full documented indexer HTTP read surface, plus a few convenience helpers like get_market(), get_open_position(), and the *_paged() iterators.

Installation

pip install typed-dydx

Documentation

Read the docs

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-1.0.0.tar.gz (41.6 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-1.0.0-py3-none-any.whl (86.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for typed_dydx-1.0.0.tar.gz
Algorithm Hash digest
SHA256 5a60250cbd82f058782a1e533a71b6599524832b1c4a52a70191ef8b16acb804
MD5 27af72ad69490e91dd85bb974bb917d4
BLAKE2b-256 0d51815a4336047cd05892b1e1d5011ca833d6bfe934c12e3231a8ce306f8835

See more details on using hashes here.

File details

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

File metadata

  • Download URL: typed_dydx-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 86.1 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-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 15341219401bcf80a34d2c48744bddd9c5574c125e298ef6eb6bee347866e636
MD5 c2808b150b8e40b37a6adb08d7372fcf
BLAKE2b-256 810d1baff87ca8b70190e68c62c753606685df24b308fb4eccf663d6d858af2e

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