pub struct PositionRecord {
pub symbol: String,
pub exchange: Option<String>,
pub portfolio: Option<String>,
pub avg_price: Option<Decimal>,
pub qty_units: Option<Decimal>,
pub lot_size: Option<Decimal>,
pub qty: Option<Decimal>,
pub is_currency: Option<bool>,
pub unrealised_pl: Option<Decimal>,
pub current_volume: Option<Decimal>,
pub existing: Option<bool>,
}Expand description
An instrument or money position: the item of GET /md/v2/Clients/{exchange}/{portfolio}/positions and the
message of the positions subscription.
Fields§
§symbol: StringThe ticker (or the currency code of a money position).
exchange: Option<String>MOEX or SPBX.
portfolio: Option<String>The portfolio.
avg_price: Option<Decimal>The average price.
qty_units: Option<Decimal>The quantity in pieces (the amount, for money).
lot_size: Option<Decimal>The size of the lot.
qty: Option<Decimal>The quantity in lots.
is_currency: Option<bool>true for money (a currency balance), false for an instrument.
unrealised_pl: Option<Decimal>The unrealised profit or loss.
current_volume: Option<Decimal>The value of the position in the settlement currency by its current price.
existing: Option<bool>true for data from the history, false for new events.
Trait Implementations§
Source§impl Clone for PositionRecord
impl Clone for PositionRecord
Source§fn clone(&self) -> PositionRecord
fn clone(&self) -> PositionRecord
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PositionRecord
impl Debug for PositionRecord
Source§impl Default for PositionRecord
impl Default for PositionRecord
Source§fn default() -> PositionRecord
fn default() -> PositionRecord
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PositionRecord
impl<'de> Deserialize<'de> for PositionRecord
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
Auto Trait Implementations§
impl Freeze for PositionRecord
impl RefUnwindSafe for PositionRecord
impl Send for PositionRecord
impl Sync for PositionRecord
impl Unpin for PositionRecord
impl UnsafeUnpin for PositionRecord
impl UnwindSafe for PositionRecord
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