Nightly docs
OrderModifyRejected
OrderModifyRejected records that a ModifyOrder command was rejected. The ExecutionEngine
applies it to the order, updates the Cache, and publishes it on the MessageBus. A trading venue or
simulated matching engine can reject the request. Local refusals before sending produce
OrderModifyDenied.
Typical transition: PENDING_UPDATE -> previous status (for example ACCEPTED). Handler:
on_order_modify_rejected.
In SUBMITTED, ACCEPTED, TRIGGERED, and PARTIALLY_FILLED, a rejection preserves the order's
status and terms, including any amendments already applied by OrderUpdated. In PENDING_CANCEL,
it preserves the pending cancellation.
Fields
Beyond the common Python order event fields,
OrderModifyRejected carries:
| Field | Python type | Required/default | Description |
|---|---|---|---|
reason | str | Required | The order update rejection reason. |
venue_order_id | VenueOrderId or None | None | The venue-assigned order identifier, if known. |
account_id | AccountId or None | None | The account associated with the order, if known. |
reconciliation | bool | Required | If generated during reconciliation. |
Example
Reading the event in a strategy handler:
def on_order_modify_rejected(self, event: OrderModifyRejected) -> None:
self.log.warning(
f"Modify rejected for {event.client_order_id}: {event.reason}",
)Related guides
OrderModifyDenied
OrderModifyDenied records a local refusal of a ModifyOrder command that was not sent to its execution target. The execution pipeline applies it to the order...
OrderCancelDenied
OrderCancelDenied records a local refusal of a CancelOrder command that was not sent to its execution target. The execution pipeline applies it to the order...