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!
pip install driftpy
Note: requires Python >= 3.10.
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.
bash setup.sh
Local Docs: mkdocs serve
Updating public docs: poetry run mkdocs gh-deploy --force
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.)
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