Get Wallet Balance
HTTP Request
GET /cloud/trade/v3/account/wallet-balance
Request Parameters
| Parameter | Required | Type | Comments |
|---|---|---|---|
| accountType | true | string | Account type
|
| coin | false | string | Coin name
|
Response Parameters
| Parameter | Type | Comments |
|---|---|---|
| list | array | Object |
| > accountType | string | Account type |
| > accountIMRate | string | Account IM rate Trading account(isolated margin), classic account(CONTRACT) |
| > accountMMRate | string | Account MM rate |
| > totalWalletBalance | string | Wallet Balance of account converted to usd:∑ Asset Wallet Balance By USD value of each asset。 |
| > totalMarginBalance | string | Margin Balance of account converted to usd:totalWalletBalance + totalPerpUPL. |
| > totalAvailableBalance | string | Available Balance of account converted to usd:Regular mode:totalMarginBalance - totalInitialMargin. |
| > totalInitialMargin | string | Initial Margin of account converted to usd:∑ Asset Total Initial Margin Base Coin. |
| > totalMaintenanceMargin | string | Maintenance Margin of account converted to usd: ∑ Asset Total Maintenance Margin Base Coin. |
| > coin | array | Object |
| >> coin | string | Coin name, such as BTC, ETH, USDT |
| >> equity | string | Equity of current coin |
| >> usdValue | string | USD value of current coin. |
| >> walletBalance | string | Wallet balance of current coin |
| >> availableToWithdraw | string | Note: this field is deprecated for accountType=UNIFIED from 9 Jan, 2025
|
| >> totalOrderIM | string | Pre-occupied margin for order. |
| >> totalPositionIM | string | Sum of initial margin of all positions + Pre-occupied liquidation fee. |
| >> totalPositionMM | string | Sum of maintenance margin for all positions. |
| >> unrealisedPnl | string | Unrealised P&L |
| >> cumRealisedPnl | string | Cumulative Realised P&L |
| >> bonus | string | Bonus. |
Request Example
GET /cloud/trade/v3/account/wallet-balance?accountType=CONTRACT HTTP/1.1
Host: openapi-testnet.zoomex.com
X-BAPI-SIGN: XXXXX
X-BAPI-API-KEY: XXXXX
X-BAPI-TIMESTAMP: 1672125440406
X-BAPI-RECV-WINDOW: 5000
Response Example
{
"retCode": 0,
"retMsg": "OK",
"result": {
"list": [
{
"accountType": "CONTRACT",
"accountIMRate": "",
"accountMMRate": "",
"totalEquity": "",
"totalWalletBalance": "",
"totalMarginBalance": "",
"totalAvailableBalance": "",
"totalPerpUPL": "",
"totalInitialMargin": "",
"totalMaintenanceMargin": "",
"accountLTV": "",
"coin": [
{
"coin": "BTC",
"equity": "0",
"usdValue": "",
"walletBalance": "0",
"borrowAmount": "",
"availableToBorrow": "",
"availableToWithdraw": "0",
"accruedInterest": "",
"totalOrderIM": "0",
"totalPositionIM": "0",
"totalPositionMM": "",
"unrealisedPnl": "0",
"cumRealisedPnl": "0.12384551"
},
{
"coin": "ETH",
"equity": "0.30050274",
"usdValue": "",
"walletBalance": "0.30050274",
"borrowAmount": "",
"availableToBorrow": "",
"availableToWithdraw": "0.30050274",
"accruedInterest": "",
"totalOrderIM": "0",
"totalPositionIM": "0",
"totalPositionMM": "",
"unrealisedPnl": "0",
"cumRealisedPnl": "0"
},
{
"coin": "EOS",
"equity": "900.3811056",
"usdValue": "",
"walletBalance": "900.3811056",
"borrowAmount": "",
"availableToBorrow": "",
"availableToWithdraw": "900.3811056",
"accruedInterest": "",
"totalOrderIM": "0",
"totalPositionIM": "0",
"totalPositionMM": "",
"unrealisedPnl": "0",
"cumRealisedPnl": "0"
},
{
"coin": "XRP",
"equity": "1100.7278334",
"usdValue": "",
"walletBalance": "1100.7278334",
"borrowAmount": "",
"availableToBorrow": "",
"availableToWithdraw": "1100.7278334",
"accruedInterest": "",
"totalOrderIM": "0",
"totalPositionIM": "0",
"totalPositionMM": "",
"unrealisedPnl": "0",
"cumRealisedPnl": "0"
},
{
"coin": "USDT",
"equity": "60028.59717864",
"usdValue": "",
"walletBalance": "59991.29717864",
"borrowAmount": "",
"availableToBorrow": "",
"availableToWithdraw": "55992.23760272",
"accruedInterest": "",
"totalOrderIM": "0",
"totalPositionIM": "3999.05957592",
"totalPositionMM": "",
"unrealisedPnl": "37.3",
"cumRealisedPnl": "-59483.31410791"
}
]
}
]
},
"retExtInfo": {},
"time": 1696667951890
}