catch DependencyExceptions while selling
This commit is contained in:
parent
bc2bd7fe1e
commit
4c49229b77
@ -358,15 +358,18 @@ class FreqtradeBot(object):
|
|||||||
Tries to execute a sell trade
|
Tries to execute a sell trade
|
||||||
:return: True if executed
|
:return: True if executed
|
||||||
"""
|
"""
|
||||||
# Get order details for actual price per unit
|
try:
|
||||||
if trade.open_order_id:
|
# Get order details for actual price per unit
|
||||||
# Update trade with order values
|
if trade.open_order_id:
|
||||||
logger.info('Found open order for %s', trade)
|
# Update trade with order values
|
||||||
trade.update(exchange.get_order(trade.open_order_id, trade.pair))
|
logger.info('Found open order for %s', trade)
|
||||||
|
trade.update(exchange.get_order(trade.open_order_id, trade.pair))
|
||||||
|
|
||||||
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:
|
||||||
|
Loading…
Reference in New Issue
Block a user