catch DependencyExceptions while selling

This commit is contained in:
gcarq 2018-04-22 20:27:34 +02:00
parent bc2bd7fe1e
commit 4c49229b77

View File

@ -358,6 +358,7 @@ class FreqtradeBot(object):
Tries to execute a sell trade Tries to execute a sell trade
:return: True if executed :return: True if executed
""" """
try:
# Get order details for actual price per unit # Get order details for actual price per unit
if trade.open_order_id: if trade.open_order_id:
# Update trade with order values # Update trade with order values
@ -367,6 +368,8 @@ class FreqtradeBot(object):
if trade.is_open and trade.open_order_id is None: if trade.is_open and trade.open_order_id is None:
# Check if we can sell our current pair # Check if we can sell our current pair
return self.handle_trade(trade) return self.handle_trade(trade)
except DependencyException as exception:
logger.warning('Unable to sell trade: %s', exception)
return False return False
def handle_trade(self, trade: Trade) -> bool: def handle_trade(self, trade: Trade) -> bool: