[][src]Struct fxoanda::PositionSide

pub struct PositionSide {
    pub financing: Option<f32>,
    pub unrealized_pl: Option<f32>,
    pub trade_i_ds: Option<Vec<String>>,
    pub resettable_pl: Option<f32>,
    pub guaranteed_execution_fees: Option<f32>,
    pub units: Option<f32>,
    pub average_price: Option<f32>,
    pub pl: Option<f32>,
}

Fields

financing: Option<f32>

The total amount of financing paid/collected for this PositionSide over the lifetime of the Account. format: A decimal number encoded as a string. The amount of precision provided depends on the Account's home currency.

unrealized_pl: Option<f32>

The unrealized profit/loss of all open Trades that contribute to this PositionSide. format: A decimal number encoded as a string. The amount of precision provided depends on the Account's home currency.

trade_i_ds: Option<Vec<String>>

List of the open Trade IDs which contribute to the open Position.

resettable_pl: Option<f32>

Profit/loss realized by the PositionSide since the Account's resettablePL was last reset by the client. format: A decimal number encoded as a string. The amount of precision provided depends on the Account's home currency.

guaranteed_execution_fees: Option<f32>

The total amount of fees charged over the lifetime of the Account for the execution of guaranteed Stop Loss Orders attached to Trades for this PositionSide. format: A decimal number encoded as a string. The amount of precision provided depends on the Account's home currency.

units: Option<f32>

Number of units in the position (negative value indicates short position, positive indicates long position). format: A decimal number encoded as a string. The amount of precision provided depends on what the number represents.

average_price: Option<f32>

Volume-weighted average of the underlying Trade open prices for the Position. format: A decimal number encodes as a string. The amount of precision provided depends on the Instrument.

pl: Option<f32>

Profit/loss realized by the PositionSide over the lifetime of the Account. format: A decimal number encoded as a string. The amount of precision provided depends on the Account's home currency.

Methods

impl PositionSide[src]

pub fn new() -> PositionSide[src]

pub fn with_financing(self, x: f32) -> PositionSide[src]

The total amount of financing paid/collected for this PositionSide over the lifetime of the Account. format: A decimal number encoded as a string. The amount of precision provided depends on the Account's home currency.

  • param f32
  • return PositionSide

pub fn with_unrealized_pl(self, x: f32) -> PositionSide[src]

The unrealized profit/loss of all open Trades that contribute to this PositionSide. format: A decimal number encoded as a string. The amount of precision provided depends on the Account's home currency.

  • param f32
  • return PositionSide

pub fn with_trade_i_ds(self, x: Vec<String>) -> PositionSide[src]

List of the open Trade IDs which contribute to the open Position.

  • param Vec
  • return PositionSide

pub fn with_resettable_pl(self, x: f32) -> PositionSide[src]

Profit/loss realized by the PositionSide since the Account's resettablePL was last reset by the client. format: A decimal number encoded as a string. The amount of precision provided depends on the Account's home currency.

  • param f32
  • return PositionSide

pub fn with_guaranteed_execution_fees(self, x: f32) -> PositionSide[src]

The total amount of fees charged over the lifetime of the Account for the execution of guaranteed Stop Loss Orders attached to Trades for this PositionSide. format: A decimal number encoded as a string. The amount of precision provided depends on the Account's home currency.

  • param f32
  • return PositionSide

pub fn with_units(self, x: f32) -> PositionSide[src]

Number of units in the position (negative value indicates short position, positive indicates long position). format: A decimal number encoded as a string. The amount of precision provided depends on what the number represents.

  • param f32
  • return PositionSide

pub fn with_average_price(self, x: f32) -> PositionSide[src]

Volume-weighted average of the underlying Trade open prices for the Position. format: A decimal number encodes as a string. The amount of precision provided depends on the Instrument.

  • param f32
  • return PositionSide

pub fn with_pl(self, x: f32) -> PositionSide[src]

Profit/loss realized by the PositionSide over the lifetime of the Account. format: A decimal number encoded as a string. The amount of precision provided depends on the Account's home currency.

  • param f32
  • return PositionSide

Trait Implementations

impl<'de> Deserialize<'de> for PositionSide[src]

impl Serialize for PositionSide[src]

impl Debug for PositionSide[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> Erased for T