minor bug fixes

This commit is contained in:
Gert Wohlgemuth 2018-06-20 01:20:50 -07:00
parent c7a72d470c
commit fa525741df

View File

@ -484,12 +484,11 @@ with limit `{buy_limit:.8f} ({stake_amount:.6f} \
# if orderbook has higher rate (high profit), # if orderbook has higher rate (high profit),
# use orderbook, otherwise just use bids rate # use orderbook, otherwise just use bids rate
logger.info(' order book asks top %s: %0.8f', i, orderBook_rate) logger.info(' order book asks top %s: %0.8f', i, orderBook_rate)
if (sell_rate < orderBook_rate): if sell_rate < orderBook_rate:
sell_rate = orderBook_rate sell_rate = orderBook_rate
if self.check_sell(trade, sell_rate, buy, sell): if self.check_sell(trade, sell_rate, buy, sell):
return True return True
break
else: else:
logger.info('checking sell') logger.info('checking sell')
if self.check_sell(trade, sell_rate, buy, sell): if self.check_sell(trade, sell_rate, buy, sell):
@ -533,7 +532,7 @@ with limit `{buy_limit:.8f} ({stake_amount:.6f} \
ordertime = arrow.get(order['datetime']).datetime ordertime = arrow.get(order['datetime']).datetime
# Check if trade is still actually open # Check if trade is still actually open
if (order['status'] == 'open'): if order['status'] == 'open':
if order['side'] == 'buy' and ordertime < buy_timeoutthreashold: if order['side'] == 'buy' and ordertime < buy_timeoutthreashold:
self.handle_timedout_limit_buy(trade, order) self.handle_timedout_limit_buy(trade, order)
elif order['side'] == 'sell' and ordertime < sell_timeoutthreashold: elif order['side'] == 'sell' and ordertime < sell_timeoutthreashold: