mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-11-29 08:33:07 +00:00
feat: support filtering exchanges by trade mode
This commit is contained in:
@@ -96,7 +96,7 @@ ARGS_LIST_HYPEROPTS = ["hyperopt_path", "print_one_column"]
|
||||
|
||||
ARGS_BACKTEST_SHOW = ["exportfilename", "backtest_show_pair_list", "backtest_breakdown"]
|
||||
|
||||
ARGS_LIST_EXCHANGES = ["print_one_column", "list_exchanges_all"]
|
||||
ARGS_LIST_EXCHANGES = ["print_one_column", "list_exchanges_all", "trading_mode"]
|
||||
|
||||
ARGS_LIST_TIMEFRAMES = ["exchange", "print_one_column"]
|
||||
|
||||
|
||||
@@ -46,7 +46,14 @@ def start_list_exchanges(args: dict[str, Any]) -> None:
|
||||
table.add_column("Markets")
|
||||
table.add_column("Reason")
|
||||
|
||||
trading_mode = args.get("trading_mode", None)
|
||||
|
||||
for exchange in available_exchanges:
|
||||
if trading_mode and not any(
|
||||
a["trading_mode"] == trading_mode for a in exchange["trade_modes"]
|
||||
):
|
||||
# If trading_mode is specified, only show exchanges that support it
|
||||
continue
|
||||
name = Text(exchange["name"])
|
||||
if exchange["supported"]:
|
||||
name.append(" (Supported)", style="italic")
|
||||
|
||||
Reference in New Issue
Block a user