refactor: improve punctuation handling on bad exchanges

This commit is contained in:
Matthias
2026-01-02 10:15:26 +01:00
parent 34ad58e2da
commit 04f4f327df
2 changed files with 10 additions and 8 deletions
+4 -2
View File
@@ -51,10 +51,12 @@ def check_exchange(config: Config, check_for_bad: bool = True) -> bool:
if not valid: if not valid:
if check_for_bad: if check_for_bad:
raise OperationalException( raise OperationalException(
f'Exchange "{exchange}" will not work with Freqtrade. Reason: {reason}' f'Exchange "{exchange}" will not work with Freqtrade. Reason: {reason}.'
) )
else: else:
logger.warning(f'Exchange "{exchange}" will not work with Freqtrade. Reason: {reason}') logger.warning(
f'Exchange "{exchange}" will not work with Freqtrade. Reason: {reason}.'
)
if MAP_EXCHANGE_CHILDCLASS.get(exchange, exchange) in SUPPORTED_EXCHANGES: if MAP_EXCHANGE_CHILDCLASS.get(exchange, exchange) in SUPPORTED_EXCHANGES:
logger.info( logger.info(
+6 -6
View File
@@ -36,12 +36,12 @@ API_RETRY_COUNT = 4
API_FETCH_ORDER_RETRY_COUNT = 5 API_FETCH_ORDER_RETRY_COUNT = 5
BAD_EXCHANGES = { BAD_EXCHANGES = {
"bitmex": "Various reasons.", "bitmex": "Various reasons",
"probit": "Requires additional, regular calls to `signIn()`.", "probit": "Requires additional, regular calls to `signIn()`",
"poloniex": "Does not provide fetch_order endpoint to fetch both open and closed orders.", "poloniex": "Does not provide fetch_order endpoint to fetch both open and closed orders",
"kucoinfutures": "Unsupported futures exchange.", "kucoinfutures": "Unsupported futures exchange",
"poloniexfutures": "Unsupported futures exchange.", "poloniexfutures": "Unsupported futures exchange",
"binancecoinm": "Unsupported futures exchange.", "binancecoinm": "Unsupported futures exchange",
} }
MAP_EXCHANGE_CHILDCLASS = { MAP_EXCHANGE_CHILDCLASS = {