[Quickstart] Configure Your First Trading Bot¶
If you have successfully installed Hummingbot using our install scripts, you should see the command line-based Hummingbot interface below.
Step 1: Navigate the Client Interface¶
First, let's walk through the design of the Hummingbot client interface:
- Left top pane: where the responses to your commands are printed
- Left bottom pane: where you input commands to control your bot
- Right pane: where logs of live trading bot activity are printed
help to see a list of commands:
1 2 3 4 5 6 7 8
>>> help help Print a list of commands start Start market making with Hummingbot config Add your personal credentials e.g. exchange API keys status Get current bot status bounty Participate in hummingbot's liquidity bounty programs etc...
Step 2: Enable Paper Trading Mode (Optional)¶
You can run Hummingbot and simulate trading strategies without executing and placing actual trades. Run command
paper_trade at the beginning to enable this feature.
1 2 3 4 5 6
Enable paper trading mode (y/n) ? >>> y New config saved: paper_trade_enabled: y Your configuration is incomplete. Would you like to proceed and finish all necessary configurations? (y/n) >>> n
For more information about this feature, see Paper Trading Mode in the User Manual. To perform actual trading, proceed to the next step.
Step 3: Register for Liquidity Bounties (Optional)¶
Liquidity Bounties allow you to earn rewards by running market making bots for specific tokens and/or exchanges.
Hummingbot enters into partnerships with token issuers and exchanges to administer bounty programs that reward Hummingbot users based on their volume of filled market maker orders. For more information, please see Bounties FAQ.
bounty --register to start the registration process:
- Agree to the Terms & Conditions
- Allow us to collect your trading data for verification purposes
- Enter your Ethereum wallet address
- Enter your email address
- Confirm information and finalize
Step 4: Configure a market making bot¶
Now, let's walk through the process of configuring a basic market making bot.
Tip: Autocomplete Inputs during Configuration
When going through the command line config process, pressing
<TAB> at a prompt will display valid available inputs.
config to start the configuration walkthrough¶
We'll create a configuration for the
pure market making strategy which makes a market on a single trading pair.
Values of parameters from here on are indicative for illustrative purposes only; this is not financial advice.
1 2 3 4 5
What is your market making strategy >>> pure_market_making Import previous configs or create a new config file? (import/create) >>> create
b) Select the exchange and trading pair¶
Next, select which exchange and trading pair you want to use. Note that you may need an exchange account and inventory of crypto assets deposited on the exchange. You can view more information here about the exchanges Hummingbot currently supports.
You can select a centralized exchange like Binance:
1 2 3 4 5
Enter your maker exchange name >>> binance Enter the token symbol you would like to trade on binance (e.g. ZRXETH) >>> ETHUSDT
Alternatively, you can select a decentralized exchange like Radar Relay:
1 2 3 4 5
Enter your maker exchange name >>> radar_relay Enter the token symbol you would like to trade on radar_relay (e.g. ZRX-WETH) >>> ZRX-WETH
Options available are based on each exchange's methodology for labeling currency pairs. Ensure that the pair is a valid pair for the selected exchange.
c) Enter market making parameters¶
Parameters control the behavior of your bot by setting the spread utilized, the size of each order, how many orders to place, and how often to refresh orders. A more detailed explanation of each prompt for pure market making strategy are explained here in the User Manual.
1 2 3 4 5 6 7 8 9 10 11 12 13 14
Enter quantity of orders per side [bid/ask] (single/multiple) >>> single How far away from the mid price do you want to place the first bid order (Enter 0.01 to indicate 1%)? >>> 0.01 How far away from the mid price do you want to place the first ask order (Enter 0.01 to indicate 1%)? >>> 0.01 How often do you want to cancel and replace bids and asks (in seconds). (Default is 60 seconds) ? >>> 60 What is your preferred quantity per order (denominated in the base asset, default is 1) ? >>> 0.2
d) Enable inventory skew¶
This function allows you to set a target base/quote inventory ratio. For example, you are trading ZRX-WETH pair while your current asset inventory consists of 80% ZRX and 20% WETH. Setting this to 0.5 will allow the bot to automatically adjust the order amount on both sides, selling more and buying less ZRX until you get a 50%-50% ratio.
1 2 3 4 5
Would you like to enable inventory skew? (y/n) >>> y What is your target base asset inventory percentage (Enter 0.01 to indicate 1%). Default is 0.5 (50%) ? >>> 0.5
Here's an inventory skew calculator that shows how it adjusts order sizes.
e) Enter your exchange API keys OR Ethereum wallet/node info¶
Now that you have set up how your market making bot will behave, it's time to provide it with the necessary API keys (for centralized exchanges) or wallet/node info (for decentralized exchanges) that it needs to operate:
Copying and pasting in Windows
If you are using a Windows machine, you may need to activate copying and pasting on Docker Toolbox. Please see this page for instructions on how to activate this.
If you selected a centralized exchange like Binance in Step 3(b), you will need to :
1 2 3 4 5
Enter your Binance API key >>> ****************************** Enter your Binance API secret >>> ******************************
Alternatively, if you selected a decentralized exchange like IDEX, DDEX, Bamboo Relay, or Radar Relay in Step 3(b):
1 2 3 4 5 6 7 8 9 10 11
Would you like to import an existing wallet or create a new wallet? (import/create) >>> import Your wallet private key >>> ****************************** A password to protect your wallet key >>> [ENTER A SECURE PASSWORD THAT UNLOCKS THIS WALLET FOR EACH HUMMINGBOT SESSION] Which Ethereum node would you like your client to connect to? >>> [ENTER ADDRESS OF YOUR ETHEREUM NODE]
f) Enter kill switch parameters¶
Hummingbot comes with utilities that help you run the bot, such as:
- Kill switch: Automatically stops the bot after a certain performance threshold, which can be either positive or negative
- Exchange rates: Sets exchange rates between stablecoins and other crypto assets so that you can run bots on non-identical trading pairs on different exchanges
- Telegram integration: Control your trading bot from anywhere by hooking up a Telegram bot that can issue commands
For more information on these utilities, see the Utilities section in the User Manual. By default, only the kill switch is configured via the walkthrough.
Activate the kill switch feature and tell it to stop the bot when it reaches a specific % loss:
1 2 3 4 5
Would you like to enable the kill switch? (y/n) >>> y At what profit/loss rate would you like the bot to stop? (e.g. -0.05 equals 5% loss) >>> -0.05
Step 5: Adjusting Parameters¶
If you want to reconfigure the bot from the beginning, type
config and reply
y to the question
Would you like to reconfigure the bot? (y/n) >>>?. This will prompt all questions during initial set up.
Alternatively, the command
list configs will show your current bot parameters both global and the strategy configs.
1 2 3 4 5 6 7 8 9 10 11 12 13
>>> list configs global configs: ... pure_market_making strategy configs: ... mode single bid_place_threshold 0.01 ask_place_threshold 0.01 cancel_order_wait_time 60 order_amount 0.2 ...
You can specify which parameter you want to configure by doing
config $parameter_name. As an example, we want to widen the
bid_place_threshold to 0.02. This tells the bot to place buy order 2% lower than the mid price, rather than 1%.
1 2 3 4 5 6 7 8 9
>>> config bid_place_threshold Please follow the prompt to complete configurations: How far away from the mid price do you want to place the first bid order (Enter 0.01 to indicate 1%)? >>> 0.02 New config saved: bid_place_threshold: 0.02
You can also exit the bot with
exit and edit the automatically generated configuration file
conf_pure_market_making_0.yml. This file is saved in the directory
hummingbot_files/hummingbot_conf/ in your root. For more information, see Troubleshooting.
If you completed the steps above successfully, you should see the message:
1 2 3
Config process complete. Enter "start" to start market making. >>> start