/
Launch Hummingbot Miner

Operation Commands

Info and usage about Basic Operation Commands


Commands Overview

Below are the available commands in the current Hummingbot release.

CommandFunction
connectList available exchanges and add API keys to them
createCreate a new bot
ImportImport an existing bot by loading the configuration file
helpList available commands
balanceDisplay your asset balances across all connected exchanges
configDisplay the current bot's configuration
startStart the current bot
stopStop the current bot
statusGet the market status of the current bot
historySee the past performance of the current bot
exitExit and cancel all outstanding orders
paper_tradeToggle paper trading mode
exportExport your bot's trades or private keys
order_bookDisplays the top 5 bid/ask prices and volume
kill switchAutomatically stops the bot

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
          bittrex          Yes              Yes               GREEN
     coinbase_pro           No               No                 RED
         eterbase           No               No                 RED
         ethereum          Yes              Yes              YELLOW
            huobi           No               No              YELLOW
           kraken           No               No             UNKNOWN
           kucoin           No               No               GREEN
           liquid           No               No             UNKNOWN

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.

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,status,history,exit,paper_trade,export}
..

positional arguments:
  {connect,create,import,help,balance,config,start,stop,status,history,exit,paper_trade,export}
    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
    status              Get the market status of the current bot
    history             See the past performance of the current bot
    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

help [ command_name ]

Displays command usage and function.

>>>  help connect

usage:  connect [-h] [{liquid,coinbase_pro,binance,kraken,bittrex,huobi,ethereum,kucoin}]

positional arguments:
  {liquid,coinbase_pro,binance,kraken,bittrex,huobi,ethereum,kucoin}
                        Name of the exchange that you want to connect

balance

Display your asset balances across all connected exchanges.

>>>  balance
Updating balances, please wait...

binance:
     Asset    Amount Limit
       BNB    0.0000     -
       BTC    0.0000     -
       ETH    0.0000     -
     TFUEL    0.0187     -
     THETA    0.5880     -
      USDC    0.0090     -
      USDT  158.8197     -
       XRP    0.8440     -
       XZC    0.0076     -

bittrex:
      Asset     Amount Limit
        BTC     0.0020     -
     BTXCRD  1025.2352     -
        XZC     5.1501     -

coinbase_pro:
    Asset   Amount Limit
      BAT  10.0000     -
      ETH   0.2059     -
     LINK  15.0500     -
     USDC   0.0033     -

ethereum:
    asset  amount
      ETH  0.0453

config

Display the current bot's configuration.

>>>  config

Global Configurations:
                     Key   Value
     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

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
      order_refresh_tolerance_pct                   0
                     order_amount                   1
                    price_ceiling                  -1
                      price_floor                  -1
                ping_pong_enabled                True
                     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_enabled               False
                price_source_type                None
            price_source_exchange                None
              price_source_market                None
              price_source_custom                None
                  take_if_crossed                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 are not working at the moment

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.

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 ArgumentDescription
--verboseDisplays a list of past trades
--config fileYou can select different strategy file.By default, displays the current strategy file.
--durationYou can select the duration in minutes, days and hours. For example, 7d for 7 days or 12h for 12 hours. By default, displays in hour if no value is defined.

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 orderbook 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.

orderbook-live

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 orderbook 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.

orderbook-live

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 ArgumentDescription
--exchangeThe specific exchange of the market
--marketThe market trading pair of the order book
--liveDisplays 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.

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
Edit on GitHub