[][src]Struct fxoanda_definitions::Position

pub struct Position {
    pub financing: Option<f32>,
    pub short: Option<PositionSide>,
    pub margin_used: Option<f32>,
    pub unrealized_pl: Option<f32>,
    pub commission: Option<f32>,
    pub long: Option<PositionSide>,
    pub instrument: Option<String>,
    pub resettable_pl: Option<f32>,
    pub guaranteed_execution_fees: Option<f32>,
    pub pl: Option<f32>,
}

Fields

financing: Option<f32>

The total amount of financing paid/collected for this instrument 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.

short: Option<PositionSide>

The representation of a Position for a single direction (long or short).

margin_used: Option<f32>

Margin currently used by the Position. 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 Position. format: A decimal number encoded as a string. The amount of precision provided depends on the Account's home currency.

commission: Option<f32>

The total amount of commission paid for this instrument 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.

long: Option<PositionSide>

The representation of a Position for a single direction (long or short).

instrument: Option<String>

The Position's Instrument. format: A string containing the base currency and quote currency delimited by a "_".

resettable_pl: Option<f32>

Profit/loss realized by the Position 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 for this instrument. format: A decimal number encoded as a string. The amount of precision provided depends on the Account's home currency.

pl: Option<f32>

Profit/loss realized by the Position 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 Position[src]

pub fn new() -> Position[src]

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

The total amount of financing paid/collected for this instrument 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 Position

pub fn with_short(self, x: PositionSide) -> Self[src]

The representation of a Position for a single direction (long or short).

  • param PositionSide
  • return Position

pub fn with_margin_used(self, x: f32) -> Self[src]

Margin currently used by the Position. format: A decimal number encoded as a string. The amount of precision provided depends on the Account's home currency.

  • param f32
  • return Position

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

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

  • param f32
  • return Position

pub fn with_commission(self, x: f32) -> Self[src]

The total amount of commission paid for this instrument 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 Position

pub fn with_long(self, x: PositionSide) -> Self[src]

The representation of a Position for a single direction (long or short).

  • param PositionSide
  • return Position

pub fn with_instrument(self, x: String) -> Self[src]

The Position's Instrument. format: A string containing the base currency and quote currency delimited by a "_".

  • param String
  • return Position

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

Profit/loss realized by the Position 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 Position

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

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

  • param f32
  • return Position

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

Profit/loss realized by the Position 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 Position

Trait Implementations

impl Debug for Position[src]

impl Serialize for Position[src]

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

Auto Trait Implementations

impl Send for Position

impl Sync for Position

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]