#[non_exhaustive]pub struct Account {
pub currency: String,
pub balance: f64,
pub equity: Option<f64>,
pub realized_pnl: Option<f64>,
pub margin: Option<f64>,
pub orders_margin: Option<f64>,
pub available_funds: Option<f64>,
pub capabilities: Capabilities,
}Expand description
The account behind one Broker value.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.currency: StringThe currency balances are in, such as “USD”.
balance: f64The cash balance in currency.
equity: Option<f64>The balance plus the open positions’ profit or loss, when the broker reports it.
realized_pnl: Option<f64>The profit or loss of the closed trades, net of commissions, when the broker reports it.
margin: Option<f64>The margin the open positions hold, when the broker reports it.
orders_margin: Option<f64>The margin the working orders would hold once filled, when the broker reports it.
available_funds: Option<f64>The equity less the margin of the positions and the working orders, when the broker reports it.
capabilities: CapabilitiesThe order types the account accepts.
Implementations§
Trait Implementations§
impl StructuralPartialEq for Account
Auto Trait Implementations§
impl Freeze for Account
impl RefUnwindSafe for Account
impl Send for Account
impl Sync for Account
impl Unpin for Account
impl UnsafeUnpin for Account
impl UnwindSafe for Account
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more