mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
Update types for build_exchange_list_entry
This commit is contained in:
parent
cc04f3279a
commit
6f928b826f
|
@ -57,10 +57,10 @@ def validate_exchange(exchange: str) -> Tuple[bool, str]:
|
||||||
return True, ''
|
return True, ''
|
||||||
|
|
||||||
|
|
||||||
def build_exchange_list_entry(
|
def _build_exchange_list_entry(
|
||||||
exchange_name: str, exchangeClasses: Dict[str, Any]) -> ValidExchangesType:
|
exchange_name: str, exchangeClasses: Dict[str, Any]) -> ValidExchangesType:
|
||||||
valid, comment = validate_exchange(exchange_name)
|
valid, comment = validate_exchange(exchange_name)
|
||||||
result = {
|
result: ValidExchangesType = {
|
||||||
'name': exchange_name,
|
'name': exchange_name,
|
||||||
'valid': valid,
|
'valid': valid,
|
||||||
'supported': exchange_name.lower() in SUPPORTED_EXCHANGES,
|
'supported': exchange_name.lower() in SUPPORTED_EXCHANGES,
|
||||||
|
@ -89,7 +89,7 @@ def list_available_exchanges(all_exchanges: bool) -> List[ValidExchangesType]:
|
||||||
subclassed = {e['name'].lower(): e for e in ExchangeResolver.search_all_objects({}, False)}
|
subclassed = {e['name'].lower(): e for e in ExchangeResolver.search_all_objects({}, False)}
|
||||||
|
|
||||||
exchanges_valid: List[ValidExchangesType] = [
|
exchanges_valid: List[ValidExchangesType] = [
|
||||||
build_exchange_list_entry(e, subclassed) for e in exchanges
|
_build_exchange_list_entry(e, subclassed) for e in exchanges
|
||||||
]
|
]
|
||||||
|
|
||||||
return exchanges_valid
|
return exchanges_valid
|
||||||
|
|
|
@ -31,7 +31,9 @@ Tickers = Dict[str, Ticker]
|
||||||
class ValidExchangesType(TypedDict):
|
class ValidExchangesType(TypedDict):
|
||||||
name: str
|
name: str
|
||||||
valid: bool
|
valid: bool
|
||||||
|
supported: bool
|
||||||
comment: str
|
comment: str
|
||||||
|
trade_modes: List[str]
|
||||||
|
|
||||||
|
|
||||||
# pair, timeframe, candleType, OHLCV, drop last?,
|
# pair, timeframe, candleType, OHLCV, drop last?,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user