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 when cached and publishes it on the
MessageBus. Handler: on_order_modify_denied.
The denial preserves the working order and its terms. See Command refusals for pending-command resolution, causation, and callback migration.
Fields
Beyond the common Python order event fields,
OrderModifyDenied carries:
| Field | Python type | Required/default | Description |
|---|---|---|---|
reason | str | Required | The reason the command was denied. |
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. |
Example
Reading the event in a strategy handler:
from nautilus_trader.model import OrderModifyDenied
def on_order_modify_denied(self, event: OrderModifyDenied) -> None:
self.log.warning(
f"Modify denied for {event.client_order_id}: {event.reason}",
)Related guides
OrderUpdated
OrderUpdated records a change to an order's quantity, price, trigger price, or calculated protection price. The execution pipeline applies it to the order...
OrderModifyRejected
OrderModifyRejected records that a ModifyOrder command was rejected. The ExecutionEngine applies it to the order, updates the Cache, and publishes it on the...