diff --git a/freqtrade/commands/arguments.py b/freqtrade/commands/arguments.py index f84822ac8..17c3702b2 100755 --- a/freqtrade/commands/arguments.py +++ b/freqtrade/commands/arguments.py @@ -103,7 +103,13 @@ ARGS_BACKTEST_SHOW = [ "backtest_breakdown", ] -ARGS_LIST_EXCHANGES = ["print_one_column", "list_exchanges_all", "trading_mode", "dex_exchanges"] +ARGS_LIST_EXCHANGES = [ + "print_one_column", + "list_exchanges_all", + "trading_mode", + "dex_exchanges", + "list_exchanges_futures_options", +] ARGS_LIST_TIMEFRAMES = ["exchange", "print_one_column", "trading_mode"] diff --git a/freqtrade/commands/cli_options.py b/freqtrade/commands/cli_options.py index 9fc5f2e11..8a035b6a0 100755 --- a/freqtrade/commands/cli_options.py +++ b/freqtrade/commands/cli_options.py @@ -2,7 +2,7 @@ Definition of cli arguments used in arguments.py """ -from argparse import ArgumentTypeError +from argparse import SUPPRESS, ArgumentTypeError from freqtrade import constants from freqtrade.constants import ( @@ -388,6 +388,13 @@ AVAILABLE_CLI_OPTIONS = { help="Print only DEX exchanges.", action="store_true", ), + "list_exchanges_futures_options": Arg( + "--ccxt-show-futures-options-exchanges", + help=SUPPRESS, + # Show compatibility with ccxt for futures functionality + # Doesn't show in help as it's an internal/debug option. + action="store_true", + ), # List pairs / markets "list_pairs_all": Arg( "-a", diff --git a/freqtrade/commands/list_commands.py b/freqtrade/commands/list_commands.py index a918afae3..8fc592381 100644 --- a/freqtrade/commands/list_commands.py +++ b/freqtrade/commands/list_commands.py @@ -38,13 +38,15 @@ def start_list_exchanges(args: dict[str, Any]) -> None: else: available_exchanges = [e for e in available_exchanges if e["valid"] is not False] title = f"Exchanges available for Freqtrade ({len(available_exchanges)} exchanges):" - + show_fut_reasons = args.get("list_exchanges_futures_options", False) table = Table(title=title) table.add_column("Exchange Name") table.add_column("Class Name") table.add_column("Markets") table.add_column("Reason") + if show_fut_reasons: + table.add_column("Futures Reason") trading_mode = args.get("trading_mode", None) dex_only = args.get("dex_exchanges", False) @@ -78,12 +80,14 @@ def start_list_exchanges(args: dict[str, Any]) -> None: if exchange["dex"]: trade_modes = Text("DEX: ") + trade_modes trade_modes.stylize("bold", 0, 3) + futcol = [] if not show_fut_reasons else [exchange["comment_futures"]] table.add_row( name, classname, trade_modes, exchange["comment"], + *futcol, style=None if exchange["valid"] else "red", ) # table.add_row(*[exchange[header] for header in headers])