Skip to main content

Account

Struct Account 

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

Account : The full details of a client’s Account. This includes full open Trade, open Position and pending Order representation.

Fields§

§id: Option<String>

The Account’s identifier

§alias: Option<String>

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

§currency: Option<AccountCurrency>§balance: Option<String>

The current balance of the Account.

§created_by_user_id: Option<i32>

ID of the user that created the Account.

§created_time: Option<String>

A date and time value using either RFC3339 or UNIX time representation. 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_stop_loss_order_mode: Option<AccountGuaranteedStopLossOrderMode>§pl: Option<String>

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

§resettable_pl: Option<String>

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

§resettable_pl_time: Option<String>

A date and time value using either RFC3339 or UNIX time representation. 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).

§financing: Option<String>

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

§commission: Option<String>

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

§guaranteed_execution_fees: Option<String>

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

§margin_rate: Option<String>

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.

§margin_call_enter_time: Option<String>

A date and time value using either RFC3339 or UNIX time representation. 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_call_extension_count: Option<i32>

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

§last_margin_call_extension_time: Option<String>

A date and time value using either RFC3339 or UNIX time representation. 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).

§open_trade_count: Option<i32>

The number of Trades currently open in the Account.

§open_position_count: Option<i32>

The number of Positions currently open in the Account.

§pending_order_count: Option<i32>

The number of Orders currently pending in the Account.

§hedging_enabled: Option<bool>

Flag indicating that the Account has hedging enabled.

§last_order_fill_timestamp: Option<String>

A date and time value using either RFC3339 or UNIX time representation. 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_transaction_id: Option<String>

The ID of the last Transaction created for the Account.

§unrealized_pl: Option<String>

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

§nav: Option<String>

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

§margin_used: Option<String>

Margin currently used for the Account.

§margin_available: Option<String>

Margin available for Account currency.

§position_value: Option<String>

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

§margin_closeout_unrealized_pl: Option<String>

The Account’s margin closeout unrealized PL.

§margin_closeout_nav: Option<String>

The Account’s margin closeout NAV.

§margin_closeout_margin_used: Option<String>

The Account’s margin closeout margin used.

§margin_closeout_percent: Option<String>

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<String>

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

§withdrawal_limit: Option<String>

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<String>

The Account’s margin call margin used.

§margin_call_percent: Option<String>

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

§trades: Option<Vec<TradeSummary>>

The details of the Trades currently open in the Account.

§positions: Option<Vec<Position>>

The details all Account Positions.

§orders: Option<Vec<Order>>

The details of the Orders currently pending in the Account.

Implementations§

Source§

impl Account

Source

pub fn new() -> Account

The full details of a client’s Account. This includes full open Trade, open Position and pending Order representation.

Trait Implementations§

Source§

impl Clone for Account

Source§

fn clone(&self) -> Account

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 Account

Source§

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

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

impl Default for Account

Source§

fn default() -> Account

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Account

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 Account

Source§

fn eq(&self, other: &Account) -> 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 Account

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 Account

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> ErasedDestructor for T
where T: 'static,

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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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