All Projects → uniswap-python → uniswap-python

uniswap-python / uniswap-python

Licence: MIT License
🦄 The unofficial Python client for the Uniswap exchange.

Programming Languages

python
139335 projects - #7 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to uniswap-python

Uniswap Python
🦄 The unofficial Python client for the Uniswap exchange.
Stars: ✭ 191 (-64.17%)
Mutual labels:  wrapper, crypto, trading, currency, trading-api, exchange, trade, eth, dex
Kupi Terminal
Ccxt based, open source, customized, extendable trading platform that supports 130+ crypto exchanges.
Stars: ✭ 104 (-80.49%)
Mutual labels:  crypto, trading, trading-api, exchange, trade
Ccxt
A JavaScript / Python / PHP cryptocurrency trading API with support for more than 100 bitcoin/altcoin exchanges
Stars: ✭ 22,501 (+4121.58%)
Mutual labels:  crypto, trading, exchange, trade, eth
Qtbitcointrader
Secure multi crypto exchange trading client
Stars: ✭ 520 (-2.44%)
Mutual labels:  crypto, trading, exchange, trade
uniswap-skim
scripts to scan all of the uniswapV2🦄 contracts on ethereum and search for skim opportunities
Stars: ✭ 126 (-76.36%)
Mutual labels:  dex, defi, uniswap, uniswap-exchange
b2s-trader
Application to automate trading process
Stars: ✭ 22 (-95.87%)
Mutual labels:  crypto, trading, exchange, trade
Ccxt.net
CCXT.NET – CryptoCurrency eXchange Trading Library for .NET
Stars: ✭ 89 (-83.3%)
Mutual labels:  crypto, trading, exchange, trade
every-eos
Decentralized exchange based on eos.io
Stars: ✭ 20 (-96.25%)
Mutual labels:  exchange, trade, dex, decentralized-exchange
tellerbot
Telegram Bot for over-the-counter trading
Stars: ✭ 17 (-96.81%)
Mutual labels:  trading, currency, exchange, orderbook
Ccxt Rest
Open Source Unified REST API of 100+ Crypto Exchange Sites (18k+ docker pulls) - https://ccxt-rest.io/
Stars: ✭ 210 (-60.6%)
Mutual labels:  crypto, trading, exchange, eth
Python Poloniex
Poloniex API wrapper for Python 2.7 & 3
Stars: ✭ 557 (+4.5%)
Mutual labels:  wrapper, trading, trading-api, exchange
hurtrade
An Open Source Forex Trading Platform
Stars: ✭ 22 (-95.87%)
Mutual labels:  trading, exchange, trade
PancakeSwapBot
PancakeSwap prediction bot
Stars: ✭ 38 (-92.87%)
Mutual labels:  crypto, trading, defi
backend
Bitex Python crypto exchange backend
Stars: ✭ 23 (-95.68%)
Mutual labels:  crypto, exchange, trade
coinmarketcap-new-listings-sniper-bot
Sniper bot to buy new tokens listed on Coinmarketcap.
Stars: ✭ 55 (-89.68%)
Mutual labels:  crypto, trading, defi
zeneth
🏵️ Let Your ETH Chill — Gasless Ethereum account abstraction with Flashbots
Stars: ✭ 112 (-78.99%)
Mutual labels:  eth, defi, uniswap
Coinbase.Pro
📈 A .NET/C# implementation of the Coinbase Pro API.
Stars: ✭ 63 (-88.18%)
Mutual labels:  trading, trading-api, orderbook
algobot
Cryptocurrency trading bot with a graphical user interface with support for simulations, backtests, optimizations, and running live bots.
Stars: ✭ 776 (+45.59%)
Mutual labels:  crypto, trading, trade
rainbow
DeFi options comparator to detect market opportunities with CLI (Go) and web (Vue3).
Stars: ✭ 40 (-92.5%)
Mutual labels:  dex, decentralized-exchange, defi
botdexdamar
🤖 multichain trading bot with sniper, frontrun, backrun, sandwich
Stars: ✭ 124 (-76.74%)
Mutual labels:  dex, defi, uniswap

uniswap-python

GitHub Actions codecov Downloads License PyPI Typechecking: Mypy Code style: black

GitHub Repo stars Twitter Follow

The unofficial Python client for Uniswap.

Documentation is available at https://uniswap-python.com/

Functionality

  • A simple to use Python wrapper for all available contract functions and variables
  • A basic CLI to get prices and token metadata
  • Simple parsing of data returned from the Uniswap contract

Supports

  • Uniswap v3 (as of v0.5.0)
    • Including beta support for Arbitrum & Optimism deployments (as of v0.5.4)
  • Uniswap v2 (as of v0.4.0)
  • Uniswap v1 (deprecated)
  • Various forks (untested, but should work)
    • Honeyswap (xDai)
    • Pancakeswap (BSC)
    • Sushiswap (mainnet)

Getting Started

See our Getting started guide in the documentation.

Testing

Unit tests are under development using the pytest framework. Contributions are welcome!

Test are run on a fork of the main net using ganache-cli. You need to install it with npm install -g ganache-cli before running tests.

To run the full test suite, in the project directory set the PROVIDER env variable to a mainnet provider, and run:

poetry install
export PROVIDER= # URL of provider, e.g. https://mainnet.infura.io/v3/...
make test
# or...
poetry run pytest --capture=no  # doesn't capture output (verbose)

Support our continued work!

You can support us on Gitcoin Grants.

Authors

Want to help out with development? We have funding to those that do! See #181

Changelog

0.5.4

  • added use of gas estimation instead of a fixed gas limit (to support Arbitrum)
  • added use_estimate_gas constructor argument (used in testing)
  • added constants/basic support for Arbitrum, Optimism, Polygon, and Fantom. (untested)
  • incomplete changelog

0.5.3

  • incomplete changelog

0.5.2

  • incomplete changelog

0.5.1

  • Updated dependencies
  • Fixed minor typing issues

0.5.0

  • Basic support for Uniswap V3
  • Added new methods get_price_input and get_price_output
  • Made a lot of previously public methods private
  • Added documentation site
  • Removed ENS support (which was probably broken to begin with)

0.4.6

  • Bug fix: Update bleach package from 3.1.4 to 3.3.0

0.4.5

  • Bug fix: Use .eth instead of .ens

0.4.4

  • General: Add new logo for Uniswap V2
  • Bug fix: Invalid balance check (#25)
  • Bug fix: Fixed error when passing WETH as token

0.4.3

  • Allow kwargs in approved decorator.

0.4.2

  • Add note about Uniswap V2 support

0.4.1

  • Update changelog for PyPi and clean up

0.4.0

A huge thank you Erik Bjäreholt for adding Uniswap V2 support, as well as all changes in this version!

  • Added support for Uniswap v2
  • Handle arbitrary tokens (by address) using the factory contract
  • Switched from setup.py to pyproject.toml/poetry
  • Switched from Travis to GitHub Actions
  • For CI to work in your repo, you need to set the secret MAINNET_PROVIDER. I use Infura.
  • Running tests on a local fork of mainnet using ganache-cli (started as a fixture)
  • Fixed tests for make_trade and make_trade_output
  • Added type annotations to the entire codebase and check them with mypy in CI
  • Formatted entire codebase with black
  • Moved stuff around such that the basic import becomes from uniswap import Uniswap (instead of from uniswap.uniswap import UniswapWrapper)
  • Fixed misc bugs

0.3.3

  • Provide token inputs as addresses instead of names

0.3.2

  • Add ability to transfer tokens after a trade
  • Add tests for this new functionality

0.3.1

  • Add tests for all types of trades

0.3.0

  • Add ability to make all types of trades
  • Add example to README

0.2.1

  • Add liquidity tests

0.2.0

  • Add liquidity and ERC20 pool methods

0.1.1

  • Major README update

0.1.0

  • Add market endpoints
  • Add tests for market endpoints
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].