Cancel all open orders after receiving /stop or ctrl+c

This commit is contained in:
jpribyl
2020-04-24 16:16:52 -06:00
parent 0f50449196
commit bd51cd332b
16 changed files with 124 additions and 52 deletions

View File

@@ -13,7 +13,7 @@ ARGS_COMMON = ["verbosity", "logfile", "version", "config", "datadir", "user_dat
ARGS_STRATEGY = ["strategy", "strategy_path"]
ARGS_TRADE = ["db_url", "sd_notify", "dry_run"]
ARGS_TRADE = ["db_url", "sd_notify", "dry_run", "cancel_open_orders_on_exit"]
ARGS_COMMON_OPTIMIZE = ["ticker_interval", "timerange",
"max_open_trades", "stake_amount", "fee"]

View File

@@ -109,6 +109,11 @@ AVAILABLE_CLI_OPTIONS = {
help='Enforce dry-run for trading (removes Exchange secrets and simulates trades).',
action='store_true',
),
"cancel_open_orders_on_exit": Arg(
'--cancel-open-orders-on-exit',
help='Close unfilled open orders when the bot stops / exits',
action='store_true',
),
# Optimize common
"ticker_interval": Arg(
'-i', '--ticker-interval',