查詢風險率
important
- 如果機構用戶頻繁轉帳,LTV 計算可能會變得不準確,此端點將返回 retCode = 100016,retMsg = "Transfers within your risk unit are too frequent. Please reduce the transfer frequency and try again."
- 遇到這個報錯,建議先減少轉帳頻率,再重試
- 在極端市場波動期間, 此介面可能會出現延遲增加或資料傳遞暫時延遲的情況
- 當用戶發生強平、劃轉、手工還款等過程中的狀態時,LTV不進行計算。我們新增了一個
liqStatus來表示這些狀態。當liqStatus!=0時,此時ltvInfo裡ltv、unpaidAmount、balance都是空字串,unpaidInfo、balanceInfo都是空數組。
HTTP 請求
GET /v5/ins-loan/ltv-convert
請求參數
無
返回參數
| 參數 | 類型 | 說明 |
|---|---|---|
| ltvInfo | array | Object |
| > ltv | string | 風險率 liqStatus != 0 時,傳回空字串。 |
| > rst | string | 剩餘清算時間(UTC 時間,以秒為單位)。 未觸發時顯示為空字串。當 liqStatus != 0 時,傳回空字串。 |
| > parentUid | string | 被指定綁定為機構借貸產品的風險單元Id |
| > subAccountUids | array | 綁定場外借貸產品的UID |
| > unpaidAmount | string | 總負債 (USDT)。當 liqStatus != 0 時,傳回空字串。 |
| > unpaidInfo | array | 負債明細。 當 liqStatus != 0 時,傳回空數組。 |
| >> token | string | 幣種 |
| >> unpaidQty | string | 未還本金 |
| >> unpaidInterest | string | 該字段無效, 暫時請忽略 |
| > balance | string | 總資產(保證金幣種資產折算為USDT資產). 可以參考這裡了解詳細計算。當 liqStatus != 0 時,傳回空字串。 |
| > balanceInfo | array | 資產明細。當 liqStatus != 0 時,傳回空數組。 |
| >> token | string | 保證金幣種 |
| >> price | string | 保證金幣種價格 |
| >> qty | string | 保證金數量 |
| >> convertedAmount | string | 保證金折算金額 |
| > liqStatus | integer | 清算狀態。
|
| liqStatus | integer | 清算狀態。
|
請求示例
- HTTP
- Python
- Node.js
GET /v5/ins-loan/ltv-convert HTTP/1.1
Host: api-testnet.bybit.com
X-BAPI-API-KEY: xxxxxxxxxxxxxxxxxx
X-BAPI-TIMESTAMP: 1686638165351
X-BAPI-RECV-WINDOW: 5000
X-BAPI-SIGN: XXXXX
from pybit.unified_trading import HTTP
session = HTTP(
testnet=True,
api_key="xxxxxxxxxxxxxxxxxx",
api_secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
)
print(session.get_ltv())
const { RestClientV5 } = require('bybit-api');
const client = new RestClientV5({
testnet: true,
key: 'xxxxxxxxxxxxxxxxxx',
secret: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
});
client
.getInstitutionalLendingLTVWithLadderConversionRate()
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
響應示例
{
"retCode": 0,
"retMsg": "",
"result": {
"ltvInfo": [
{
"ltv": "0.75",
"rst": "",
"parentUid": "xxxxx",
"subAccountUids": [
"60568258"
],
"unpaidAmount": "30",
"unpaidInfo": [
{
"token": "USDT",
"unpaidQty": "30",
"unpaidInterest": "0"
}
],
"balance": "40",
"balanceInfo": [
{
"token": "USDT",
"price": "1",
"qty": "40",
"convertedAmount": "40"
}
]
}
]
},
"retExtInfo": {},
"time": 1686638166323
}
When `liqStatus` != 0:
{
"retCode": 0,
"retMsg": "",
"result": {
"ltvInfo": [
{
"ltv": "",
"parentUid": "100331354",
"subAccountUids": [
"100334094",
"100334098"
],
"unpaidAmount": "",
"unpaidInfo": [],
"balance": "",
"balanceInfo": [],
"rst": "",
"liqStatus": 3
}
],
"liqStatus": 3
},
"retExtInfo": {},
"time": 1766462020703
}