added: disable_buy feature, this will only tell bot to sell whatever is needed to sell

added: order book buy and sell will check ticker first; for buying, if ticker is lower than buy order price, use ticker; for selling, if ticker is higher than sell order price, use ticker
This commit is contained in:
Nullart
2018-06-14 09:57:14 +08:00
parent 5ed7008933
commit dc03b41c68
6 changed files with 42 additions and 20 deletions

View File

@@ -240,9 +240,9 @@ def get_balances() -> dict:
raise OperationalException(e)
@retrier
def get_order_book(pair: str, refresh: Optional[bool] = True) -> dict:
def get_order_book(pair: str, limit: Optional[int] = 1000) -> dict:
try:
return _API.fetch_order_book(pair)
return _API.fetch_order_book(pair, limit)
except ccxt.NotSupported as e:
raise OperationalException(
f'Exchange {_API.name} does not support fetching order book.'