cancel_order: handle InvalidOrder exception

This commit is contained in:
gcarq
2018-04-23 16:58:32 +02:00
parent baeeaa777d
commit aa213a3640
2 changed files with 11 additions and 7 deletions

View File

@@ -289,6 +289,10 @@ def cancel_order(order_id: str, pair: str) -> None:
try:
return _API.cancel_order(order_id, pair)
except ccxt.InvalidOrder as e:
raise DependencyException(
'Could not cancel order. Message: {}'.format(e)
)
except (ccxt.NetworkError, ccxt.ExchangeError) as e:
raise TemporaryError(
'Could not cancel order due to {}. Message: {}'.format(