Giter Site home page Giter Site logo

syncswap-sdk's Introduction

Python SDK for Syncswap

How to use?

  • Swap two tokens
token_pair = {
    'token_in_address': '0x5aea5775959fbc2557cc8789bc1bf90a239d9a91', #WETH
    'pool_address': '0x80115c708E12eDd42E504c1cD52Aea96C547c05c', # WETH - USDC
    'amount': 1 # ETH
}

swap(os.environ['private_key'], token_pair)
  • Deposit Pool
# WETH is a special version of ETH that has more capabilities. 
# And USDC/ETH and USDC/WETH are the same pool. You can choose either ETH or WETH to collect when withdrawing from the pool.
deposit_params = {
    'pool_address': '0x80115c708E12eDd42E504c1cD52Aea96C547c05c',
    'token_in_amount': int("hex_number", 16),
    'token_in_address': '0x0000000000000000000000000000000000000000', # ETH
    'token_out_amount': int("hex_number", 16),
    'token_out_address': '0x3355df6D4c9C3035724Fd0e3914dE96A5a83aaf4', # USDC
    'min_liquidity': 0,
}

deposit_pool(os.environ['private_key'], deposit_params)

syncswap-sdk's People

Contributors

tiennampham23 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.