Launch Hummingbot Miner


Learn how to use scripts

Offers dynamic bot controls by running a user-defined script alongside a strategy.

Currently, a custom script can only be used with pure market making strategy.
Currently, Scripts can only be used when running Hummingbot from source or with Docker. Using this feature in the Mac or Windows installers will crash the bot.


As with Hummingbot source code, the script is fully compatible with Python 3.7.

How it works

After configured, the script will start automatically once a strategy starts, and it stops when the strategy stops. The script is run on a new dedicated process. In the case where the script fails or has a bug, your main Hummingbot application can still function.

Create your own script

  1. Create a new script file. You can see examples in the Examples section below and save it into scripts folder
  2. Configure your Hummingbot
    1. Inside Hummingbot run command config script_enabled and/or config script_file_path.
    2. Editing conf_global.yml file using a text editor.
    script_enabled: true
    script_file_path: spreads_adjusted_on_volatility_script.py
  3. Start running a strategy

The following examples can be found in scripts\ folder.

  1. hello_world_script.py

    The most basic example only a few lines of code.

  2. ping_pong_script.py

    Replicates our current ping pong strategy using script.

  3. price_band_script.py

    Replicates our current price band strategy using script.

  4. dynamic_price_band_script.py

    Demonstrates how to set the band around mid-price moving average. The band moves as the average moves.

  5. spreads_adjusted_on_volatility_script.py

    Demonstrates how to adjust bid and ask spreads dynamically based on price volatility.

  6. script_template.py

    Provides you a base template to start using the script functions.

Updating your scripts

We sometimes add/remove/edit commands in the helper scripts and certain new features like the Scripts we released in version 0.29.0, and you would need to update your scripts.

Copy the commands below and paste them into the shell or terminal to delete the old scripts and download the most recently updated ones.


rm -rf create.sh start.sh update.sh
wget https://raw.githubusercontent.com/CoinAlpha/hummingbot/development/installation/docker-commands/create.sh
wget https://raw.githubusercontent.com/CoinAlpha/hummingbot/development/installation/docker-commands/start.sh
wget https://raw.githubusercontent.com/CoinAlpha/hummingbot/development/installation/docker-commands/update.sh
chmod a+x *.sh


rm -rf create.sh start.sh update.sh
curl https://raw.githubusercontent.com/CoinAlpha/hummingbot/development/installation/docker-commands/create.sh -o create.sh
curl https://raw.githubusercontent.com/CoinAlpha/hummingbot/development/installation/docker-commands/start.sh -o start.sh
curl https://raw.githubusercontent.com/CoinAlpha/hummingbot/development/installation/docker-commands/update.sh -o update.sh
chmod a+x *.sh
Edit on GitHub