Code Monkey home page Code Monkey logo

algofi-py-sdk's Introduction

algofi-py-sdk

Official Python SDK for the Algofi Lending Protocol

Documentation

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

Design Goal

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

Status

Documentation Status

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

Installation

algofi-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-py-sdk

To run examples:

  1. create an examples/.env file mnemonic=[25 char mnemonic] storage_mnemonic="" (leave empty string, examples/setup.py will set)
  2. Fund the account for mnemonic with 20 test ALGO
  3. Run python3 examples/setup.py
  4. Run examples e.g. examples/add_collateral.py

Examples

Add liquidity (mint)

mint.py

This example shows how to add liquidity to the platform

Burn asset (burn)

burn.py

This example shows how to burn bank assets to redeem for underlying liquidity

Add collateral (add_collateral)

add_collateral.py

This example shows how to add minted bank assets to collateral

Add liquidity to collateral (mint_to_collateral)

mint_to_collateral.py

This example shows how to add liquidity to the platform collateral

Remove collateral (remove_collateral)

remove_collateral.py

This example shows how to remove bank asset collateral from platform

Remove collateral to underlying (remove_collateral_underlying)

remove_collateral_underlying.py

This example shows how to remove bank asset collateral from platform to underlying asset

Borrow (borrow)

borrow.py

This example shows how to borrow an underlying asset against provided collateral

Repay Borrow (repay_borrow)

repay_borrow.py

This example shows how to repay borrowed assets

Staking (stake & unstake)

staking.py

This example shows how to stake and unstake in a staking contract

License

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

algofi-py-sdk's People

Contributors

johnclarke96 avatar paul-colella avatar maks-ivanov avatar alec-schneider avatar zhengxunwu3 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.