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.42.tar.gz (62.1 kB view details)

Uploaded Source

Built Distribution

driftpy-0.6.42-py2.py3-none-any.whl (70.8 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file driftpy-0.6.42.tar.gz.

File metadata

  • Download URL: driftpy-0.6.42.tar.gz
  • Upload date:
  • Size: 62.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.10.10 Linux/5.15.0-1041-azure

File hashes

Hashes for driftpy-0.6.42.tar.gz
Algorithm Hash digest
SHA256 d219d923fb2fb72f174ac51cfd8ef2f34dcb5d41b8a5f3d6e9e0765da3bcd699
MD5 67f9b45bf5581432d82424cb423f0d91
BLAKE2b-256 66c9bf34ac860966a0cb759e9271220725903f4d2299dc49c38c0e72bb24377b

See more details on using hashes here.

File details

Details for the file driftpy-0.6.42-py2.py3-none-any.whl.

File metadata

  • Download URL: driftpy-0.6.42-py2.py3-none-any.whl
  • Upload date:
  • Size: 70.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.10.10 Linux/5.15.0-1041-azure

File hashes

Hashes for driftpy-0.6.42-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a8f2c68cabad10cb761ebc07d062662abe8456bf2647710c7e2b10fbe177d69c
MD5 ccfbd8fb4f4398fe52be9850502f90ef
BLAKE2b-256 d0767a6c98fc814d89f96d93287f1f247fbd701d82fc90e66015b4311246b2c5

See more details on using hashes here.

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