Merge branch 'develop' into lock_pairs

This commit is contained in:
Matthias
2019-08-15 06:56:39 +02:00
34 changed files with 611 additions and 278 deletions

View File

@@ -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)

View File

@@ -25,6 +25,11 @@ 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):
@@ -371,7 +376,7 @@ class Exchange(object):
'side': side,
'remaining': amount,
'datetime': arrow.utcnow().isoformat(),
'status': "open",
'status': "closed" if ordertype == "market" else "open",
'fee': None,
"info": {}
}
@@ -755,7 +760,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: