Order
Definition
Represents a read only interface that exposes information regarding an order.
- An Order object returned from calling an order method is dynamic in that its properties will always reflect the current state of an order.
- The property <order>.OrderId is NOT a unique value, since it can change throughout an order’s lifetime. Please see the Advance Order Handling section on “Transitioning order references from historical to live” for details on how to handle.
- The property <order>.Oco WILL be appended with a suffix when the strategy transitions from historical to real-time to ensure the OCO id is unique across multiple strategies for live orders.
- To check for equality you can compare Order objects directly.
Methods and Properties
OrderState Values
Critical: In a historical backtest, orders will always reach a “Working” state. In real-time, some stop orders may only reach “Accepted” state if they are simulated/held on a brokers server.

