From 6f928b826f8f9a75072c86ca1cb9a3d027882611 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 3 Jun 2023 08:49:16 +0200 Subject: [PATCH] Update types for build_exchange_list_entry --- freqtrade/exchange/exchange_utils.py | 6 +++--- freqtrade/exchange/types.py | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/freqtrade/exchange/exchange_utils.py b/freqtrade/exchange/exchange_utils.py index cbb7f7733..a57b2406c 100644 --- a/freqtrade/exchange/exchange_utils.py +++ b/freqtrade/exchange/exchange_utils.py @@ -57,10 +57,10 @@ def validate_exchange(exchange: str) -> Tuple[bool, str]: return True, '' -def build_exchange_list_entry( +def _build_exchange_list_entry( exchange_name: str, exchangeClasses: Dict[str, Any]) -> ValidExchangesType: valid, comment = validate_exchange(exchange_name) - result = { + result: ValidExchangesType = { 'name': exchange_name, 'valid': valid, '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)} 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 diff --git a/freqtrade/exchange/types.py b/freqtrade/exchange/types.py index b20c51201..13030986e 100644 --- a/freqtrade/exchange/types.py +++ b/freqtrade/exchange/types.py @@ -31,7 +31,9 @@ Tickers = Dict[str, Ticker] class ValidExchangesType(TypedDict): name: str valid: bool + supported: bool comment: str + trade_modes: List[str] # pair, timeframe, candleType, OHLCV, drop last?,