Skip to content
All library documents

Order Pending Update Events in the Order State Lifecycle

Article NautilusTrader

Summary

This reference explains the order-pending-update event used after a system sends a modify-order request. The execution engine applies the request to the order, updates its cache, and publishes the event while waiting for the venue to acknowledge the change. It identifies the typical transition from accepted to pending update and names the strategy callback that handles the event.

The listed event fields include the venue order ID, account ID, and a flag indicating whether reconciliation generated the event. A short example shows a handler logging the client order ID. The note helps readers distinguish a dispatched modification from a confirmed venue update. It does not describe venue responses, rejection handling, or the full order state machine, so those details must be obtained from the related order and event documentation.

Key ideas

  • A pending-update event marks that an order modification has been sent and awaits venue acknowledgement.
  • The execution engine applies the modification, updates its cache, and publishes the event.
  • The typical order transition is from accepted to pending update.
  • The event can include venue and account identifiers and a reconciliation flag.
  • A strategy can handle the event through its order-pending-update callback.

Tags

Full text
# OrderPendingUpdate


# OrderPendingUpdate

`OrderPendingUpdate` represents a `ModifyOrder` 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 modify request and awaits
venue acknowledgement.

Typical transition: `ACCEPTED` -> `PENDING_UPDATE`. Handler: `on_order_pending_update`.

## Fields

Beyond the [common Python order event fields](index.md#common-python-order-event-fields),
`OrderPendingUpdate` carries:

| Field            | Python type              | Required/default | Description                                      |
| ---------------- | ------------------------ | ---------------- | ------------------------------------------------ |
| `venue_order_id` | `VenueOrderId` or `None` | `None`           | The venue-assigned order identifier, if known.   |
| `account_id`     | `AccountId` or `None`    | Required         | The account associated with the order, if known. |
| `reconciliation` | `bool`                   | Required         | If generated during reconciliation.              |

## Example

Reading the event in a strategy handler:

```python
def on_order_pending_update(self, event: OrderPendingUpdate) -> None:
    self.log.info(f"Modify pending for {event.client_order_id}")
```

## Related guides

- [Events](index.md) - Event categories, dispatch, and the common order event fields.
- [Orders](../orders/) - Order types and the state machine.

Shown in full with attribution under the source's licence. Licence: LGPL-3.0

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.