Hummingbot Gateway is a API server that allows Hummingbot to connect to protocols that are used in the amm-arb strategy and other future strategies. This is a light web server that enables Hummingbot client to send and receive data from different blockchain protocols and provides an easier entry point for external devs to build connectors to other protocols.
Access gateway information with the following commands.
Create SSL Certificates
- Run the command
gateway generate_certsin the Hummingbot client
- Enter a passphrase to be used later during installation
- Take note of the absolute path where your Hummingbot files are stored. You can run the command
pwdfrom the terminal while inside the folder.
- Copy and paste the following commands to your terminal:
curl https://raw.githubusercontent.com/CoinAlpha/hummingbot/development/installation/docker-commands/create-gateway.sh -o create-gateway.sh curl https://raw.githubusercontent.com/CoinAlpha/hummingbot/development/installation/docker-commands/update-gateway.sh -o update-gateway.sh chmod a+x *.sh ./create-gateway.sh
wget https://raw.githubusercontent.com/CoinAlpha/hummingbot/development/installation/docker-commands/create-gateway.sh wget https://raw.githubusercontent.com/CoinAlpha/hummingbot/development/installation/docker-commands/update-gateway.sh chmod a+x *.sh ./create-gateway.sh
It downloads the scripts from GitHub, sets their correct permission and runs the
- Answer each prompt, review the summary and enter Y to proceed with the installation.
By default, Gateway will install on port
5000 which Hummingbot will connect to. If the default port is not available, Gateway will find the next port number.
- The file
gateway.envis created where your Gateway settings are saved.
In case the port number used by Gateway is not set to the default value of
5000, make sure to set the
gateway_api_port in the Hummingbot client to match the same port number.
- Run command
config gateway_api_portin the Hummingbot client
- Enter the port number indicated when Gateway was created
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.
When setting up your Hummingbot gateway, you will be ask if you want to enable ETH Gas price. If yes,
- You would need to enter the DeFI pulse API key
- Enter gas level you want to use for ETH transactions
- Refresh time for ETH gas price look up
If you choose not to enable ETH gas price, you would only need to set up the fixed gas price to use for ETH transactions.
To update the docker container, run the
update-gateway.sh script and and follow the prompt instructions. The update script allows you to stop and delete the running instance, and update the docker image if it is not the latest. Upon completion, it will automatically execute the create-gateway.sh script to create a new Gateway container instance.
Installation applies to Windows, Linux or macOS
- NodeJS - visit this page to download and install.
- Tested versions
v10.22.0, v10.22.1 and v10.23.1.
# to check your current version node -v
- Yarn - its required for node package installations.
# to install yarn npm install yarn
- Tested versions
v1.22.5 and v1.22.10
Steps for setting up gateway-api
# clone the repo git clone https://github.com/CoinAlpha/gateway-api
# open directory cd gateway-api
# install npm packages yarn install
# copy sample environment cp .env.example .env
.envfile with your favorite text editor then save changes.
- There are 3 ways to start the gateway
# run dev mode with hot reload on code changes yarn run dev
# run debug mode with additional route debug logging yarn run debug
# run prod mode yarn run start
This guide will help you setup gateway-api instance for Kovan testnet. This will help you run some test to AMM_Arbitrage strategy without risking your funds.
You must have set your ETH wallet to Kovan test network, for metamask you can click the
Ethereum Mainnet and select
Kovan Test Network. To get test assets, you can go to https://gitter.im/kovan-testnet/faucet and login your github account. Provide your ETH wallet address.
When connecting your Hummingbot to ethereum, you need to change to
kovan instead of mainnet for your ethreum chain, websocket and node. See example below,