Operation Commands
Info and usage about Basic Operation Commands
Commands Overview
Below are the available commands in the current Hummingbot release.
Command | Function |
---|---|
connect | List available exchanges and add API keys to them |
create | Create a new bot |
Import | Import an existing bot by loading the configuration file |
help | List available commands |
balance | Display your asset balances across all connected exchanges |
config | Display the current bot's configuration |
start | Start the current bot |
stop | Stop the current bot |
open_orders | Show all active open orders |
trades | Show trades |
pnl | Show profit and losses |
status | Get the market status of the current bot |
history | See the past performance of the current bot |
generate_certs | Create SSL certifications for Gateway communication. |
exit | Exit and cancel all outstanding orders |
paper_trade | Toggle paper trading mode |
export | Export your bot's trades or private keys |
order_book | Displays the top 5 bid/ask prices and volume |
ticker | Show market ticker of current order book |
connect
List available exchanges and check whether API keys have been added correctly.
>>> connect
Testing connections, please wait...
Exchange Keys Added Keys Confirmed Connector Status
binance Yes Yes GREEN
binance_perpetual No No YELLOW
binance_perpetual_testnet No No YELLOW
binance_us No No YELLOW
bitfinex No No GREEN
bittrex No No YELLOW
celo No No GREEN
coinbase_pro No No GREEN
crypto_com No No YELLOW
dydx No No YELLOW
eterbase No No RED
ethereum No No RED
huobi No No YELLOW
kraken No No YELLOW
kucoin No No GREEN
liquid No No GREEN
loopring No No YELLOW
okex No No RED
terra No No YELLOW
connect [ exchange ]
Connect to an exchange by adding API keys.
>>> connect binance
Enter your Binance API key >>>
Enter your Binance secret >>>
You are now connected to binance.
Replace existing API keys to an exchange connection.
>>> connect binance
Would you like to replace your existing binance API key ...abc1 (Yes/No)? >>>
Enter your Binance API key >>>
Enter your Binance secret >>>
Connect to an Ethereum wallet and Ethereum node.
>>> connect ethereum
Enter your wallet private key >>>
Which Ethereum node would you like your client to connect to? >>>
Enter the Websocket Address of your Ethereum Node >>>
Wallet 0x8D10...def2 connected to hummingbot.
Replace existing Ethereum wallet.
>>> connect ethereum
Would you like to replace your existing Ethereum wallet [address] (Yes/No)? >>>
Enter your wallet private key >>>
Which Ethereum node would you like your client to connect to? >>>
Enter the Websocket Address of your Ethereum Node >>>
Wallet 0xC20...8bFa connected to hummingbot.
TIP: Related article: How to delete or remove exchange API keys? |
create
Create a new bot and walk through the strategy configuration.
>>> create
What is your market making strategy? >>>
create [ file_name ]
Specify first the name of the file before going though the strategy configuration.
>>> create conf_pure_mm_1.yml
What is your market making strategy? >>>
import
Import an existing bot by loading the configuration file.
>>> import
Enter path to your strategy file (e.g. "conf_pure_mm_1.yml") >>>
Configuration from conf_pure_mm_1.yml file is imported.
Preliminary checks:
- Exchange check: All connections confirmed.
- Strategy check: All required parameters confirmed.
- All checks: Confirmed.
Enter "start" to start market making.
import [ file_name ]
Specify the file name to import and skip the prompt.
>>> import conf_pure_mm_1.yml
Configuration from conf_pure_mm_1.yml file is imported.
Preliminary checks:
- Exchange check: All connections confirmed.
- Strategy check: All required parameters confirmed.
- All checks: Confirmed.
Enter "start" to start market making.
help
List available commands.
>>> help
usage: {connect,create,import,help,balance,config,start,stop,open_orders,trades,pnl,status,history,generate_certs,exit,paper_trade,export,order_book,ticker} ...
positional arguments:
{connect,create,import,help,balance,config,start,stop,open_orders,trades,pnl,status,history,generate_certs,exit,paper_trade,export,order_book,ticker}
connect List available exchanges and add API keys to them
create Create a new bot
import Import an existing bot by loading the configuration file
help List available commands
balance Display your asset balances across all connected exchanges
config Display the current bot's configuration
start Start the current bot
stop Stop the current bot
open_orders Show all active open orders
trades Show trades
pnl Show profits and losses
status Get the market status of the current bot
history See the past performance of the current bot
generate_certs Create SSL certifications for Gateway communication.
exit Exit and cancel all outstanding orders
paper_trade Toggle paper trade mode on and off
export Export secure information
order_book Display current order book
ticker Show market ticker of current order book
help [ command_name ]
Displays command usage and function.
>>> help connect
usage: connect [-h] [{huobi,loopring,kucoin,kraken,celo,eterbase,bittrex,terra,dydx,crypto_com,binance_perpetual,okex,ethereum,coinbase_pro,bitfinex,binance,binance_perpetual_testnet,binance_us,liquid}]
positional arguments:
{huobi,loopring,kucoin,kraken,celo,eterbase,bittrex,terra,dydx,crypto_com,binance_perpetual,okex,ethereum,coinbase_pro,bitfinex,binance,binance_perpetual_testnet,binance_us,liquid}
Name of the exchange that you want to connect
optional arguments:
-h, --help Show this help message and exit
balance
Display your asset balances across all connected exchanges.
>>> balance
Updating balances, please wait...
binance:
Asset Total Total ($) Allocated
BNB 0.0451 5 0%
BTC 0.0028 133 0%
SCRT 36.0000 66 0%
STRAX 64.4000 66 0%
USDT 0.0615 0 0%
Total: $ 270 Allocated: 0.00%
Allocated
shows the assets that are currently being used.
config
Display the current bot's configuration.
>>> config
Global Configurations:
Key Value
balancer_max_swaps 0
ethereum_chain_name MAIN_NET
kill_switch_enabled False
kill_switch_rate -100
telegram_enabled False
telegram_token None
telegram_chat_id None
send_error_logs True
0x_active_cancels False
script_enabled False
script_file_path None
manual_gas_price 50
ethgasstaion_api_key None
ethgasstation_refresh_time 120
gateway_api_host localhost
gateway_api_port 5000
Strategy Configurations:
Key Value
strategy pure_market_making
exchange binance
market ETH-BTC
bid_spread 1
ask_spread 1
minimum_spread -100
order_refresh_time 30
max_order_age 1800
order_refresh_tolerance_pct 0
order_amount 1
price_ceiling -1
price_floor -1
ping_pong_enabled False
order_levels 1
order_level_amount 0
order_level_spread 1
inventory_skew_enabled False
inventory_target_base_pct 50
inventory_range_multiplier 1
filled_order_delay 60
hanging_orders_enabled False
hanging_orders_cancel_pct 10
order_optimization_enabled False
ask_order_optimization_depth 0
bid_order_optimization_depth 0
add_transaction_costs False
price_source current_market
price_source_type mid_price
price_source_exchange None
price_source_market None
take_if_crossed None
price_source_custom_api None
order_override None
config [ key ]
Reconfigure a parameter value.
>>> config order_refresh_time
How often do you want to cancel and replace bids and asks (in seconds)? >>>
config [ key ][ value ]
Reconfigure a parameter value without going through the prompts. These can be reconfigured without stopping the bot. However, it will only take effect after restarting the strategy.
>>> config order_refresh_time 30
New configuration saved:
order_refresh_time: 30.0
Configure parameters on the fly
Currently, only the following parameters can be reconfigured without stopping the bot. The changes will take effect in the next order refresh.
- bid_spread
- ask_spread
- order_amount
- order_levels
- order_level_spread
- inventory_target_base_pct
- inventory_range_multiplier
- filled_order_delay
Take note the reconfiguring of inventory_target_base_pct
for DEX connectors is not working at the moment.
NOTE: Configuring these parameters on the fly only works for the pure market making strategy |
start
Start the current bot.
>>> start
Preliminary checks:
- All checks: Confirmed.
Status check complete. Starting 'pure_market_making' strategy...
'pure_market_making' strategy started.
Run `status` command to query the progress.
stop
Stops the current bot. This cancels all active and hanging orders.
>>> stop
Winding down...
Cancelling outstanding orders...
All outstanding orders cancelled.
open_orders
Show all active open orders.
Optional Argument | Description |
---|---|
--full_report | Show full report with size comparison |
NOTE: open_orders only works with binance exchange connector. |
trades
Show trades
Optional Argument | Description |
---|---|
--days | How many days in the past (can be decimal value) |
--market | The market you want to see trades |
--open_order_markets | See trades from current open order markets |
pnl
Show profit and losses
Optional Argument | Description |
---|---|
--days | How many days in the past (can be decimal value) |
--market | The market you want to see trades |
--open_order_markets | See trades from current open order markets |
NOTE: pnl only works with binance exchange connector.
If your desired trading pair does not show any result on your hummingbot terminal when running the pnl command. You can edit the conf_global.yml file on your hummingbot folder and add the market pair that you're trading under the binance_market list. You can also add it on your hummingbot terminal by using config binance_market |
status
Get the market status of the current bot.
>>> status
Markets:
Exchange Market Best Bid Price Best Ask Price Mid Price
binance ETHBTC 0.025521 0.025527 0.025524
Assets:
ETH BTC
Total Balance 4.3725 0.1274
Available Balance 3.3725 0.1021
Current Value (BTC) 0.1116 0.1274
Current % 46.7% 53.3%
Orders:
Level Type Price Spread Amount (Orig) Amount (Adj) Age Hang
1 sell 0.0257747 0.98% 1 1 00:00:02 no
1 buy 0.02526431 1.02% 1 1 00:00:02 no
Optional arguments
--live
Displays status in real time.
history
See the past performance of the current bot.
Optional arguments
Command Argument | Description |
---|---|
--days | Displays a list of trades, assets and performance in x number of days |
--verbose | Displays a list of past trades |
--precision | Displays the same list with --days but let's you input the x number of decimals. It can be used with --verbose and --days |
generate_certs
Create SSL certifications for Gateway communication. Take note to remember the password for you will need it when you are installing Hummingbot-gateway.
exit
Exit and cancel all outstanding orders. This cancels all active and hanging orders.
>>> exit
Winding down...
Cancelling outstanding orders...
All outstanding orders cancelled.
exit -f
Force exit and cancel all outstanding orders.
>>> exit -f
paper_trade
Toggle paper trade mode on and off. When paper trade mode is enabled, all orders are simulated and no real orders are placed.
export
Exports secure information.
export keys
Displays API keys, secret keys and wallet private key in the command output pane.
>>> export keys
Enter your password >>> *****
Warning: Never disclose API keys or private keys. Anyone with your keys can steal any assets held in your account.
API keys:
binance_api_key:
binance_api_secret:
Ethereum wallets:
Public address:
Private key:
export trades
Exports all trades in the current session to a .csv file.
>>> export trades
Enter a new csv file name >>> trade_list
Successfully exported trades to logs/trade_list.csv
order_book
Displays the top 5 bid/ask prices and volume of the current market, similar to how they're displayed in the exchange's order book.
>>> order_book
market: binance ETHUSDT
bid_price bid_volume ask_price ask_volume
395.87 0.73244 395.89 34.37802
395.86 7 395.9 10.786
395.85 71.36763 395.91 0.19
395.84 12.786 395.92 2.02141
395.83 16.5706 395.93 3.29861
NOTE: This command will only work while a strategy is running. |
Run order_book --lines [value]
to specify the number of lines displayed or you can use arguments --live
to displays the order book of the market in real-time. For example, run order_book --live
. The order book displays the top 5 bid/ask prices and volume of the current market in real-time.
Run order_book --lines [value]
to specify the number of lines displayed.
>>> order_book --lines 15
market: binance ETHUSDT
bid_price bid_volume ask_price ask_volume
395.91 6 395.93 30
395.9 0.02764 395.94 10.786
395.89 8.292 395.95 0.11719
395.87 25.13292 395.96 8.53205
395.86 61.26264 395.97 0.0007
395.84 12.40548 395.98 7.52538
395.83 20.7474 395.99 8.61834
395.82 11 396 13.53414
395.81 8.61536 396.02 12.92161
395.8 60.38759 396.03 6.26138
395.79 25.5767 396.04 21.61688
395.78 31.94231 396.05 44.45931
395.77 41.51229 396.06 0.19829
395.76 24.17199 396.07 12.26197
395.75 2.9788 396.08 1.21638
By default, the order_book
command shows only the maker market in cross-exchange strategy or primary market when using arbitrage.
You can use arguments --live
to displays the order book of the market in real-time. For example, run order_book --lines 20 --live
.
The order book displays the top 20 bid/ask prices and volume of the current market in real-time.
Optional arguments
arguments --exchange
and --market
allows you to check the order book of the taker market or secondary market.
Sample usage:
>>> order_book --exchange kucoin --market ETH-USDT
market: kucoin ETH-USDT
bid_price bid_volume ask_price ask_volume
395.8 1.07 395.81 2.02
395.79 22.95406 395.82 0.0505293
395.77 7.668467 395.84 0.554996
395.75 0.05 395.85 3.644207
395.7 1 395.86 1.825
ticker
Displays market ticker prices such as best bid, best ask, mid price, and last trade price.
When optional arguments are not used i.e. running ticker
alone displays the output from the maker market of a cross-exchange strategy or primary market when using arbitrage.
NOTE: This command will only work while a strategy is running. |
Optional arguments
Command Argument | Description |
---|---|
--exchange | The specific exchange of the market |
--market | The market trading pair of the order book |
--live | Displays the ticker in real time |
You can use arguments --live
to displays market ticker prices such as best bid, best ask, mid price, and last trade price in real-time. For example, run ticker --live
.
Sample usage
When running a cross-exchange or arbitrage strategy, you can specify which exchange and market you can display.
>>> ticker --exchange binance --market ETH-USDT
Best Bid Best Ask Mid Price Last Trade
351.41 351.42 351.415 351.42