Don't show stacktrace in case of invalidorder Error

This is handled gracefully by emergency-selling
This commit is contained in:
Matthias 2019-09-01 10:17:36 +02:00
parent f91557f549
commit 771519e311
2 changed files with 3 additions and 3 deletions

View File

@ -632,9 +632,9 @@ class FreqtradeBot(object):
rate=rate * LIMIT_PRICE_PCT) rate=rate * LIMIT_PRICE_PCT)
trade.stoploss_order_id = str(stoploss_order['id']) trade.stoploss_order_id = str(stoploss_order['id'])
return True return True
except InvalidOrderException: except InvalidOrderException as e:
trade.stoploss_order_id = None trade.stoploss_order_id = None
logger.exception('Unable to place a stoploss order on exchange.') logger.error(f'Unable to place a stoploss order on exchange. {e}')
logger.warning('Selling the trade forcefully') logger.warning('Selling the trade forcefully')
self.execute_sell(trade, trade.stop_loss, sell_reason=SellType.EMERGENCY_SELL) self.execute_sell(trade, trade.stop_loss, sell_reason=SellType.EMERGENCY_SELL)