[][src]Struct fxoanda::Account

pub struct Account {
    pub positions: Option<Vec<Position>>,
    pub trades: Option<Vec<TradeSummary>>,
    pub resettable_pl_time: Option<DateTime<Utc>>,
    pub margin_used: Option<f32>,
    pub margin_closeout_position_value: Option<f32>,
    pub margin_call_extension_count: Option<i32>,
    pub currency: Option<String>,
    pub resettable_pl: Option<f32>,
    pub nav: Option<f32>,
    pub last_margin_call_extension_time: Option<DateTime<Utc>>,
    pub margin_closeout_margin_used: Option<f32>,
    pub open_trade_count: Option<i32>,
    pub id: Option<String>,
    pub open_position_count: Option<i32>,
    pub margin_closeout_nav: Option<f32>,
    pub margin_closeout_percent: Option<f32>,
    pub margin_call_margin_used: Option<f32>,
    pub commission: Option<f32>,
    pub hedging_enabled: Option<bool>,
    pub position_value: Option<f32>,
    pub pl: Option<f32>,
    pub guaranteed_stop_loss_order_mode: Option<String>,
    pub last_transaction_id: Option<String>,
    pub margin_available: Option<f32>,
    pub margin_rate: Option<f32>,
    pub margin_call_percent: Option<f32>,
    pub margin_call_enter_time: Option<DateTime<Utc>>,
    pub guaranteed_execution_fees: Option<f32>,
    pub financing: Option<f32>,
    pub balance: Option<f32>,
    pub pending_order_count: Option<i32>,
    pub withdrawal_limit: Option<f32>,
    pub unrealized_pl: Option<f32>,
    pub alias: Option<String>,
    pub created_by_user_id: Option<i32>,
    pub margin_closeout_unrealized_pl: Option<f32>,
    pub created_time: Option<DateTime<Utc>>,
    pub last_order_fill_timestamp: Option<DateTime<Utc>>,
    pub orders: Option<Vec<Order>>,
}

Fields

positions: Option<Vec<Position>>

The details all Account Positions.

trades: Option<Vec<TradeSummary>>

The details of the Trades currently open in the Account.

resettable_pl_time: Option<DateTime<Utc>>

The date/time that the Account's resettablePL was last reset. format: The RFC 3339 representation is a string conforming to https://tools.ietf.org/rfc/rfc3339.txt. The Unix representation is a string representing the number of seconds since the Unix Epoch (January 1st, 1970 at UTC). The value is a fractional number, where the fractional part represents a fraction of a second (up to nine decimal places).

margin_used: Option<f32>

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

margin_closeout_position_value: Option<f32>

The value of the Account's open positions as used for margin closeout calculations represented in the Account's home currency. format: A decimal number encoded as a string. The amount of precision provided depends on what the number represents.

margin_call_extension_count: Option<i32>

The number of times that the Account's current margin call was extended.

currency: Option<String>

The home currency of the Account format: A string containing an ISO 4217 currency (http://en.wikipedia.org/wiki/ISO_4217)

resettable_pl: Option<f32>

The total realized profit/loss for the Account since it 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.

nav: Option<f32>

The net asset value of the Account. Equal to Account balance + unrealizedPL. format: A decimal number encoded as a string. The amount of precision provided depends on the Account's home currency.

last_margin_call_extension_time: Option<DateTime<Utc>>

The date/time of the Account's last margin call extension. format: The RFC 3339 representation is a string conforming to https://tools.ietf.org/rfc/rfc3339.txt. The Unix representation is a string representing the number of seconds since the Unix Epoch (January 1st, 1970 at UTC). The value is a fractional number, where the fractional part represents a fraction of a second (up to nine decimal places).

margin_closeout_margin_used: Option<f32>

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

open_trade_count: Option<i32>

The number of Trades currently open in the Account.

id: Option<String>

The Account's identifier format: "-"-delimited string with format "{siteID}-{divisionID}-{userID}-{accountNumber}"

open_position_count: Option<i32>

The number of Positions currently open in the Account.

margin_closeout_nav: Option<f32>

The Account's margin closeout NAV. format: A decimal number encoded as a string. The amount of precision provided depends on the Account's home currency.

margin_closeout_percent: Option<f32>

The Account's margin closeout percentage. When this value is 1.0 or above the Account is in a margin closeout situation. format: A decimal number encoded as a string. The amount of precision provided depends on what the number represents.

margin_call_margin_used: Option<f32>

The Account's margin call margin used. 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 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.

hedging_enabled: Option<bool>

Flag indicating that the Account has hedging enabled.

position_value: Option<f32>

The value of the Account's open positions represented in the Account's home currency. format: A decimal number encoded as a string. The amount of precision provided depends on the Account's home currency.

pl: Option<f32>

The total profit/loss realized 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.

guaranteed_stop_loss_order_mode: Option<String>

The current guaranteed Stop Loss Order mode of the Account.

last_transaction_id: Option<String>

The ID of the last Transaction created for the Account. format: String representation of the numerical OANDA-assigned TransactionID

margin_available: Option<f32>

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

margin_rate: Option<f32>

Client-provided margin rate override for the Account. The effective margin rate of the Account is the lesser of this value and the OANDA margin rate for the Account's division. This value is only provided if a margin rate override exists for the Account. format: A decimal number encoded as a string. The amount of precision provided depends on what the number represents.

margin_call_percent: Option<f32>

The Account's margin call percentage. When this value is 1.0 or above the Account is in a margin call situation. format: A decimal number encoded as a string. The amount of precision provided depends on what the number represents.

margin_call_enter_time: Option<DateTime<Utc>>

The date/time when the Account entered a margin call state. Only provided if the Account is in a margin call. format: The RFC 3339 representation is a string conforming to https://tools.ietf.org/rfc/rfc3339.txt. The Unix representation is a string representing the number of seconds since the Unix Epoch (January 1st, 1970 at UTC). The value is a fractional number, where the fractional part represents a fraction of a second (up to nine decimal places).

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

financing: Option<f32>

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

balance: Option<f32>

The current balance of the Account. format: A decimal number encoded as a string. The amount of precision provided depends on the Account's home currency.

pending_order_count: Option<i32>

The number of Orders currently pending in the Account.

withdrawal_limit: Option<f32>

The current WithdrawalLimit for the account which will be zero or a positive value indicating how much can be withdrawn from 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 total unrealized profit/loss for all Trades currently open in the Account. format: A decimal number encoded as a string. The amount of precision provided depends on the Account's home currency.

alias: Option<String>

Client-assigned alias for the Account. Only provided if the Account has an alias set

created_by_user_id: Option<i32>

ID of the user that created the Account.

margin_closeout_unrealized_pl: Option<f32>

The Account's margin closeout unrealized PL. format: A decimal number encoded as a string. The amount of precision provided depends on the Account's home currency.

created_time: Option<DateTime<Utc>>

The date/time when the Account was created. format: The RFC 3339 representation is a string conforming to https://tools.ietf.org/rfc/rfc3339.txt. The Unix representation is a string representing the number of seconds since the Unix Epoch (January 1st, 1970 at UTC). The value is a fractional number, where the fractional part represents a fraction of a second (up to nine decimal places).

last_order_fill_timestamp: Option<DateTime<Utc>>

The date/time of the last order that was filled for this account. format: The RFC 3339 representation is a string conforming to https://tools.ietf.org/rfc/rfc3339.txt. The Unix representation is a string representing the number of seconds since the Unix Epoch (January 1st, 1970 at UTC). The value is a fractional number, where the fractional part represents a fraction of a second (up to nine decimal places).

orders: Option<Vec<Order>>

The details of the Orders currently pending in the Account.

Methods

impl Account[src]

pub fn new() -> Account[src]

pub fn with_positions(self, x: Vec<Position>) -> Account[src]

The details all Account Positions.

  • param Vec
  • return Account

pub fn with_trades(self, x: Vec<TradeSummary>) -> Account[src]

The details of the Trades currently open in the Account.

  • param Vec
  • return Account

pub fn with_resettable_pl_time(self, x: DateTime<Utc>) -> Account[src]

The date/time that the Account's resettablePL was last reset. format: The RFC 3339 representation is a string conforming to https://tools.ietf.org/rfc/rfc3339.txt. The Unix representation is a string representing the number of seconds since the Unix Epoch (January 1st, 1970 at UTC). The value is a fractional number, where the fractional part represents a fraction of a second (up to nine decimal places).

  • param DateTime
  • return Account

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

Margin currently used for 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 Account

pub fn with_margin_closeout_position_value(self, x: f32) -> Account[src]

The value of the Account's open positions as used for margin closeout calculations represented in the Account's home currency. format: A decimal number encoded as a string. The amount of precision provided depends on what the number represents.

  • param f32
  • return Account

pub fn with_margin_call_extension_count(self, x: i32) -> Account[src]

The number of times that the Account's current margin call was extended.

  • param i32
  • return Account

pub fn with_currency(self, x: String) -> Account[src]

The home currency of the Account format: A string containing an ISO 4217 currency (http://en.wikipedia.org/wiki/ISO_4217)

  • param String
  • return Account

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

The total realized profit/loss for the Account since it 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 Account

pub fn with_nav(self, x: f32) -> Account[src]

The net asset value of the Account. Equal to Account balance + unrealizedPL. format: A decimal number encoded as a string. The amount of precision provided depends on the Account's home currency.

  • param f32
  • return Account

pub fn with_last_margin_call_extension_time(self, x: DateTime<Utc>) -> Account[src]

The date/time of the Account's last margin call extension. format: The RFC 3339 representation is a string conforming to https://tools.ietf.org/rfc/rfc3339.txt. The Unix representation is a string representing the number of seconds since the Unix Epoch (January 1st, 1970 at UTC). The value is a fractional number, where the fractional part represents a fraction of a second (up to nine decimal places).

  • param DateTime
  • return Account

pub fn with_margin_closeout_margin_used(self, x: f32) -> Account[src]

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

  • param f32
  • return Account

pub fn with_open_trade_count(self, x: i32) -> Account[src]

The number of Trades currently open in the Account.

  • param i32
  • return Account

pub fn with_id(self, x: String) -> Account[src]

The Account's identifier format: "-"-delimited string with format "{siteID}-{divisionID}-{userID}-{accountNumber}"

  • param String
  • return Account

pub fn with_open_position_count(self, x: i32) -> Account[src]

The number of Positions currently open in the Account.

  • param i32
  • return Account

pub fn with_margin_closeout_nav(self, x: f32) -> Account[src]

The Account's margin closeout NAV. format: A decimal number encoded as a string. The amount of precision provided depends on the Account's home currency.

  • param f32
  • return Account

pub fn with_margin_closeout_percent(self, x: f32) -> Account[src]

The Account's margin closeout percentage. When this value is 1.0 or above the Account is in a margin closeout situation. format: A decimal number encoded as a string. The amount of precision provided depends on what the number represents.

  • param f32
  • return Account

pub fn with_margin_call_margin_used(self, x: f32) -> Account[src]

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

  • param f32
  • return Account

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

The total amount of commission paid 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 Account

pub fn with_hedging_enabled(self, x: bool) -> Account[src]

Flag indicating that the Account has hedging enabled.

  • param bool
  • return Account

pub fn with_position_value(self, x: f32) -> Account[src]

The value of the Account's open positions represented in the Account's home currency. format: A decimal number encoded as a string. The amount of precision provided depends on the Account's home currency.

  • param f32
  • return Account

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

The total profit/loss realized 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 Account

pub fn with_guaranteed_stop_loss_order_mode(self, x: String) -> Account[src]

The current guaranteed Stop Loss Order mode of the Account.

  • param String
  • return Account

pub fn with_last_transaction_id(self, x: String) -> Account[src]

The ID of the last Transaction created for the Account. format: String representation of the numerical OANDA-assigned TransactionID

  • param String
  • return Account

pub fn with_margin_available(self, x: f32) -> Account[src]

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

  • param f32
  • return Account

pub fn with_margin_rate(self, x: f32) -> Account[src]

Client-provided margin rate override for the Account. The effective margin rate of the Account is the lesser of this value and the OANDA margin rate for the Account's division. This value is only provided if a margin rate override exists for the Account. format: A decimal number encoded as a string. The amount of precision provided depends on what the number represents.

  • param f32
  • return Account

pub fn with_margin_call_percent(self, x: f32) -> Account[src]

The Account's margin call percentage. When this value is 1.0 or above the Account is in a margin call situation. format: A decimal number encoded as a string. The amount of precision provided depends on what the number represents.

  • param f32
  • return Account

pub fn with_margin_call_enter_time(self, x: DateTime<Utc>) -> Account[src]

The date/time when the Account entered a margin call state. Only provided if the Account is in a margin call. format: The RFC 3339 representation is a string conforming to https://tools.ietf.org/rfc/rfc3339.txt. The Unix representation is a string representing the number of seconds since the Unix Epoch (January 1st, 1970 at UTC). The value is a fractional number, where the fractional part represents a fraction of a second (up to nine decimal places).

  • param DateTime
  • return Account

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

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

  • param f32
  • return Account

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

The total amount of financing paid/collected 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 Account

pub fn with_balance(self, x: f32) -> Account[src]

The current balance 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 Account

pub fn with_pending_order_count(self, x: i32) -> Account[src]

The number of Orders currently pending in the Account.

  • param i32
  • return Account

pub fn with_withdrawal_limit(self, x: f32) -> Account[src]

The current WithdrawalLimit for the account which will be zero or a positive value indicating how much can be withdrawn from 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 Account

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

The total unrealized profit/loss for all Trades currently open in 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 Account

pub fn with_alias(self, x: String) -> Account[src]

Client-assigned alias for the Account. Only provided if the Account has an alias set

  • param String
  • return Account

pub fn with_created_by_user_id(self, x: i32) -> Account[src]

ID of the user that created the Account.

  • param i32
  • return Account

pub fn with_margin_closeout_unrealized_pl(self, x: f32) -> Account[src]

The Account's margin closeout unrealized PL. format: A decimal number encoded as a string. The amount of precision provided depends on the Account's home currency.

  • param f32
  • return Account

pub fn with_created_time(self, x: DateTime<Utc>) -> Account[src]

The date/time when the Account was created. format: The RFC 3339 representation is a string conforming to https://tools.ietf.org/rfc/rfc3339.txt. The Unix representation is a string representing the number of seconds since the Unix Epoch (January 1st, 1970 at UTC). The value is a fractional number, where the fractional part represents a fraction of a second (up to nine decimal places).

  • param DateTime
  • return Account

pub fn with_last_order_fill_timestamp(self, x: DateTime<Utc>) -> Account[src]

The date/time of the last order that was filled for this account. format: The RFC 3339 representation is a string conforming to https://tools.ietf.org/rfc/rfc3339.txt. The Unix representation is a string representing the number of seconds since the Unix Epoch (January 1st, 1970 at UTC). The value is a fractional number, where the fractional part represents a fraction of a second (up to nine decimal places).

  • param DateTime
  • return Account

pub fn with_orders(self, x: Vec<Order>) -> Account[src]

The details of the Orders currently pending in the Account.

  • param Vec
  • return Account

Trait Implementations

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

impl Serialize for Account[src]

impl Debug for Account[src]

Auto Trait Implementations

impl Send for Account

impl Sync for Account

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