Uniswap is a protocol on Ethereum for swapping ERC20 tokens. Unlike most exchanges, which are designed to take fees, Uniswap is designed to function as a public good — a tool for the community trade tokens without platform fees or middlemen.
Also unlike most exchanges, which match buyers and sellers to determine prices and execute trades, Uniswap uses a simple math equation and pools of tokens and ETH to do the same job.
- Ethereum wallet (refer to our guide here)
- Ethereum node (refer to our guide here)
- Hummingbot Gateway (done after connecting to Uniswap)
- Some ETH in wallet for gas
- Inventory on both base and quote assets for the connectors
When creating Hummingbot Gateway, it picks up the Ethereum settings in the global config file which we can set up in the Hummingbot client.
- Run the command
connect ethereumin the Hummingbot client
- Enter your wallet private key
- Enter Ethereum node address (starts with https://)
- Enter the websocket connection address of your Ethereum node (starts with wss://)
After adding your Ethereum wallet and node in Hummingbot, follow the guide in the link below on how to install Hummingbot Gateway.
Users have the option to use and configure DeFi Pulse Gas Price as the gas estimator.
- Sign up for a free account on DeFi Pulse Data
- Get your API key - once you log into DeFi Pulse Data, your API key can be found on the right side of the Dashboard. Click the copy button to copy your API Key.
- From the Hummingbot client, run
config ethgasstation_gas_enabled, and enter
config ethgasstation_api_keyand enter the DeFi Pulse Data API key
config ethgasstation_gas_leveland select desired gas level from
- This step is optional if you want to override the default Gas Station refresh time of 120 seconds. Do this by running the command