Skip to content

Commit

Permalink
Merge pull request #101 from kieran-mackle/development
Browse files Browse the repository at this point in the history
style(CCXT): added error log message on failed orders
  • Loading branch information
kieran-mackle authored Mar 23, 2024
2 parents 655d847 + 1610305 commit b486365
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions autotrader/brokers/ccxt.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ def place_order(self, order: Order, **kwargs) -> None:
params=order.ccxt_params,
)
except Exception as e:
self._logger.error(f"Error placing {order}: {e}")
placed_order = e

return placed_order
Expand Down Expand Up @@ -180,6 +181,7 @@ def cancel_order(self, order_id: int, **kwargs) -> None:
cancelled_order = self.api.cancel_order(id=order_id, **kwargs)

except Exception as e:
self._logger.error(f"Error cancelling order {order_id}: {e}")
cancelled_order = e

return cancelled_order
Expand Down Expand Up @@ -670,6 +672,7 @@ def _modify_order(self, order: Order):
params=order.ccxt_params,
)
except Exception as e:
self._logger.error(f"Error modifying {order}: {e}")
modified_order = e
return modified_order

Expand Down

0 comments on commit b486365

Please sign in to comment.