跳至主要内容

査詢合約帳戶資產

HTTP 請求

GET /cloud/trade/v3/account/wallet-balance

請求參數

參數是否必需類型說明
accountTypetruestring帳戶類型.
  • 普通帳戶: CONTRACT(期貨)
coinfalsestring幣種名稱
  • 不傳則返回非零資產信息
  • 可以傳多個幣進行查詢,以逗號分隔

響應參數

參數類型說明
listarrayObject
> totalEquitystring賬戶維度換算成usd的資產淨值:Account Margin Balance Base Coin + Account Option Value Base Coin。
> totalWalletBalancestring賬戶維度換算成usd的產錢包餘額:∑ Asset Wallet Balance By USD value of each asset。
> totalMarginBalancestring賬戶維度換算成usd的保證金餘額:totalWalletBalance + totalPerpUPL。
> totalAvailableBalancestring賬戶維度換算成usd的可用餘額:RM:totalMarginBalance - totalInitialMargin。
> totalInitialMarginstring賬戶維度換算成usd的總初始保證金:∑ Asset Total Initial Margin Base Coin。
> totalMaintenanceMarginstring賬戶維度換算成usd的總維持保證金: ∑ Asset Total Maintenance Margin Base Coin。
> coinarrays幣種列表
>> coinstring幣種名稱,例如 BTC,ETH,USDT
>> equitystring當前幣種的資產淨值
>> usdValuestring當前幣種折算成 usd 的價值
>> walletBalancestring當前幣種的錢包餘額
>> availableToWithdrawstring當前幣種的可劃轉提現金額
>> totalOrderIMstring以當前幣種結算的訂單委託預佔用保證金
>> totalPositionIMstring以當前幣種結算的所有倉位起始保證金求和 + 所有倉位的預佔用平倉手續費.
>> totalPositionMMstring以當前幣種結算的所有倉位維持保證金求和.
>> unrealisedPnlstring以當前幣種結算的所有倉位的未結盈虧之和
>> cumRealisedPnlstring以當前幣種結算的所有倉位的累計已結盈虧之和
>> bonusstring體驗金.

請求示例

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

響應示例

{
"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
}