查詢借貸帳戶信息
覆蓋範圍: 全倉槓桿 (經典帳戶)
HTTP 請求
GET /v5/spot-cross-margin-trade/account
請求參數
無
響應參數
參數 | 類型 | 說明 |
---|---|---|
acctBalanceSum | string | 總資產 (折算成BTC) |
debtBalanceSum | string | 總負債 (折算成BTC) |
loanAccountList | array | Object |
> free | string | 可用餘額 |
> interest | string | 未還利息 |
> loan | string | 未還本金 |
> remainAmount | string | 總未還金額 = 未還利息 + 未還本金 |
> locked | string | 鎖定金額 |
> tokenId | string | 幣種 |
> total | string | 合計 |
riskRate | string | 風險率 |
status | integer | 借貸帳戶狀態
|
switchStatus | integer | 全倉槓桿狀態 0 : 關閉, 1 : 開啟 |
請求示例
- HTTP
- Python
GET /v5/spot-cross-margin-trade/account HTTP/1.1
Host: api-testnet.bybit.com
X-BAPI-API-KEY: XXXXXX
X-BAPI-TIMESTAMP: 1677751305868
X-BAPI-RECV-WINDOW: 5000
X-BAPI-SIGN: XXXXXX
from pybit.unified_trading import HTTP
session = HTTP(
testnet=True,
api_key="XXXXX",
api_secret="XXXXX",
)
print(session.spot_margin_trade_normal_get_loan_account_info())
響應示例
{
"retCode": 0,
"retMsg": "success",
"result": {
"acctBalanceSum": "0.455189592150138021",
"debtBalanceSum": "0",
"loanAccountList": [
{
"free": "0.01444",
"interest": "0",
"loan": "0",
"locked": "0",
"remainAmount": "0",
"tokenId": "BTC",
"total": "0.01444"
},
{
"free": "0.21147048",
"interest": "0",
"loan": "0",
"locked": "0",
"remainAmount": "0",
"tokenId": "ETH",
"total": "0.21147048"
},
{
"free": "7963.58978991849",
"interest": "0",
"loan": "0",
"locked": "0",
"remainAmount": "0",
"tokenId": "USDT",
"total": "7963.58978991849"
},
{
"free": "1380.28832",
"interest": "0",
"loan": "0",
"locked": "0",
"remainAmount": "0",
"tokenId": "USDC",
"total": "1380.28832"
}
],
"riskRate": "0",
"status": 1,
"switchStatus": 1
},
"retExtInfo": {},
"time": 1677751306287
}