mirror of
https://github.com/freqtrade/freqtrade.git
synced 2026-01-28 09:50:24 +00:00
feat: get new name for aliased ccxt exchanges
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
Exchange support utils
|
||||
"""
|
||||
|
||||
import inspect
|
||||
from datetime import datetime, timedelta, timezone
|
||||
from math import ceil, floor
|
||||
from typing import Any, Dict, List, Optional, Tuple
|
||||
@@ -101,6 +102,9 @@ def _build_exchange_list_entry(
|
||||
"comment": comment,
|
||||
"dex": getattr(ex_mod, "dex", False),
|
||||
"is_alias": getattr(ex_mod, "alias", False),
|
||||
"alias_for": inspect.getmro(ex_mod.__class__)[1]().id
|
||||
if getattr(ex_mod, "alias", False)
|
||||
else None,
|
||||
"trade_modes": [{"trading_mode": "spot", "margin_mode": ""}],
|
||||
}
|
||||
if resolved := exchangeClasses.get(exchange_name.lower()):
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Used for list-exchanges
|
||||
from typing import List
|
||||
from typing import List, Optional
|
||||
|
||||
from typing_extensions import TypedDict
|
||||
|
||||
@@ -17,4 +17,5 @@ class ValidExchangesType(TypedDict):
|
||||
comment: str
|
||||
dex: bool
|
||||
is_alias: bool
|
||||
alias_for: Optional[str]
|
||||
trade_modes: List[TradeModeType]
|
||||
|
||||
Reference in New Issue
Block a user