Handle exception for stoploss independently of sell order
This commit is contained in:
parent
f11a1b0122
commit
5c8fbe2c6f
@ -691,7 +691,7 @@ class FreqtradeBot(object):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
result = False
|
result = False
|
||||||
|
try:
|
||||||
# If trade is open and the buy order is fulfilled but there is no stoploss,
|
# If trade is open and the buy order is fulfilled but there is no stoploss,
|
||||||
# then we add a stoploss on exchange
|
# then we add a stoploss on exchange
|
||||||
if not trade.open_order_id and not trade.stoploss_order_id:
|
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
|
# in which case we cancel stoploss order and put another one with new
|
||||||
# value immediately
|
# value immediately
|
||||||
self.handle_trailing_stoploss_on_exchange(trade, order)
|
self.handle_trailing_stoploss_on_exchange(trade, order)
|
||||||
|
except DependencyException as exception:
|
||||||
|
logger.warning('Unable to create stoploss order: %s', exception)
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def handle_trailing_stoploss_on_exchange(self, trade: Trade, order):
|
def handle_trailing_stoploss_on_exchange(self, trade: Trade, order):
|
||||||
|
Loading…
Reference in New Issue
Block a user