OrderCancelRejected
OrderCancelRejected represents a CancelOrder command having been rejected by the
trading venue. The ExecutionEngine applies it to the order, updates the Cache, and
publishes it on the MessageBus. It fires when the venue rejects a cancel request.
Transition: PENDING_CANCEL -> previous status (for example ACCEPTED). Handler:
on_order_cancel_rejected.
Fields
Beyond the common order event fields, OrderCancelRejected carries:
| Field | Python type | Required/default | Description |
|---|---|---|---|
reason | str | Required | The order cancel rejected reason. |
On this event, venue_order_id and account_id are usually populated but may be None,
and reconciliation carries a real value.
Example
Reading the event in a strategy handler:
def on_order_cancel_rejected(self, event: OrderCancelRejected) -> None:
self.log.warning(
f"Cancel rejected for {event.client_order_id}: {event.reason}",
)Related guides
OrderModifyRejected
OrderModifyRejected represents a ModifyOrder command having been rejected by the trading venue. The ExecutionEngine applies it to the order, updates the...
OrderCanceled
OrderCanceled represents an order having been canceled at the trading venue. The ExecutionEngine applies it to the order, updates the Cache, and publishes...