mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
Add exchange_reasons to bad exchanges
This commit is contained in:
parent
6310b40fc6
commit
d8dbea9d5b
|
@ -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)
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue
Block a user