pub struct BinanceFuturesAccountInfo {Show 18 fields
pub total_initial_margin: Option<String>,
pub total_maint_margin: Option<String>,
pub total_wallet_balance: Option<String>,
pub total_unrealized_profit: Option<String>,
pub total_margin_balance: Option<String>,
pub total_position_initial_margin: Option<String>,
pub total_open_order_initial_margin: Option<String>,
pub total_cross_wallet_balance: Option<String>,
pub total_cross_un_pnl: Option<String>,
pub available_balance: Option<String>,
pub max_withdraw_amount: Option<String>,
pub can_deposit: Option<bool>,
pub can_trade: Option<bool>,
pub can_withdraw: Option<bool>,
pub multi_assets_margin: Option<bool>,
pub update_time: Option<i64>,
pub assets: Vec<BinanceFuturesBalance>,
pub positions: Vec<BinanceAccountPosition>,
}Expand description
Futures account information from GET /fapi/v2/account or GET /dapi/v1/account.
Fields§
§total_initial_margin: Option<String>Total initial margin required.
total_maint_margin: Option<String>Total maintenance margin required.
total_wallet_balance: Option<String>Total wallet balance.
total_unrealized_profit: Option<String>Total unrealized profit.
total_margin_balance: Option<String>Total margin balance.
total_position_initial_margin: Option<String>Total position initial margin.
total_open_order_initial_margin: Option<String>Total open order initial margin.
total_cross_wallet_balance: Option<String>Total cross wallet balance.
total_cross_un_pnl: Option<String>Total cross unrealized PnL.
available_balance: Option<String>Available balance.
max_withdraw_amount: Option<String>Max withdraw amount.
can_deposit: Option<bool>Can deposit.
can_trade: Option<bool>Can trade.
can_withdraw: Option<bool>Can withdraw.
multi_assets_margin: Option<bool>Multi-assets margin mode.
update_time: Option<i64>Update time.
assets: Vec<BinanceFuturesBalance>Account balances.
positions: Vec<BinanceAccountPosition>Account positions.
Implementations§
Source§impl BinanceFuturesAccountInfo
impl BinanceFuturesAccountInfo
Sourcepub fn to_account_state(
&self,
account_id: AccountId,
ts_init: UnixNanos,
) -> Result<AccountState>
pub fn to_account_state( &self, account_id: AccountId, ts_init: UnixNanos, ) -> Result<AccountState>
Converts this Binance account info to a Nautilus [AccountState].
§Errors
Returns an error if balance parsing fails.
Trait Implementations§
Source§impl Clone for BinanceFuturesAccountInfo
impl Clone for BinanceFuturesAccountInfo
Source§fn clone(&self) -> BinanceFuturesAccountInfo
fn clone(&self) -> BinanceFuturesAccountInfo
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BinanceFuturesAccountInfo
impl Debug for BinanceFuturesAccountInfo
Source§impl<'de> Deserialize<'de> for BinanceFuturesAccountInfo
impl<'de> Deserialize<'de> for BinanceFuturesAccountInfo
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for BinanceFuturesAccountInfo
impl RefUnwindSafe for BinanceFuturesAccountInfo
impl Send for BinanceFuturesAccountInfo
impl Sync for BinanceFuturesAccountInfo
impl Unpin for BinanceFuturesAccountInfo
impl UnsafeUnpin for BinanceFuturesAccountInfo
impl UnwindSafe for BinanceFuturesAccountInfo
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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>
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