查詢保險基金
查詢Bybit平台的保險基金的數據,包含所有保險池的數據,數據每24小時更新一次。
信息
由於數據24小時更新, 您可能在遭遇自動減倉時, 接口返回的數據還是舊的
HTTP請求
GET /v5/market/insurance
請求參數
參數 | 是否必需 | 類型 | 說明 |
---|---|---|---|
coin | false | string | 幣種名稱. 默認: 返回目前所有的保險池幣種 |
響應參數
參數 | 類型 | 說明 |
---|---|---|
updateTime | string | 數據最近更新的時間戳 (ms) |
list | array | Object |
> coin | string | 保險池的幣種 |
> symbols | string | "BTCUSDT,ETHUSDT,SOLUSDT" "" |
> balance | string | 保險基金的幣種數量 |
> value | string | 保險基金的幣種價值,折合成USD的價值 |
請求示例
- HTTP
- Python
- GO
- Java
- Node.js
GET /v5/market/insurance?coin=ETH HTTP/1.1
Host: api-testnet.bybit.com
from pybit.unified_trading import HTTP
session = HTTP(testnet=True)
print(session.get_insurance(
coin="ETH",
))
import (
"context"
"fmt"
bybit "github.com/wuhewuhe/bybit.go.api"
)
client := bybit.NewBybitHttpClient("", "", bybit.WithBaseURL(bybit.TESTNET))
params := map[string]interface{}{"category": "linear", "symbol": "BTCUSDT"}
client.NewUtaBybitServiceWithParams(params).GetMarketInsurance(context.Background())
import com.bybit.api.client.domain.market.request.MarketDataRequest;
import com.bybit.api.client.service.BybitApiClientFactory;
var client = BybitApiClientFactory.newInstance().newAsyncMarketDataRestClient();
var insuranceRequest = MarketDataRequest.builder().coin("BTC").build();
var insuranceData = client.getInsurance(insuranceRequest);
const { RestClientV5 } = require('bybit-api');
const client = new RestClientV5({
testnet: true,
});
client
.getInsurance({
coin: 'ETH',
})
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});
響應示例
{
"retCode": 0,
"retMsg": "OK",
"result": {
"updatedTime": "1714003200000",
"list": [
{
"coin": "USDT",
"symbols": "MERLUSDT,10000000AIDOGEUSDT,ZEUSUSDT",
"balance": "902178.57602476",
"value": "901898.0963091522"
},
{
"coin": "USDT",
"symbols": "SOLUSDT,OMNIUSDT,ALGOUSDT",
"balance": "14454.51626125",
"value": "14449.515598975464"
},
{
"coin": "USDT",
"symbols": "XLMUSDT,WUSDT",
"balance": "23.45018235",
"value": "22.992864174376344"
},
{
"coin": "USDT",
"symbols": "AGIUSDT,WIFUSDT",
"balance": "10002",
"value": "9998.896846613574"
},
{
"coin": "USDT",
"symbols": "",
"balance": "10148045273.618073",
"value": "10144896808.587431"
}
]
},
"retExtInfo": {},
"time": 1714028451228
}