NautilusTrader
ConceptsEvents
These docs track the unreleased nightly build and may change without notice. Switch to the latest stable docs.

OrderPendingCancel

OrderPendingCancel represents a CancelOrder command having been sent to the trading venue. The ExecutionEngine applies it to the order, updates the Cache, and publishes it on the MessageBus. It fires when the system dispatches a cancel request and awaits venue acknowledgement.

Typical transition: ACCEPTED -> PENDING_CANCEL. Handler: on_order_pending_cancel.

Fields

Beyond the common Python order event fields, OrderPendingCancel carries:

FieldPython typeRequired/defaultDescription
venue_order_idVenueOrderId or NoneNoneThe venue‑assigned order identifier, if known.
account_idAccountId or NoneRequiredThe account associated with the order, if known.
reconciliationboolRequiredIf generated during reconciliation.

Example

Reading the event in a strategy handler:

def on_order_pending_cancel(self, event: OrderPendingCancel) -> None:
    self.log.info(f"Cancel pending for {event.client_order_id}")
  • Events - Event categories, dispatch, and the common order event fields.
  • Orders - Order types and the state machine.

On this page