Adding New Commands¶
Currently, Hummingbot supports the following commands:
Depending on the usage of the hummingbot client, you may need to add new commands to the client. This is done by adding a new command class to the
The new command class should be called
The new class should be called
<CommandName>Command and adhere to the CamelCase naming convention.
The new class should have a function called
command_name which will be ran when the command is called in the Hummingbot client.
Add the new class to the
__init__.py file in the
hummingbot/client/command directory and add any necessary imports to the
The last step is to add any other functions that the new command class may need.
Please note: check the
hummingbot/client/command directory for any existing commands that may be similar to the new command you are adding.
Creating Command Shortcuts¶
To use this feature, open and configure
conf_client.yml located under the
In past versions of Hummingbot (1.5.0 and below), the
conf_client.yml file is named
Import the lines of code to create a custom command shortcut.
# Command Shortcuts
# Define abbreviations for often used commands
# or batch grouped commands together
# Assign shortcut command
help: Set bid spread, ask spread, and order refresh time
# Argument Label
arguments: [Bid Spread, Ask Spread, Order Refresh Time]
# Original config output with value
output: [config bid_spread $1, config ask_spread $2, config order_refresh_time $3]
Custom made commands can only be used once a strategy has been imported.