Skip to content

Pancakeswap đŸĨˆ

🛠 Connector Info

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

Currently, PancakeSwap is a Silver exchange, as voted by HBOT holders in each quarterly Epoch. This means that Hummingbot Foundation maintains the components below via Bounties, tracking improvements made to the Gold exchange connectors of that type.

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

ℹī¸ Exchange Info

🔑 How to Connect

Create a wallet on one of the supported networks below:

Chain Networks
binance-smart-chain mainnet, testnet

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

Which chain do you want pancakeswap to connect to? (binance-smart-chain) >>> 
Which network do you want pancakeswap to connect to? (mainnet, testnet) >>>
Enter your binance-smart-chain-mainnet private key >>>>

If connection is successful (binance-smart-chain-mainnet):

The pancakeswap connector now uses wallet [pubKey] on binance-smart-chain-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 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="pancakeswap_binance_smart_chain_mainnet",
        trading_pairs={"WBNB-USDT", "CAKE-USDT"},
        order_amount_in_base=Decimal("1"),
    )