Struct OrderParts
pub struct OrderParts {
pub exchange_id: String,
pub request_id: String,
pub status: OrderExecutionReportStatus,
pub lots_requested: i64,
pub lots_executed: i64,
pub lot_size: i64,
pub unit_price: Option<Price>,
pub direction: OrderDirection,
pub order_type: OrderType,
pub instrument: InstrumentId,
pub reason: String,
pub broker_ts: Option<Timestamp>,
}Expand description
What every order message (unary state, placement response, stream update) has in common.
Fields§
§exchange_id: StringThe exchange order id (order_id). Empty when the message has none.
request_id: StringThe order_request_id: the idempotency key we sent, as text. Empty for an order placed
elsewhere.
status: OrderExecutionReportStatusThe order status as the broker reports it.
lots_requested: i64Lots requested.
lots_executed: i64Lots executed so far.
lot_size: i64Units of the instrument in one lot. 1 until the caller sets it (OrderParts::with_lot): the
message of a unary call does not carry it, the order stream message does (lot_size).
unit_price: Option<Price>Price of one instrument, if the message carries a non-zero one.
direction: OrderDirectionBuy or sell, as the broker reports it.
order_type: OrderTypeLimit, market or best price, as the broker reports it.
instrument: InstrumentIdThe instrument, built from the uid, figi or ticker the message carries.
reason: StringThe broker’s text for a refusal, if any (the placement response message, or the cause of a
stream status).
broker_ts: Option<Timestamp>The broker’s time of the message, if it gave one.
Implementations§
§impl OrderParts
impl OrderParts
pub fn with_lot(self, lot_size: i64) -> OrderParts
pub fn with_lot(self, lot_size: i64) -> OrderParts
The same parts with the lot size of the instrument set. A lot below 1 is read as 1.
pub fn qty_requested(&self) -> Qty
pub fn qty_requested(&self) -> Qty
Quantity requested, in units of the instrument.
pub fn qty_executed(&self) -> Qty
pub fn qty_executed(&self) -> Qty
Quantity executed so far, in units of the instrument.
pub fn qty_left(&self) -> Qty
pub fn qty_left(&self) -> Qty
Quantity not executed yet, in units of the instrument (never below zero).
Trait Implementations§
§impl Clone for OrderParts
impl Clone for OrderParts
§fn clone(&self) -> OrderParts
fn clone(&self) -> OrderParts
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for OrderParts
impl RefUnwindSafe for OrderParts
impl Send for OrderParts
impl Sync for OrderParts
impl Unpin for OrderParts
impl UnsafeUnpin for OrderParts
impl UnwindSafe for OrderParts
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].