ConceptsEvents
Nightly docs
These docs track unreleased changes and may change without notice. Their code examples can use APIs that the latest release lacks, so run them with a development wheel or switch to the latest release docs.
OrderAccepted
OrderAccepted records the trading venue's acknowledgement that an order is received and valid
(often a FIX NEW OrdStatus). The ExecutionEngine applies it to the order, updates the Cache,
and publishes it on the MessageBus.
Typical transition: SUBMITTED -> ACCEPTED. Handler: on_order_accepted.
Fields
Beyond the common Python order event fields,
OrderAccepted carries:
| Field | Python type | Required/default | Description |
|---|---|---|---|
venue_order_id | VenueOrderId | Required | The venue-assigned order identifier. |
account_id | AccountId | Required | The account associated with the order. |
reconciliation | bool | Required | If generated during reconciliation. |
Example
Reading the event in a strategy handler:
def on_order_accepted(self, event: OrderAccepted) -> None:
self.log.info(
f"Order {event.client_order_id} accepted as {event.venue_order_id}",
)Related guides
OrderSubmitted
OrderSubmitted records that the system has sent an order to the trading venue and awaits acknowledgement. The ExecutionEngine applies it to the order...
OrderRejected
OrderRejected records an order reaching the terminal REJECTED state. The ExecutionEngine applies it to the order, updates the Cache, and publishes it on the...