Handle exception for stoploss independently of sell order

This commit is contained in:
Matthias 2019-03-31 15:41:10 +02:00
parent f11a1b0122
commit 5c8fbe2c6f

View File

@ -691,7 +691,7 @@ class FreqtradeBot(object):
"""
result = False
try:
# If trade is open and the buy order is fulfilled but there is no stoploss,
# then we add a stoploss on exchange
if not trade.open_order_id and not trade.stoploss_order_id:
@ -727,7 +727,8 @@ class FreqtradeBot(object):
# in which case we cancel stoploss order and put another one with new
# value immediately
self.handle_trailing_stoploss_on_exchange(trade, order)
except DependencyException as exception:
logger.warning('Unable to create stoploss order: %s', exception)
return result
def handle_trailing_stoploss_on_exchange(self, trade: Trade, order):