dYdX Chain Technical Docs
  • 👋dYdX Chain Technical Documentation
  • Getting Started
    • 💡Developer Tools
      • dYdX Chain Client for Javascript
        • Example #1: Accessing Subaccount Data
        • Example #2: Faucet Endpoints
        • Additional Javascript Client Examples
      • dYdX Chain Client for Python
        • Example #1: Placing, Replacing, and Canceling Orders
        • Exmaple #2: Trading with HRN
        • Additional Python Client Examples
      • dYdX CLI
        • Setup the dYdX CLI
        • EOA Wallets
        • Multisig wallet
        • Submit a governance proposal
    • ✨Developer Guides
    • 🦊User Guides
      • How to use Squid UI for cross-chain deposits to dYdX V4
      • How to use CCTP UI for cross-chain deposits to dYdX V4
      • How to withdraw and transfer funds from a subaccount using Command Line
    • ❓FAQ & Resources
    • 🖥️Open Source Repositories
  • Validators
    • 🛠️Getting set up
      • Hardware Requirements
      • Required Node Configs
      • Running a Validator
      • Running a Full Node
      • Snapshots
      • Validator Upgrades
    • ❓FAQ & Resources
    • 🧑Active Validator Slack
  • Front End & Wallets
    • 📚Architecture Overview
    • 🌎Web Front End
    • ❓FAQ & Resources
  • Data Dashboards & Open APIs
    • 📊Public Dashboards
    • ❓FAQ & Resources
  • Disclaimers
    • 📄Disclaimer
    • 🔓Privacy Policy
Powered by GitBook
On this page
  • Repository: v4-client-py
  • Installation
  • Development Setup - VS Code
  • Troubleshootimg
  1. Getting Started
  2. Developer Tools

dYdX Chain Client for Python

PreviousAdditional Javascript Client ExamplesNextExample #1: Placing, Replacing, and Canceling Orders

Last updated 1 year ago

Python client for dYdX (v4 API).

Repository:


Installation

The v4-client-py package is available on . Install with pip

pip install v4-client-py

Development Setup - VS Code

Install Microsoft Python extensions

Shift-Command-P: Create Python Environment
Select Venv
Select Python 3.9 as interpreter
Select requirements.txt as the dependencies to install

Install requirements

pip install -r requirements.txt

VS Code will automatically switch to .venv environment when running example code. Or you can manually switch

source ~/<project_dir>/.venv/bin/activate

Set PYTHONPATH

export PYTHONPATH=~/<project_dir>/.venv/lib/<Python version>/site-packages

Troubleshootimg

Cython and Brownie must be installed before cytoolz

If there is any issue with cytoolz, uninstall cytoolz, Brownie and Cython, reinstall Cython, Brownie and cytoolz sequentially.

VS Code may need to be restarted to have Cython functioning correctly

💡
v4-client-py
PyPI