Account Balance Events
Topic:/contractAccount/wallet
After the user 【First time】switches the margin mode (switching from isolated margin to cross margin), the following subjects of this topic will stop pushing
"subject": "orderMargin.change",
"subject": "availableBalance.change",
"subject": "withdrawHold.change",
Use the following subject to replace
"subject": "walletBalance.change"
Asset Overview by Currency Push
{
"userId": "xbc453tg732eba53a88ggyt8c",
"topic": "/contractAccount/wallet",
"subject": "walletBalance.change",
"data": {
"currency": "XBT", // Currency Symbol
"walletBalance": "2.002", // Wallet Balance
"availableBalance": "2.002", // Available Balance
"holdBalance": "0", // Frozen Balance
"isolatedOrderMargin": "0", // Margin of the isolated margin order
"isolatedPosMargin": "0", // Margin of the isolated margin position, including isolated margin funding fees
"isolatedUnPnl": "0", // Unrealized P&L in isolated margin mode
"isolatedFundingFeeMargin":"0", // Isolated margin funding fee
"crossOrderMargin": "0", // Margin of the cross margin order
"crossPosMargin": "0", // Margin of the cross margin position
"crossUnPnl": "0", // Unrealized P&L in cross margin mode
"equity": "2.002", // Equity
"totalCrossMargin": "2.002", // Total margin under cross margin mode
"version": "9", // Version. When holding a cross margin position, the available balance may change with fluctuations in the mark price, leading to discrepancies in the available balance for the same version number.
"timestamp": "1714632069838" // Last modified time
}
}
Order Margin Event(Deprecate)
//Order Margin Event
{
"userId": "xbc453tg732eba53a88ggyt8c", // Deprecated, will detele later
"topic": "/contractAccount/wallet",
"subject": "orderMargin.change",
"data": {
"orderMargin": 5923, //Current order margin
"currency": "USDT", //Currency
"timestamp": 1553842862614
}
}
Available Balance Event(Deprecate)
//Available Balance Event
{
"userId": "xbc453tg732eba53a88ggyt8c", // Deprecated, will detele later
"topic": "/contractAccount/wallet",
"subject": "availableBalance.change",
"data": {
"availableBalance": 5923, //Current available amount
"holdBalance": 2312, //Frozen amount = positionMargin + orderMargin + frozenFunds
"currency": "USDT", //Currency
"timestamp": 1553842862614
}
}
Withdrawal Amount & Transfer-Out Amount Event(Deprecate)
//Withdrawal Amount & Transfer-Out Amount Event
{
"userId": "xbc453tg732eba53a88ggyt8c", // Deprecated, will detele later
"topic": "/contractAccount/wallet",
"subject": "withdrawHold.change",
"data": {
"withdrawHold": 5923, // Current frozen amount for withdrawal
"currency": "USDT", //Currency
"timestamp": 1553842862614
}
}