pub struct OrderUpdate {Show 18 fields
pub id: SmartString,
pub order_id: OrderId,
pub client_order_id: ClientId,
pub instrument_id: InstrumentId,
pub side: OrderSide,
pub order_type: OrderType,
pub status: OrderStatus,
pub original_quantity: Decimal,
pub filled_quantity: Decimal,
pub remaining_quantity: Decimal,
pub price: Option<Decimal>,
pub average_fill_price: Option<Decimal>,
pub time_in_force: Option<TimeInForce>,
pub exchange_execution_id: Option<SmartString>,
pub exchange_timestamp: u64,
pub system_timestamp: u64,
pub reject_reason: Option<SmartString>,
pub is_final: bool,
}Expand description
Represents an update to an order’s state. This can be a partial fill, a full fill, a cancellation, or a modification.
Fields§
§id: SmartStringUnique identifier for this order update.
order_id: OrderIdThe ID of the order this update pertains to.
client_order_id: ClientIdThe client-generated ID for the order.
instrument_id: InstrumentIdThe instrument the order is for.
side: OrderSideThe side of the order (Buy or Sell).
order_type: OrderTypeThe type of order (e.g., Limit, Market).
status: OrderStatusThe current status of the order.
original_quantity: DecimalThe total quantity of the order.
filled_quantity: DecimalThe quantity that has been filled by this update.
remaining_quantity: DecimalThe remaining quantity of the order.
price: Option<Decimal>The price at which this update occurred (e.g., fill price).
average_fill_price: Option<Decimal>The average price of all fills for this order.
time_in_force: Option<TimeInForce>The time in force for the order.
exchange_execution_id: Option<SmartString>Exchange-specific execution ID for this update.
exchange_timestamp: u64Timestamp of the update from the exchange (in nanoseconds).
system_timestamp: u64Local system timestamp when the update was processed (in nanoseconds).
reject_reason: Option<SmartString>Any reject reason if the order was rejected or cancelled with a reason.
is_final: boolIndicates if this is the final update for the order (e.g., fully filled, cancelled, rejected).
Implementations§
Source§impl OrderUpdate
impl OrderUpdate
Sourcepub const fn new(
id: SmartString,
order_id: OrderId,
client_order_id: ClientId,
instrument_id: InstrumentId,
side: OrderSide,
order_type: OrderType,
status: OrderStatus,
original_quantity: Decimal,
filled_quantity: Decimal,
remaining_quantity: Decimal,
price: Option<Decimal>,
average_fill_price: Option<Decimal>,
time_in_force: Option<TimeInForce>,
exchange_execution_id: Option<SmartString>,
exchange_timestamp: u64,
system_timestamp: u64,
reject_reason: Option<SmartString>,
is_final: bool,
) -> Self
pub const fn new( id: SmartString, order_id: OrderId, client_order_id: ClientId, instrument_id: InstrumentId, side: OrderSide, order_type: OrderType, status: OrderStatus, original_quantity: Decimal, filled_quantity: Decimal, remaining_quantity: Decimal, price: Option<Decimal>, average_fill_price: Option<Decimal>, time_in_force: Option<TimeInForce>, exchange_execution_id: Option<SmartString>, exchange_timestamp: u64, system_timestamp: u64, reject_reason: Option<SmartString>, is_final: bool, ) -> Self
Creates a new OrderUpdate instance.
Trait Implementations§
Source§impl Clone for OrderUpdate
impl Clone for OrderUpdate
Source§fn clone(&self) -> OrderUpdate
fn clone(&self) -> OrderUpdate
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source. Read more