Skip to content

Commit

Permalink
CoinZoom: Debug error on order cancels - TODO: handle this better
Browse files Browse the repository at this point in the history
  • Loading branch information
TheHolyRoger committed Mar 29, 2021
1 parent ad6907e commit d3366f4
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions hummingbot/connector/exchange/coinzoom/coinzoom_exchange.py
Original file line number Diff line number Diff line change
Expand Up @@ -532,12 +532,11 @@ async def _execute_cancel(self, trading_pair: str, order_id: str) -> str:
raise
except CoinzoomAPIError as e:
err = e.error_payload.get('error', e.error_payload)
print(f"order cancel error: {err}")
self.logger().error(f"Order Cancel API Error: {err}")
# TODO: Still need to handle order cancel errors.
# self._order_not_found_records[order_id] = self._order_not_found_records.get(order_id, 0) + 1
# if err.get('code') == 20002 and \
# self._order_not_found_records[order_id] >= self.ORDER_NOT_EXIST_CANCEL_COUNT:
# order_was_cancelled = True
self._order_not_found_records[order_id] = self._order_not_found_records.get(order_id, 0) + 1
if self._order_not_found_records[order_id] >= self.ORDER_NOT_EXIST_CANCEL_COUNT:
order_was_cancelled = True
if order_was_cancelled:
self.logger().info(f"Successfully cancelled order {order_id} on {Constants.EXCHANGE_NAME}.")
self.stop_tracking_order(order_id)
Expand Down

0 comments on commit d3366f4

Please sign in to comment.