NautilusTrader
ConceptsEvents
These docs track the unreleased nightly build and may change without notice. Switch to the latest stable 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, simulated matching engine, or local risk control can reject the request.

Typical transition: PENDING_UPDATE -> previous status (for example ACCEPTED). Handler: on_order_modify_rejected.

Fields

Beyond the common Python order event fields, OrderModifyRejected carries:

FieldPython typeRequired/defaultDescription
reasonstrRequiredThe order update rejection reason.
venue_order_idVenueOrderId or NoneNoneThe venue‑assigned order identifier, if known.
account_idAccountId or NoneNoneThe account associated with the order, if known.
reconciliationboolRequiredIf 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}",
    )
  • Events - Event categories, dispatch, and the common order event fields.
  • Orders - Order types and the state machine.

On this page