跳至主要内容

查詢賬戶所有幣種余額

支持查詢母帳戶的各個帳戶類型的幣種餘額,以及母帳戶下各子帳戶的各個帳戶類型的幣種餘額。

HTTP 請求

GET /v5/asset/transfer/query-account-coins-balance

請求參數

參數是否必須類型說明
memberIdfalsestring用戶ID. 當使用母帳號api key查詢子帳戶的幣種餘額時,該字段必傳
accountTypetruestring賬戶類型
coinfalsestring幣種類型
withBonusfalseinteger是否查詢體驗金. 0(默認):不查詢; 1:查詢

返回參數

參數類型說明
accountTypestring賬戶類型
memberIdstring用戶ID
balanceObject
> coinstring幣種類型
> walletBalancestring錢包余額
> transferBalancestring可划余額
> bonusstring体验金

請求示例

GET /v5/asset/transfer/query-account-coins-balance?accountType=FUND&coin=USDC HTTP/1.1
Host: api-testnet.bybit.com
X-BAPI-SIGN: XXXXX
X-BAPI-API-KEY: XXXXX
X-BAPI-TIMESTAMP: 1675866354698
X-BAPI-RECV-WINDOW: 5000

響應示例

{
"retCode": 0,
"retMsg": "success",
"result": {
"memberId": "533285",
"accountType": "FUND",
"balance": [
{
"coin": "USDT",
"transferBalance": "1010",
"walletBalance": "1010",
"bonus": ""
},
{
"coin": "USDC",
"transferBalance": "0",
"walletBalance": "0",
"bonus": ""
}
]
},
"retExtInfo": {},
"time": 1675865290069
}