pub struct DeriveSubaccount {Show 18 fields
pub collaterals: Vec<DeriveCollateral>,
pub collaterals_initial_margin: Decimal,
pub collaterals_maintenance_margin: Decimal,
pub collaterals_value: Decimal,
pub currency: Ustr,
pub initial_margin: Decimal,
pub is_under_liquidation: bool,
pub label: Option<String>,
pub maintenance_margin: Decimal,
pub margin_type: DeriveMarginType,
pub open_orders: Vec<DeriveOrder>,
pub open_orders_margin: Decimal,
pub positions: Vec<DerivePosition>,
pub positions_initial_margin: Decimal,
pub positions_maintenance_margin: Decimal,
pub positions_value: Decimal,
pub subaccount_id: i64,
pub subaccount_value: Decimal,
}Expand description
Subaccount snapshot returned by private/get_subaccount.
Fields§
§collaterals: Vec<DeriveCollateral>Collateral rows contributing to margin.
collaterals_initial_margin: DecimalTotal initial margin credit from collaterals.
collaterals_maintenance_margin: DecimalTotal maintenance margin credit from collaterals.
collaterals_value: DecimalMark-to-market value of all collaterals.
currency: UstrSubaccount currency (e.g. "USDC").
initial_margin: DecimalUSD initial margin requirement.
is_under_liquidation: boolWhether the subaccount is mid-liquidation.
label: Option<String>Free-form subaccount label.
maintenance_margin: DecimalUSD maintenance margin requirement.
margin_type: DeriveMarginTypeMargining mode (standard, portfolio, or PMRM v2).
open_orders: Vec<DeriveOrder>Open orders held by the subaccount.
open_orders_margin: DecimalUSD margin held against open orders.
positions: Vec<DerivePosition>Open positions held by the subaccount.
positions_initial_margin: DecimalUSD initial margin requirement attributable to positions.
positions_maintenance_margin: DecimalUSD maintenance margin requirement attributable to positions.
positions_value: DecimalMark-to-market value of positions.
subaccount_id: i64Subaccount identifier.
subaccount_value: DecimalTotal subaccount value (collateral + positions).
Trait Implementations§
Source§impl Clone for DeriveSubaccount
impl Clone for DeriveSubaccount
Source§fn clone(&self) -> DeriveSubaccount
fn clone(&self) -> DeriveSubaccount
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DeriveSubaccount
impl Debug for DeriveSubaccount
Source§impl<'de> Deserialize<'de> for DeriveSubaccount
impl<'de> Deserialize<'de> for DeriveSubaccount
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for DeriveSubaccount
impl RefUnwindSafe for DeriveSubaccount
impl Send for DeriveSubaccount
impl Sync for DeriveSubaccount
impl Unpin for DeriveSubaccount
impl UnsafeUnpin for DeriveSubaccount
impl UnwindSafe for DeriveSubaccount
Blanket Implementations§
impl<T> Allocation for T
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
impl<'de, T> BorrowedRpcObject<'de> for Twhere
T: RpcBorrow<'de> + RpcSend,
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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