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
python new_release.py
- Create a new release at https://github.com/drift-labs/driftpy/releases.
- (The CI process will upload a new version of the package to PyPI.)
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)
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | d219d923fb2fb72f174ac51cfd8ef2f34dcb5d41b8a5f3d6e9e0765da3bcd699 |
|
MD5 | 67f9b45bf5581432d82424cb423f0d91 |
|
BLAKE2b-256 | 66c9bf34ac860966a0cb759e9271220725903f4d2299dc49c38c0e72bb24377b |
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | a8f2c68cabad10cb761ebc07d062662abe8456bf2647710c7e2b10fbe177d69c |
|
MD5 | ccfbd8fb4f4398fe52be9850502f90ef |
|
BLAKE2b-256 | d0767a6c98fc814d89f96d93287f1f247fbd701d82fc90e66015b4311246b2c5 |