Skip to main content

A Python client for the Drift DEX

Project description

DriftPy

DriftPy is the Python client for the Drift protocol. It allows you to trade and fetch data from Drift using Python.

Read the full SDK documentation here!

Installation

pip install driftpy

Note: requires Python >= 3.10.

SDK Examples

  • examples/ folder includes more examples of how to use the SDK including how to provide liquidity/become an lp, stake in the insurance fund, etc.

Setting Up Dev Env

bash setup.sh

Building the docs

Local Docs: mkdocs serve

Updating public docs: poetry run mkdocs gh-deploy --force

Releasing a new version of the package

Development

Ensure correct python version (using pyenv is recommended):

pyenv install 3.10.11
pyenv global 3.10.11
poetry env use $(pyenv which python)

Install dependencies:

poetry install

Run tests:

poetry run bash test.sh

Run Acceptance Tests

poetry run bash acceptance_test.sh

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

driftpy-0.6.37.tar.gz (63.1 kB view hashes)

Uploaded Source

Built Distribution

driftpy-0.6.37-py2.py3-none-any.whl (70.3 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page