Skip to content

Commit

Permalink
feat: show name, class name and eventually the replacement alias
Browse files Browse the repository at this point in the history
  • Loading branch information
xmatthias committed Aug 18, 2024
1 parent 7cab973 commit fd9ec43
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions freqtrade/commands/list_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,20 @@ def start_list_exchanges(args: Dict[str, Any]) -> None:
table = Table(title=title)

table.add_column("Exchange Name")
table.add_column("Class Name")
table.add_column("Markets")
table.add_column("Reason")

for exchange in available_exchanges:
name = Text(exchange["classname"])
name = Text(exchange["name"])
if exchange["supported"]:
name.append(" (Official)", style="italic")
name.append(" (Supported)", style="italic")
name.stylize("green bold")
classname = Text(exchange["classname"])
if exchange["is_alias"]:
name.stylize("strike")
classname.stylize("strike")
classname.append(f" (use {exchange['alias_for']})", style="italic")

trade_modes = Text(
", ".join(
Expand All @@ -68,6 +74,7 @@ def start_list_exchanges(args: Dict[str, Any]) -> None:

table.add_row(
name,
classname,
trade_modes,
exchange["comment"],
style=None if exchange["valid"] else "red",
Expand Down

0 comments on commit fd9ec43

Please sign in to comment.