Troubleshooting

Some of the common issues and error messages found when using Hummingbot and how to resolve them.

Installation

Permission denied after Docker installation

1
2
3
4
docker: Got permission denied while trying to connect to the Docker daemon socket at
unix:///var/run/docker.sock: Post
http://%2Fvar%2Frun%2Fdocker.sock/v1.39/containers/create?name=hummingbot_instance:
dial unix /var/run/docker.sock: connect: permission denied.

Exit from your virtual machine and restart.

Package 'docker.io' has no installation candidate

Install Docker using get.docker.com script as an alternative. Install curl tool then download and run get.docker.com script.

1
2
apt-get install curl
curl -sSL https://get.docker.com/ | sh

Allow docker commands without requiring sudo prefix (optional).

1
sudo usermod -a -G docker $USER

Conda command not found

1
2
$ conda
-bash: conda: command not found

If you have just installed conda, close terminal and reopen a new terminal to update the command line's program registry.

If you use zshrc or another shell other than bash, see the note at the bottom of this section: install dependencies.

Syntax error invalid syntax

1
2
3
4
File "bin/hummingbot.py", line 40
  def detect_available_port(starting_port: int) -> int:
                                           ^
SyntaxError: invalid syntax

Make sure you have activated the conda environment: conda activate hummingbot.

Module not found error

1
2
3
4
5
ModuleNotFoundError: No module named 'hummingbot.market.market_base'

root - ERROR - No module named
‘hummingbot.strategy.pure_market_making.inventory_skew_single_size_sizing_delegate’
(See log file for stack trace dump)

Solution 1: exit Hummingbot to compile and restart using these commands:

1
2
3
conda activate hummingbot
./compile
bin/hummingbot.py

Solution 2: make sure you have conda section in ~/.bashrc. Run conda init if it is not there. Explanation: if you have custom PATH defined in ~/.bashrc, supplied scripts (./compile etc) may pick wrong python binary, causing different errors.

Unable to use my downloaded scripts using Hummingbot docker build.

This happens using the docker build version of Hummingbot. By default hummingbot_scripts folder is empty but its already mounted by the docker during creation. In able to use the sample scripts make sure to download the scripts into hummingbot_files/hummingbot_scripts folder.

To view or download the sample scripts please visit our github page. Start the bot then enable the scripts using config script_enabled then config script_file_path to locate and load the sample scripts.

Note

The hummingbot_files is the default name of the parent directory. This can be different depending on the setup when the instance was created.

Configuration

I can't copy and paste my API keys!

Copying and pasting your API keys into Hummingbot may be problematic, especially in Docker installations or for PuTTY users. See below for how to copy/paste in different environments.

other ways to copy and paste

COPY on Windows or Linux

1
2
3
Ctrl + C 
Ctrl + Insert
Ctrl + Shift + C

PASTE on Windows or Linux

1
2
3
Ctrl + V
Shift + Insert
Ctrl + Shift + V

paste items from clipboard in putty

You should be able to paste items from your clipboard by doing mouse right-click or SHIFT + right-click. If that doesn't work, follow the steps below.

  1. If you are currently logged in a session, left-click on the upper left hand corner of the PuTTY window or a right-click anywhere on the title bar then select "Change Settings". If not, proceed to next step.
  2. In PuTTY configuration under Window category go to "Selection". Select the "Window" radio button for action of mouse buttons.
  3. You can now paste items from clipboard by doing a right-click to bring up the menu and select "Paste".

Where are my config and log files?

Hummingbot saves user data in the following directories:

  • conf: strategy and global configuration files
  • log: log files and exported trades
  • data: auto-saved CSV file of executed trades and sqlite local database

Below are instructions on how to access these files in various environments.

Windows

  1. Copy the path below
    1
    %localappdata%\hummingbot.io\Hummingbot\
    
  2. Press the Windows key then ctrl + V to paste and hit Enter

macOS

Launch the Terminal using either of two ways:

  1. Open Terminal from the Launchpad
  2. Press ⌘ + Space to open Spotlight Search and enter "Terminal"

Run the command below to open the Hummingbot folder in Finder.

1
open ~/Library/Application\ Support/Hummingbot

Docker

  1. Run the following command to view the details of your instance:
    1
    docker inspect $instance_name
    
  2. Look for a field Mounts, which will describe where the folders are on your local machine:
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    "Mounts": [
        {
            "Type": "bind",
            "Source": "/home/ubuntu/hummingbot_files/hummingbot_data",
            "Destination": "/data",
            "Mode": "",
            "RW": true,
            "Propagation": "rprivate"
        },
        {
            "Type": "bind",
            "Source": "/home/ubuntu/hummingbot_files/hummingbot_conf",
            "Destination": "/conf",
            "Mode": "",
            "RW": true,
            "Propagation": "rprivate"
        },
        {
            "Type": "bind",
            "Source": "/home/ubuntu/hummingbot_files/hummingbot_logs",
            "Destination": "/logs",
            "Mode": "",
            "RW": true,
            "Propagation": "rprivate"
        }
    ],
    
  3. Go to the folder locations listed under Source.

How do I edit my config files from the command line?

If Hummingbot is installed on a virtual machine or a Linux cloud server, you can use the vi text editor (or any text editor of your choice). Run command vi $filename. See this page for more information on how to use this text editor.

You can also use an FTP client software (e.g. WinSCP, FileZilla) to copy, move, files and folders from your virtual machine to your local machine and vice versa.

I forgot my password. How do I reset it?

For security reasons, Hummingbot does not store your password anywhere so there's no way to recover it. The only solution is to create a new password and re-enter your API keys upon restarting Hummingbot after deleting or moving the encrypted files.

  1. Run exit command to exit from the Hummingbot client.
  2. Delete the encrypted files and wallet key file (if applicable) from the hummingbot_conf folder.
  3. Restart Hummingbot and run config command.

If using Linux, copy the commands below and run in your terminal to delete the files. You will be prompted to confirm before proceeding.

1
rm hummingbot_files/hummingbot_conf/encrypted* hummingbot_files/hummingbot_conf/key_file*
1
rm hummingbot/conf/encrypted* hummingbot/conf/key_file*

If Hummingbot is installed on Windows, simply delete the encrypted files found in %localappdata%\hummingbot.io\Hummingbot\conf.

If Hummingbot is installed on MacOS, simply delete the encrypted files found in ~/Library/Application\ Support/Hummingbot/Conf.

Warning

Be careful when deleting the local wallet key file created through Hummingbot, i.e, a wallet that was not imported from Metamask; deleting the key file will result in a permanent loss of access to that wallet and any assets it may contain.

delete_encrypted_files

How to reset global configs to default settings?

Editing conf_global.yml from text editor sometimes can cause error or corrupted configuration when running Hummingbot, its because of incorrect format, incorrect parameters, wrong spelling and unintentional added characters to the global config.

  1. Run exit command to exit from the Hummingbot client.
  2. Delete conf_global.yml from the hummingbot_conf folder.
  3. Restart Hummingbot and a new generated conf_global.yml will be created, type config command to see the global configuration.

If using Linux, copy the commands below and run in your terminal to delete the file. You will be prompted to confirm before proceeding.

1
rm hummingbot_files/hummingbot_conf/conf_global.yml
1
rm hummingbot/conf/conf_global.yml

If Hummingbot is installed on Windows, simply delete the conf_global.yml found in %localappdata%\hummingbot.io\Hummingbot\conf.

If Hummingbot is installed on MacOS, simply delete the conf_global.yml found in ~/Library/Application\ Support/Hummingbot/Conf.

Note

If telegram is enabled make sure to backup your telegram token and chat id when deleting conf_global.yml.

Operation

Why is my bot not placing orders?

Fetch your bot status by running status or [Ctrl + S]: * Are there any warnings that may prevent the bot from starting? * Is your order_amount parameter larger than the exchange minimum order size requirement? * Check the available balance. If your available balance is lower than order_amount, Hummingbot will not place orders. * Is your inventory_skew_enabled parameter enabled? Since this parameter adjusts order sizes, one side may be too low or too high.

What parameter values should I set to make profitable trades?

The art of market making is identifying the optimal combination of strategy parameters, which may be different for each trading pair and in different market regime. As a general rule, Hummingbot does not advise users on parameter values.

Where can I submit a feature/feedback request?

  1. You can create a feature request through this link.
  2. Select the green button new issue.
  3. Choose feature request then fill it accordingly.

[Binance] Timestamp for this request is outside of the recvWindow

Sample log error message
binance.exceptions.BinanceAPIException: APIError(code=-1021): Timestamp for this request is outside of the recvWindow.

Timestamp errors in logs happen when the Binance clock gets de-synced from time to time as they can drift apart for a number of reasons. Hummingbot should safely recover from this and continue running normally.

[Binance] Too much request weight used; IP banned

Sample log error message
binance.exceptions.BinanceAPIException: APIError(code=-1003): Way too much request weight used; IP banned until 1573987680818. Please use the websocket for live updates to avoid bans

This error occurs when the Binance API rate limit is reached. Causes include: * Using multiple order mode with 3+ orders per side * High order refresh rate * Running multiple instances of Hummingbot

Weight/Request error in logs happens when it encounters a warning or error and Hummingbot repeatedly sends the request (fetching status updates, placing/canceling orders, etc.) which resulted in getting banned. This should be lifted after a couple of hours or up to a maximum of 24 hours.

[Kraken] 0 Balance error

Sample log error message

1
2
3
4
Failed connections:                                                                                      |
    kraken: {'error': {'error': []}}

10:12:24 - kraken_market - Error received from https://api.kraken.com/0/private/Balance. Response is {'error': []}.

This error occurs when Kraken account currently has no funds on the exchange. Fund your account to fix the error. For more info visit this article.

MAC mismatch error

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
Hummingbot.core.utils.async_utils - ERROR - Unhandled error in background task: MAC mismatch Traceback (most recent call last):
File "/home/ubuntu/hummingbot/hummingbot/core/utils/async_utils.py", line 9, in safe_wrapper return await c
File "/home/ubuntu/hummingbot/hummingbot/core/utils/async_call_scheduler.py", line 128, in call_async return await self.schedule_async_call coro, timeout_seconds, app_warning_msg=app_warning_msg)
File "/home/ubuntu/hummingbot/hummingbot/core/utils/async_call_scheduler.py", line 117, in schedule_async_call return await fut
File "/home/ubuntu/hummingbot/hummingbot/core/utils/async_call_scheduler.py", line 80, in _coro_scheduler fut.set_result(await coro)
File "/home/ubuntu/miniconda3/envs/hummingbot/lib/python3.8/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs)
File "/home/ubuntu/hummingbot/hummingbot/client/config/security.py", line 88, in decrypt_all cls.decrypt_file(file)
File "/home/ubuntu/hummingbot/hummingbot/client/config/security.py", line 73, in decrypt_file cls._secure_configs[key_name] = decrypt_file(file_path, Security.password)
File "/home/ubuntu/hummingbot/hummingbot/client/config/config_crypt.py", line 67, in decrypt_file secured_value = Account.decrypt(encrypted, password)
File "/home/ubuntu/miniconda3/envs/hummingbot/lib/python3.8/site-packages/eth_account/account.py", line 134, in decrypt return HexBytes(decode_keyfile_json(keyfile, password_bytes))
File "/home/ubuntu/miniconda3/envs/hummingbot/lib/python3.8/site-packages/eth_keyfile/keyfile.py", line 49, in decode_keyfile_json return _decode_keyfile_json_v3(keyfile_json, password)
File "/home/ubuntu/miniconda3/envs/hummingbot/lib/python3.8/site-packages/eth_keyfile/keyfile.py", line 170, in _decode_keyfile_json_v3 raise ValueError("MAC mismatch") 
ValueError: MAC mismatch
This error is usually caused by having multiple encrypted keys with different passwords in the same config folder. For example:
1
2
3
4
Instance1                       Instance2
Password  : 1234                Password  : 5678 
API key/s : Binance             API key/s : Bittrex, Coinbase Pro, 
                                            Eterbase, Kraken, Huobi

Copying encrypted Binance key file from Instance1 to Instance2 will result to this error. To fix this:

  1. Delete just the encrypted_binance_api/secret_key.json from Instance2's conf folder
  2. Restart Hummingbot and password 5678 remains unchanged
  3. Run connect binance and add the API keys - this will encrypt it with 5678 password and sync it with the rest of the API keys

Miscellaneous

How do I resize my Hummingbot window without jumbling the text?

When resizing the window of your Hummingbot, text becomes unclear or at the same location as the previous size of the window. To do a refresh to the new window size, while inside Hummingbot press CTRL + L and it will refresh Hummingbot window panes. These command applies to all Hummingbot build.

How to change time or timezone of Hummingbot?

Hummingbot follows the same date/time and timezone on the machine where it is installed. Below are some steps you can follow to change the timezone depending on the operating system and installation type.

Docker

While docker $instance_name is running on background, type in command line.

1
2
docker exec -it $instance_name bash
dpkg-reconfigure tzdata

Configure geographic location and timezone by inputting the corresponding number, see example below:

Windows

You can change the timezone on a Windows computer by doing the following:

  1. Press Win + R shortcut to open the Run dialog box
  2. Enter timedate.cpl to open Date and Time settings
  3. Click Change time zone

Alternatively, you can also follow these steps in Windows Support article: How to set your time and time zone