Official Python SDK for the Algofi DEX
https://algofi-amm-py-sdk.readthedocs.io/en/latest/index.html
This SDK is useful for developers who want to programatically interact with the Algofi DEX.
This SDK is currently under active early development and should not be considered stable.
algofi-amm-py-sdk is not yet released on PYPI. It can be installed directly from this repository with pip:
pip install git+https://github.com/Algofiorg/algofi-amm-py-sdk
To run examples:
- create an examples/.env file mnemonic=[25 char mnemonic]
- Fund the account for mnemonic with test ALGO + test ASAs
- Run examples (e.g. python3 add_liquidity.py). Be sure to set the correct asset ids and amounts.
This example shows how to add liquidity to an existing pool
This example shows how to burn LP tokens into their underlying assets
This example shows how to create a new pool
This example shows how to perform a flash loan from an Algofi DEX pool
This example shows how to swap an exact amount of an asset A into another asset B within a given pool (A, B)
This example shows how to swap an amount of asset A for an exact amount of asset B within a given pool (A, B)
algofi-amm-py-sdk is licensed under a MIT license except for the exceptions listed below. See the LICENSE file for details.