improve invalid canceled order response handling

This commit is contained in:
Matthias 2022-10-02 08:45:41 +02:00
parent a5bc75b48c
commit d0b8c8b1a0

View File

@ -1292,7 +1292,14 @@ class Exchange:
order = self.fetch_order(order_id, pair)
except InvalidOrderException:
logger.warning(f"Could not fetch cancelled order {order_id}.")
order = {'id': order_id, 'fee': {}, 'status': 'canceled', 'amount': amount, 'info': {}}
order = {
'id': order_id,
'status': 'canceled',
'amount': amount,
'filled': 0.0,
'fee': {},
'info': {}
}
return order