pub struct WalletCoin {Show 17 fields
pub coin: String,
pub equity: Decimal,
pub usd_value: Decimal,
pub wallet_balance: Decimal,
pub locked: Decimal,
pub spot_hedging_qty: Decimal,
pub borrow_amount: Decimal,
pub accrued_interest: Decimal,
pub total_order_im: Option<Decimal>,
pub total_position_im: Option<Decimal>,
pub total_position_mm: Option<Decimal>,
pub unrealised_pnl: Decimal,
pub cum_realised_pnl: Decimal,
pub bonus: Decimal,
pub collateral_switch: bool,
pub margin_collateral: bool,
pub spot_borrow: Option<Decimal>,
}Fields§
§coin: StringCoin name, such as BTC, ETH, USDT, USDC
equity: DecimalEquity of coin
usd_value: DecimalUSD value of coin. If this coin cannot be collateral, then it is 0
wallet_balance: DecimalWallet balance of coin
locked: DecimalLocked balance due to the Spot open order
spot_hedging_qty: DecimalThe spot asset qty that is used to hedge in the portfolio margin, truncate to 8 decimals and “0” by default. This is a unique field for Unified account.
borrow_amount: DecimalBorrow amount of current coin
accrued_interest: DecimalAccrued interest
total_order_im: Option<Decimal>Pre-occupied margin for order. For portfolio margin mode, it returns “”
total_position_im: Option<Decimal>Sum of initial margin of all positions + Pre-occupied liquidation fee. For portfolio margin mode, it returns “”
total_position_mm: Option<Decimal>Sum of maintenance margin for all positions. For portfolio margin mode, it returns “”
unrealised_pnl: DecimalUnrealised P&L
cum_realised_pnl: DecimalCumulative Realised P&L
bonus: DecimalBonus. This is a unique field for accountType=UNIFIED
collateral_switch: boolWhether the collateral is turned on by user (user), true: ON, false: OFF When marginCollateral=true, then collateralSwitch is meaningful
margin_collateral: boolWhether it can be used as a margin collateral currency (platform), true: YES, false: NO When marginCollateral=false, then collateralSwitch is meaningless
spot_borrow: Option<Decimal>Borrow amount by spot margin trade and manual borrow amount (does not include borrow amount by spot margin active order). spotBorrow field corresponding to spot liabilities is detailed in the announcement.
Trait Implementations§
Source§impl Clone for WalletCoin
impl Clone for WalletCoin
Source§fn clone(&self) -> WalletCoin
fn clone(&self) -> WalletCoin
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 WalletCoin
impl Debug for WalletCoin
Source§impl<'de> Deserialize<'de> for WalletCoin
impl<'de> Deserialize<'de> for WalletCoin
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>,
Source§impl PartialEq for WalletCoin
impl PartialEq for WalletCoin
Source§fn eq(&self, other: &WalletCoin) -> bool
fn eq(&self, other: &WalletCoin) -> bool
self and other values to be equal, and is used by ==.