[−][src]Struct fxoanda::Position
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) -> Position
[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) -> Position
[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) -> Position
[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) -> Position
[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) -> Position
[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) -> Position
[src]
The representation of a Position for a single direction (long or short).
- param PositionSide
- return Position
pub fn with_instrument(self, x: String) -> Position
[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) -> Position
[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) -> Position
[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) -> Position
[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<'de> Deserialize<'de> for Position
[src]
fn deserialize<__D>(
__deserializer: __D
) -> Result<Position, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
[src]
__deserializer: __D
) -> Result<Position, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
impl Serialize for Position
[src]
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
[src]
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
impl Debug for Position
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,