Skip to main content

AccountSummary

Struct AccountSummary 

Source
pub struct AccountSummary {
Show 38 fields pub id: Option<AccountID>, pub alias: Option<String>, pub currency: Option<Currency>, pub created_by_user_id: Option<i64>, pub created_time: Option<Timestamp>, pub guaranteed_stop_loss_order_parameters: Option<GuaranteedStopLossOrderParameters>, pub guaranteed_stop_loss_order_mode: Option<GuaranteedStopLossOrderMode>, pub guaranteed_stop_loss_order_mutability: Option<GuaranteedStopLossOrderMutability>, pub resettable_pl_time: Option<Timestamp>, pub margin_rate: Option<Decimal>, pub open_trade_count: Option<i64>, pub open_position_count: Option<i64>, pub pending_order_count: Option<i64>, pub hedging_enabled: Option<bool>, pub unrealized_pl: Option<Decimal>, pub nav: Option<Decimal>, pub margin_used: Option<Decimal>, pub margin_available: Option<Decimal>, pub position_value: Option<Decimal>, pub margin_closeout_unrealized_pl: Option<Decimal>, pub margin_closeout_nav: Option<Decimal>, pub margin_closeout_margin_used: Option<Decimal>, pub margin_closeout_percent: Option<Decimal>, pub margin_closeout_position_value: Option<Decimal>, pub withdrawal_limit: Option<Decimal>, pub margin_call_margin_used: Option<Decimal>, pub margin_call_percent: Option<Decimal>, pub balance: Option<Decimal>, pub pl: Option<Decimal>, pub resettable_pl: Option<Decimal>, pub financing: Option<Decimal>, pub commission: Option<Decimal>, pub dividend_adjustment: Option<Decimal>, pub guaranteed_execution_fees: Option<Decimal>, pub margin_call_enter_time: Option<Timestamp>, pub margin_call_extension_count: Option<i64>, pub last_margin_call_extension_time: Option<Timestamp>, pub last_transaction_id: Option<TransactionID>,
}
Expand description

A summary representation of a client’s Account. The AccountSummary does not provide a full specification of pending Orders, open Trades and Positions.

Fields§

§id: Option<AccountID>

The Account’s identifier

§alias: Option<String>

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

§currency: Option<Currency>

The home currency of the Account

§created_by_user_id: Option<i64>

ID of the user that created the Account.

§created_time: Option<Timestamp>

The date/time when the Account was created.

§guaranteed_stop_loss_order_parameters: Option<GuaranteedStopLossOrderParameters>

The current guaranteed Stop Loss Order settings of the Account. This field will only be present if the guaranteedStopLossOrderMode is not ‘DISABLED’.

§guaranteed_stop_loss_order_mode: Option<GuaranteedStopLossOrderMode>

The current guaranteed Stop Loss Order mode of the Account.

§guaranteed_stop_loss_order_mutability: Option<GuaranteedStopLossOrderMutability>

The current guaranteed Stop Loss Order mutability setting of the Account. This field will only be present if the guaranteedStopLossOrderMode is not ‘DISABLED’. Deprecated: Will be removed in a future API update.

§resettable_pl_time: Option<Timestamp>

The date/time that the Account’s resettablePL was last reset.

§margin_rate: Option<Decimal>

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.

§open_trade_count: Option<i64>

The number of Trades currently open in the Account.

§open_position_count: Option<i64>

The number of Positions currently open in the Account.

§pending_order_count: Option<i64>

The number of Orders currently pending in the Account.

§hedging_enabled: Option<bool>

Flag indicating that the Account has hedging enabled.

§unrealized_pl: Option<Decimal>

The total unrealized profit/loss for all Trades currently open in the Account.

§nav: Option<Decimal>

The net asset value of the Account. Equal to Account balance + unrealizedPL.

§margin_used: Option<Decimal>

Margin currently used for the Account.

§margin_available: Option<Decimal>

Margin available for Account currency.

§position_value: Option<Decimal>

The value of the Account’s open positions represented in the Account’s home currency.

§margin_closeout_unrealized_pl: Option<Decimal>

The Account’s margin closeout unrealized PL.

§margin_closeout_nav: Option<Decimal>

The Account’s margin closeout NAV.

§margin_closeout_margin_used: Option<Decimal>

The Account’s margin closeout margin used.

§margin_closeout_percent: Option<Decimal>

The Account’s margin closeout percentage. When this value is 1.0 or above the Account is in a margin closeout situation.

§margin_closeout_position_value: Option<Decimal>

The value of the Account’s open positions as used for margin closeout calculations represented in the Account’s home currency.

§withdrawal_limit: Option<Decimal>

The current WithdrawalLimit for the account which will be zero or a positive value indicating how much can be withdrawn from the account.

§margin_call_margin_used: Option<Decimal>

The Account’s margin call margin used.

§margin_call_percent: Option<Decimal>

The Account’s margin call percentage. When this value is 1.0 or above the Account is in a margin call situation.

§balance: Option<Decimal>

The current balance of the account.

§pl: Option<Decimal>

The total profit/loss realized over the lifetime of the Account.

§resettable_pl: Option<Decimal>

The total realized profit/loss for the account since it was last reset by the client.

§financing: Option<Decimal>

The total amount of financing paid/collected over the lifetime of the account.

§commission: Option<Decimal>

The total amount of commission paid over the lifetime of the Account.

§dividend_adjustment: Option<Decimal>

The total amount of dividend adjustment paid over the lifetime of the Account in the Account’s home currency.

§guaranteed_execution_fees: Option<Decimal>

The total amount of fees charged over the lifetime of the Account for the execution of guaranteed Stop Loss Orders.

§margin_call_enter_time: Option<Timestamp>

The date/time when the Account entered a margin call state. Only provided if the Account is in a margin call.

§margin_call_extension_count: Option<i64>

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

§last_margin_call_extension_time: Option<Timestamp>

The date/time of the Account’s last margin call extension.

§last_transaction_id: Option<TransactionID>

The ID of the last Transaction created for the Account.

Trait Implementations§

Source§

impl Clone for AccountSummary

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AccountSummary

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for AccountSummary

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for AccountSummary

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for AccountSummary

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for AccountSummary

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

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

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more