pub struct ExchangePosition {
pub instrument: InstrumentId,
pub qty: Decimal,
pub avg_entry_px: Option<Price>,
pub unrealized_pnl: Option<Decimal>,
}Expand description
Position reported by an exchange.
Fields§
§instrument: InstrumentIdInstrument for this position.
qty: DecimalSigned quantity: positive is long, negative is short.
avg_entry_px: Option<Price>Average entry price when supplied by the exchange.
unrealized_pnl: Option<Decimal>Current unrealized PnL when supplied by the exchange.
Trait Implementations§
Source§impl Clone for ExchangePosition
impl Clone for ExchangePosition
Source§fn clone(&self) -> ExchangePosition
fn clone(&self) -> ExchangePosition
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 ExchangePosition
impl Debug for ExchangePosition
Source§impl<'de> Deserialize<'de> for ExchangePosition
impl<'de> Deserialize<'de> for ExchangePosition
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 ExchangePosition
impl RefUnwindSafe for ExchangePosition
impl Send for ExchangePosition
impl Sync for ExchangePosition
impl Unpin for ExchangePosition
impl UnsafeUnpin for ExchangePosition
impl UnwindSafe for ExchangePosition
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