Skip to main content

OrderExecutionData

Struct OrderExecutionData 

Source
pub struct OrderExecutionData {
Show 24 fields pub message_type: Option<String>, pub order_status: OrderStatus, pub execution_type: Option<ExecutionType>, pub order_quantity: Option<Decimal>, pub executed_quantity: Option<Decimal>, pub last_quantity: Decimal, pub remained_quantity: Decimal, pub ticker: String, pub class_code: String, pub side: OrderSide, pub order_type: Option<OrderType>, pub average_price: Option<Decimal>, pub order_id: Option<String>, pub execution_id: Option<String>, pub price: Decimal, pub currency: Option<String>, pub client_code: Option<String>, pub transaction_time: Option<DateTime<Utc>>, pub trade_date: Option<String>, pub order_number: Option<String>, pub accrued_coupon: Option<Decimal>, pub execution_value: Option<Decimal>, pub commission: Option<Decimal>, pub security_exchange: Option<String>,
}
Expand description

The report inside an OrderMessage: the state of the order and the last fill.

It is the WebSocket form of crate::http::models::OrderExecutionData, with typed enums. Quantities are in pieces. Fields the broker leaves out in some messages read as 0 or None, noted per field.

  • execution_type says why the message was sent. A fill has last_quantity above 0 and a trade id in execution_id.
  • This struct has no field for a reject reason. The REST report has rejectReason, but the events docs do not list it among the fields of data.

Fields§

§message_type: Option<String>

Type of the message, as text.

§order_status: OrderStatus

State of the order. Required: a message without it does not parse.

§execution_type: Option<ExecutionType>

Why the message was sent.

§order_quantity: Option<Decimal>

Quantity of the order, in pieces.

§executed_quantity: Option<Decimal>

Executed quantity so far, in pieces.

§last_quantity: Decimal

Absent in pure status messages of the current orders/events/ws channel (no fill): 0.

§remained_quantity: Decimal

Remaining quantity, in pieces. 0 if the message has none.

§ticker: String

Ticker. Required.

§class_code: String

Class code (board). Empty text if absent.

§side: OrderSide

Buy or sell. OrderSide::Unknown if absent.

§order_type: Option<OrderType>

Type of the order. Types other than market and limit read as OrderType::Unknown.

§average_price: Option<Decimal>

Average execution price. For repo and spread deals, the price of the first part.

§order_id: Option<String>

Id of the order at the exchange.

§execution_id: Option<String>

Id of the trade (fill). Set when the message reports a fill.

§price: Decimal

Absent in some cancel / reject messages: 0.

§currency: Option<String>

Currency.

§client_code: Option<String>

Client code.

§transaction_time: Option<DateTime<Utc>>

Time of the transaction (UTC). None if absent or the epoch.

§trade_date: Option<String>

Trade date, kept as text. For the evening session of the derivatives market it is the date of the next session.

§order_number: Option<String>

Order number.

§accrued_coupon: Option<Decimal>

Accrued coupon income.

§execution_value: Option<Decimal>

Volume of the trade.

§commission: Option<Decimal>

Commission.

§security_exchange: Option<String>

Exchange id.

Trait Implementations§

Source§

impl Clone for OrderExecutionData

Source§

fn clone(&self) -> OrderExecutionData

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for OrderExecutionData

Source§

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

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

impl<'de> Deserialize<'de> for OrderExecutionData

Source§

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

Deserialize this value from the given Serde deserializer. 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
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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: Sized + 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: Sized + 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
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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