diff --git a/freqtrade/exchange/__init__.py b/freqtrade/exchange/__init__.py index 5c58320f6..cbf851fc2 100644 --- a/freqtrade/exchange/__init__.py +++ b/freqtrade/exchange/__init__.py @@ -1,5 +1,6 @@ from freqtrade.exchange.exchange import Exchange # noqa: F401 -from freqtrade.exchange.exchange import (is_exchange_bad, # noqa: F401 +from freqtrade.exchange.exchange import (get_exchange_bad_reason, # noqa: F401 + is_exchange_bad, is_exchange_available, is_exchange_officially_supported, available_exchanges) diff --git a/freqtrade/exchange/exchange.py b/freqtrade/exchange/exchange.py index 657f382d8..9f363c799 100644 --- a/freqtrade/exchange/exchange.py +++ b/freqtrade/exchange/exchange.py @@ -25,6 +25,10 @@ logger = logging.getLogger(__name__) API_RETRY_COUNT = 4 +BAD_EXCHANGES = { + "bitmex": "Various reasons", + "bitstamp": "Does not provide history. Details in https://github.com/freqtrade/freqtrade/issues/1983", + } def retrier_async(f): @@ -755,7 +759,11 @@ class Exchange(object): def is_exchange_bad(exchange: str) -> bool: - return exchange in ['bitmex', 'bitstamp'] + return exchange in BAD_EXCHANGES + + +def get_exchange_bad_reason(exchange: str) -> str: + return BAD_EXCHANGES.get(exchange) def is_exchange_available(exchange: str, ccxt_module=None) -> bool: