mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 02:12:01 +00:00
feat: get new name for aliased ccxt exchanges
This commit is contained in:
parent
9e3e5038f7
commit
7cab973cbf
|
@ -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]
|
||||
|
|
Loading…
Reference in New Issue
Block a user