Skip to content

Uniswap

🛠 Connector Info

  • Exchange Type: Decentralized Exchange (DEX)
  • Market Type: Automatic Market Maker (AMM)
  • Maintenance Tier:
  • Maintainer: Hummingbot Foundation

Currently, Uniswap is a Gold exchange, as voted by HBOT holders in each quarterly Epoch. This means that Hummingbot Foundation maintains the components below and continually improves them to add more functionality. Gold connectors serve as the "gold standard" template for all other connectors of that type.

Component Status Notes
2ī¸âƒŖ AMM Connector ✅
3ī¸âƒŖ Range AMM Connector ✅
đŸ•¯ AMM Data Feed ✅

â„šī¸ Exchange Info

🔑 How to Connect

Create a wallet on one of the supported networks below:

Chain Networks
ethereum mainnet, arbitrum_one, optimism, goerli
polygon mainnet, mumbai

From inside the Hummingbot client, run gateway connect uniswap in order to connect your wallet:

Which chain do you want uniswap to connect to? (ethereum, polygon) >>> 
Which network do you want uniswap to connect to? (mainnet, goerli, arbitrum_one) >>>
Enter your ethereum-mainnet private key >>>>

If connection is successful (ethereum-mainnet):

The uniswap connector now uses wallet [pubKey] on ethereum-mainnet

2ī¸âƒŖ AMM Connector

Integration to this DEX's swap pricing and execution endpoints

Endpoints

  • /amm/price
  • /amm/trade
  • /amm/estimateGas

For more info, run Gateway and go to https:localhost:8080 in your browser to see detailed documentation for each endpoint.

3ī¸âƒŖ Range AMM Connector

Integration to this DEX's concentrated liquidity range provision endpoints

Endpoints

  • /amm/liquidity/price
  • /amm/liquidity/add
  • /amm/liquidity/remove
  • /amm/liquidity/position
  • /amm/liquidity/collect_fees

For more info, run Gateway and go to in your browser to see detailed documentation for each endpoint.

đŸ•¯ AMM Data Feed

Data feed of this exchange's real-time prices

Usage

from hummingbot.data_feed.amm_gateway_data_feed import AmmGatewayDataFeed
prices = AmmGatewayDataFeed(
        connector_chain_network="uniswap_polygon_mainnet",
        trading_pairs={"WETH-USDC", "WETH-DAI"},
        order_amount_in_base=Decimal("1"),
    )