feat: list-exchanges to show futures "has" problematics

This commit is contained in:
Matthias
2026-01-02 11:05:02 +01:00
parent 4d4fee9874
commit a09ca38de2
3 changed files with 20 additions and 3 deletions
+7 -1
View File
@@ -103,7 +103,13 @@ ARGS_BACKTEST_SHOW = [
"backtest_breakdown", "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"] ARGS_LIST_TIMEFRAMES = ["exchange", "print_one_column", "trading_mode"]
+8 -1
View File
@@ -2,7 +2,7 @@
Definition of cli arguments used in arguments.py Definition of cli arguments used in arguments.py
""" """
from argparse import ArgumentTypeError from argparse import SUPPRESS, ArgumentTypeError
from freqtrade import constants from freqtrade import constants
from freqtrade.constants import ( from freqtrade.constants import (
@@ -388,6 +388,13 @@ AVAILABLE_CLI_OPTIONS = {
help="Print only DEX exchanges.", help="Print only DEX exchanges.",
action="store_true", 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 / markets
"list_pairs_all": Arg( "list_pairs_all": Arg(
"-a", "-a",
+5 -1
View File
@@ -38,13 +38,15 @@ def start_list_exchanges(args: dict[str, Any]) -> None:
else: else:
available_exchanges = [e for e in available_exchanges if e["valid"] is not False] available_exchanges = [e for e in available_exchanges if e["valid"] is not False]
title = f"Exchanges available for Freqtrade ({len(available_exchanges)} exchanges):" 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 = Table(title=title)
table.add_column("Exchange Name") table.add_column("Exchange Name")
table.add_column("Class Name") table.add_column("Class Name")
table.add_column("Markets") table.add_column("Markets")
table.add_column("Reason") table.add_column("Reason")
if show_fut_reasons:
table.add_column("Futures Reason")
trading_mode = args.get("trading_mode", None) trading_mode = args.get("trading_mode", None)
dex_only = args.get("dex_exchanges", False) dex_only = args.get("dex_exchanges", False)
@@ -78,12 +80,14 @@ def start_list_exchanges(args: dict[str, Any]) -> None:
if exchange["dex"]: if exchange["dex"]:
trade_modes = Text("DEX: ") + trade_modes trade_modes = Text("DEX: ") + trade_modes
trade_modes.stylize("bold", 0, 3) trade_modes.stylize("bold", 0, 3)
futcol = [] if not show_fut_reasons else [exchange["comment_futures"]]
table.add_row( table.add_row(
name, name,
classname, classname,
trade_modes, trade_modes,
exchange["comment"], exchange["comment"],
*futcol,
style=None if exchange["valid"] else "red", style=None if exchange["valid"] else "red",
) )
# table.add_row(*[exchange[header] for header in headers]) # table.add_row(*[exchange[header] for header in headers])