Skip to main content

AccountChangesState

Struct AccountChangesState 

Source
pub struct AccountChangesState {
Show 16 fields 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 orders: Option<Vec<DynamicOrderState>>, pub trades: Option<Vec<CalculatedTradeState>>, pub positions: Option<Vec<CalculatedPositionState>>,
}
Expand description

AccountChangesState : An AccountChangesState Object is used to represent an Account’s current price-dependent state. Price-dependent Account state is dependent on OANDA’s current Prices, and includes things like unrealized PL, NAV and Trailing Stop Loss Order state.

Fields§

§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.

§orders: Option<Vec<DynamicOrderState>>

The price-dependent state of each pending Order in the Account.

§trades: Option<Vec<CalculatedTradeState>>

The price-dependent state for each open Trade in the Account.

§positions: Option<Vec<CalculatedPositionState>>

The price-dependent state for each open Position in the Account.

Implementations§

Source§

impl AccountChangesState

Source

pub fn new() -> AccountChangesState

An AccountChangesState Object is used to represent an Account’s current price-dependent state. Price-dependent Account state is dependent on OANDA’s current Prices, and includes things like unrealized PL, NAV and Trailing Stop Loss Order state.

Trait Implementations§

Source§

impl Clone for AccountChangesState

Source§

fn clone(&self) -> AccountChangesState

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 AccountChangesState

Source§

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

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

impl Default for AccountChangesState

Source§

fn default() -> AccountChangesState

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

impl<'de> Deserialize<'de> for AccountChangesState

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 AccountChangesState

Source§

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

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 AccountChangesState

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