Giter VIP home page Giter VIP logo

algofi-amm-py-sdk's Introduction

algofi-amm-py-sdk

Official Python SDK for the Algofi DEX

Documentation

https://algofi-amm-py-sdk.readthedocs.io/en/latest/index.html

Design Goal

This SDK is useful for developers who want to programatically interact with the Algofi DEX.

Status

Documentation Status

This SDK is currently under active early development and should not be considered stable.

Installation

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:

  1. create an examples/.env file mnemonic=[25 char mnemonic]
  2. Fund the account for mnemonic with test ALGO + test ASAs
  3. Run examples (e.g. python3 add_liquidity.py). Be sure to set the correct asset ids and amounts.

Examples

Add liquidity (add_liquidity)

add_liquidity.py

This example shows how to add liquidity to an existing pool

Burn LP token (burn)

burn.py

This example shows how to burn LP tokens into their underlying assets

Create pool (create_pool)

create_pool.py

This example shows how to create a new pool

Flash loan (flash_loan)

flash_loan.py

This example shows how to perform a flash loan from an Algofi DEX pool

Swap exact for (swap_exact_for)

swap_exact_for.py

This example shows how to swap an exact amount of an asset A into another asset B within a given pool (A, B)

Swap for exact (swap_for_exact)

swap_for_exact.py

This example shows how to swap an amount of asset A for an exact amount of asset B within a given pool (A, B)

License

algofi-amm-py-sdk is licensed under a MIT license except for the exceptions listed below. See the LICENSE file for details.

algofi-amm-py-sdk's People

Contributors

idel906 avatar jgomezst avatar johnclarke96 avatar maks-ivanov avatar nuhash avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.