pub struct Position {
pub instrument: Option<InstrumentName>,
pub pl: Option<f64>,
pub unrealized_pl: Option<f64>,
pub margin_used: Option<f64>,
pub resettable_pl: Option<f64>,
pub financing: Option<f64>,
pub commission: Option<f64>,
pub guaranteed_execution_fees: Option<f64>,
pub long: Option<Box<PositionSide>>,
pub short: Option<Box<PositionSide>>,
}Expand description
Position : The specification of a Position within an Account.
Fields§
§instrument: Option<InstrumentName>§pl: Option<f64>Profit/loss realized by the Position over the lifetime of the Account.
unrealized_pl: Option<f64>The unrealized profit/loss of all open Trades that contribute to this Position.
margin_used: Option<f64>Margin currently used by the Position.
resettable_pl: Option<f64>Profit/loss realized by the Position since the Account’s resettablePL was last reset by the client.
financing: Option<f64>The total amount of financing paid/collected for this instrument over the lifetime of the Account.
commission: Option<f64>The total amount of commission paid for this instrument over the lifetime of the Account.
guaranteed_execution_fees: Option<f64>The total amount of fees charged over the lifetime of the Account for the execution of guaranteed Stop Loss Orders for this instrument.
long: Option<Box<PositionSide>>§short: Option<Box<PositionSide>>Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Position
impl<'de> Deserialize<'de> for Position
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
impl StructuralPartialEq for Position
Auto Trait Implementations§
impl Freeze for Position
impl RefUnwindSafe for Position
impl Send for Position
impl Sync for Position
impl Unpin for Position
impl UnsafeUnpin for Position
impl UnwindSafe for Position
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