Struct OrderUpdate

Source
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: SmartString

Unique identifier for this order update.

§order_id: OrderId

The ID of the order this update pertains to.

§client_order_id: ClientId

The client-generated ID for the order.

§instrument_id: InstrumentId

The instrument the order is for.

§side: OrderSide

The side of the order (Buy or Sell).

§order_type: OrderType

The type of order (e.g., Limit, Market).

§status: OrderStatus

The current status of the order.

§original_quantity: Decimal

The total quantity of the order.

§filled_quantity: Decimal

The quantity that has been filled by this update.

§remaining_quantity: Decimal

The 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: u64

Timestamp of the update from the exchange (in nanoseconds).

§system_timestamp: u64

Local 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: bool

Indicates if this is the final update for the order (e.g., fully filled, cancelled, rejected).

Implementations§

Source§

impl OrderUpdate

Source

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

Source§

fn clone(&self) -> OrderUpdate

Returns a duplicate of the value. Read more
1.0.0 · Source§

const fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for OrderUpdate

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for OrderUpdate

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for OrderUpdate

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

§

impl<T> ErasedDestructor for T
where T: 'static,