Gracefully handle InvalidOrderException.
This commit is contained in:
parent
e8843c31e6
commit
05b1854946
@ -524,7 +524,11 @@ class FreqtradeBot(object):
|
|||||||
if trade.open_order_id:
|
if trade.open_order_id:
|
||||||
# Update trade with order values
|
# Update trade with order values
|
||||||
logger.info('Found open order for %s', trade)
|
logger.info('Found open order for %s', trade)
|
||||||
|
try:
|
||||||
order = action_order or self.exchange.get_order(trade.open_order_id, trade.pair)
|
order = action_order or self.exchange.get_order(trade.open_order_id, trade.pair)
|
||||||
|
except InvalidOrderException as exception:
|
||||||
|
logger.warning('Unable to fetch order %s: %s', trade.open_order_id, exception)
|
||||||
|
return
|
||||||
# Try update amount (binance-fix)
|
# Try update amount (binance-fix)
|
||||||
try:
|
try:
|
||||||
new_amount = self.get_real_amount(trade, order)
|
new_amount = self.get_real_amount(trade, order)
|
||||||
@ -749,7 +753,7 @@ class FreqtradeBot(object):
|
|||||||
if not trade.open_order_id:
|
if not trade.open_order_id:
|
||||||
continue
|
continue
|
||||||
order = self.exchange.get_order(trade.open_order_id, trade.pair)
|
order = self.exchange.get_order(trade.open_order_id, trade.pair)
|
||||||
except (RequestException, DependencyException):
|
except (RequestException, DependencyException, InvalidOrderException):
|
||||||
logger.info(
|
logger.info(
|
||||||
'Cannot query order for %s due to %s',
|
'Cannot query order for %s due to %s',
|
||||||
trade,
|
trade,
|
||||||
|
Loading…
Reference in New Issue
Block a user