Struct questrade::AccountPosition
source · [−]pub struct AccountPosition {
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 average_entry_price: Number,
pub closed_profit_and_loss: Number,
pub open_profit_and_loss: Option<Number>,
pub total_cost: Number,
pub is_real_time: bool,
pub is_under_reorg: bool,
}
Expand description
Account Position.
Fields
symbol: String
Symbol that follows Questrade symbology (e.g., “TD.TO”).
symbol_id: u32
Internal symbol identifier.
open_quantity: Number
Position quantity remaining open.
closed_quantity: Number
Portion of the position that was closed today.
current_market_value: Number
Market value of the position (quantity x price).
current_price: Number
Current price of the position symbol.
average_entry_price: Number
Average price paid for all executions constituting the position.
closed_profit_and_loss: Number
Realized profit/loss on this position.
open_profit_and_loss: Option<Number>
Unrealized profit/loss on this position.
total_cost: Number
Total cost of the position.
is_real_time: bool
Designates whether real-time quote was used to compute PnL.
is_under_reorg: bool
Designates whether a symbol is currently undergoing a reorg.
Trait Implementations
sourceimpl Clone for AccountPosition
impl Clone for AccountPosition
sourcefn clone(&self) -> AccountPosition
fn clone(&self) -> AccountPosition
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for AccountPosition
impl Debug for AccountPosition
sourceimpl<'de> Deserialize<'de> for AccountPosition
impl<'de> Deserialize<'de> for AccountPosition
sourcefn 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
sourceimpl PartialEq<AccountPosition> for AccountPosition
impl PartialEq<AccountPosition> for AccountPosition
sourcefn eq(&self, other: &AccountPosition) -> bool
fn eq(&self, other: &AccountPosition) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourceimpl Serialize for AccountPosition
impl Serialize for AccountPosition
impl StructuralPartialEq for AccountPosition
Auto Trait Implementations
impl RefUnwindSafe for AccountPosition
impl Send for AccountPosition
impl Sync for AccountPosition
impl Unpin for AccountPosition
impl UnwindSafe for AccountPosition
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
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
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more