pub struct AccountPosition {Show 13 fields
pub symbol: String,
pub symbol_id: u32,
pub open_quantity: Number,
pub closed_quantity: Number,
pub current_market_value: Number,
pub current_price: Number,
pub day_profit_and_loss: Number,
pub average_entry_price: Number,
pub closed_profit_and_loss: Number,
pub open_profit_and_loss: Number,
pub total_cost: Number,
pub is_real_time: bool,
pub is_under_reorg: bool,
}Expand description
Account Position.
Fields§
§symbol: StringSymbol that follows Questrade symbology (e.g., “TD.TO”).
symbol_id: u32Internal symbol identifier.
open_quantity: NumberPosition quantity remaining open.
closed_quantity: NumberPortion of the position that was closed today.
current_market_value: NumberMarket value of the position (quantity x price).
current_price: NumberCurrent price of the position symbol.
day_profit_and_loss: NumberCurrent price of the position symbol.
average_entry_price: NumberAverage price paid for all executions constituting the position.
closed_profit_and_loss: NumberRealized profit/loss on this position.
open_profit_and_loss: NumberUnrealized profit/loss on this position.
total_cost: NumberTotal cost of the position.
is_real_time: boolDesignates whether real-time quote was used to compute PnL.
is_under_reorg: boolDesignates whether a symbol is currently undergoing a reorg.
Trait Implementations§
Source§impl Clone for AccountPosition
impl Clone for AccountPosition
Source§fn clone(&self) -> AccountPosition
fn clone(&self) -> AccountPosition
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AccountPosition
impl Debug for AccountPosition
Source§impl<'de> Deserialize<'de> for AccountPosition
impl<'de> Deserialize<'de> for AccountPosition
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 PartialEq for AccountPosition
impl PartialEq for AccountPosition
Source§impl Serialize for AccountPosition
impl Serialize for AccountPosition
impl StructuralPartialEq for AccountPosition
Auto Trait Implementations§
impl Freeze for AccountPosition
impl RefUnwindSafe for AccountPosition
impl Send for AccountPosition
impl Sync for AccountPosition
impl Unpin for AccountPosition
impl UnwindSafe for AccountPosition
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more