OrderDenied
OrderDenied represents an order having been denied by the Nautilus system. The
ExecutionEngine applies it to the order, updates the Cache, and publishes it on the
MessageBus. It fires when an otherwise valid order cannot be submitted, for example due
to a risk limit or an unsupported feature.
Transition: INITIALIZED -> DENIED. Handler: on_order_denied.
Fields
Beyond the common order event fields, OrderDenied carries:
| Field | Python type | Required/default | Description |
|---|---|---|---|
reason | str | Required | The order denied reason. |
On this event, venue_order_id and account_id are both None, reconciliation is
always False, and ts_event equals ts_init.
Example
Reading the event in a strategy handler:
def on_order_denied(self, event: OrderDenied) -> None:
self.log.warning(f"Order {event.client_order_id} denied: {event.reason}")Related guides
OrderInitialized
OrderInitialized represents an order having been initialized. The ExecutionEngine applies it to the order, updates the Cache, and publishes it on the...
OrderEmulated
OrderEmulated represents an order having become emulated by the Nautilus system. The ExecutionEngine applies it to the order, updates the Cache, and...