获取批量交易品种信息
API说明
该接口用于一次性查询多个交易品种的基础信息,包括杠杆倍数、保证金要求、止损率、止盈率、挂单/吃单手续费、结算汇率、最大持仓量等参数。
注意: 获取批量交易品种信息仅支持通过 RESTful API 获取。
注意事项
- 本接口支持通过逗号分隔的字符串,批量查询多个交易品种的信息。
- 单次请求最多可查询20个交易品种。
认证
该接口为公共接口,无需鉴权。 关于公共 RESTful API 的使用方式,请参考 简介 > 认证与代码示例 > 合约交易 > RESTful 公共接口。
请求方法
GET
接口地址
频率限制
该接口的调用频率限制为:每个 IP 和用户 ID 每1秒最多请求2次。
此外,该接口还受到全局频率限制的约束。
有关"全局速率限制"和"多阶段风控限频机制"的详细信息,请参阅“频率限制”部分,跳转
请求参数
| 参数名 | 是否必填 | 类型 | 说明 |
|---|---|---|---|
| symbols | 是 | String | 使用逗号分隔的基础币种简称来指定多个交易品种。 例如:"BTC,ETH,1000PEPE" 注意:USDT 合约只需传入基础货币名称,如 BTCUSDT 传 BTC 即可。单次请求最多允许指定20个交易品种。 |
响应参数
| 字段 | 类型 | 说明 |
|---|---|---|
| base | String | 合约基础币,例如 BTC、ETH。 |
| defaultLeverage | Integer | 默认杠杆倍数。 |
| defaultStopLossRate | BigDecimal | 默认止损比例。 |
| defaultStopProfitRate | BigDecimal | 默认止盈比例。 |
| indexId | Integer | 索引 ID。 |
| leverage | String | 可选杠杆档位列表。 |
| makerFee | BigDecimal | 挂单手续费率。 |
| maxLeverage | Integer | 最大可用杠杆倍数。 |
| minLeverage | Integer | 最小可用杠杆倍数。 |
| maxPosition | BigDecimal | 最大可持仓量。 |
| minSize | BigDecimal | 最小下单张数。 |
| name | String | 合约基础货币名称,如 BTC、ETH。 |
| oneLotMargin | BigDecimal | 每手所需保证金。 |
| oneMaxPosition | BigDecimal | 每手最大持仓量 |
| pricePrecision | Integer | 价格精度的小数位数(例如,2表示0.01 |
| quote | String | 计价币种,例如 USDT。 |
| settledAt | Long | 结算时间戳。 |
| settlementRate | BigDecimal | 资金费率 |
| status | String | 合约状态: offline(下线)、 online(交 易中)、 pretest(预发布)、 settlement(结算中)、 preOffline(预下线)。 |
| takerFee | BigDecimal | 吃单手续费率。 |
| stopCrossPositionRate | Integer | 全仓保证金风险率。 |
| stopSurplusRate | Integer | 最小剩余保证金率。 |
| updatedDate | BigDecimal | 最后更新时间戳。 |
| sort | Integer | 排序编号。 |
| selected | Integer | 默认选择状态(0:否,1:是)。 |
| openSpread | BigDecimal | 开仓点差。 |
| oneLotSize | BigDecimal | 最小合约大小(等同于网页端的Base-size"合约面值")。 |
| configBo | Json | 保证金档位 JSON 配置。 |
| -margins | BigDecimal | 保证金层级列表及相应所需存款。 |
| -simulatedMargins | BigDecimal | 模拟保证金(可以忽略)。 |
| closeSpread | BigDecimal | 平仓点差。 |
| partitionIds | String | 创新区 ID(可忽略)。 |
| commissionRate | BigDecimal | 佣金费率。 |
| depthPrecision | String | 深度聚合精度(可忽略)。 |
| id | Integer | 合约 ID。 |
| iconUrl | String | 合约图标 URL。 |
| createdDate | Long | 上线时间。 |
| settledPeriod | Integer | 结算周期。 |
请求示例
以下 Python 代码演示了如何获取 BTC 和 ETH 的交易品种信息。 注意:完整代码示例请参考 简介 > 认证和代码示例 > 合约交易 > RESTful公共接口。
api_url = "/v1/perpum/instrumentList"
params = {
"symbols": "BTC,ETH"
}
FuturesRestfulPublic(api_url, params) # function FuturesRestfulPublic() is defined in section (Introduction > Authentication & Code Snippet > Futures > RESTful Public Interface)
注意:完整Java代码示例请参考 简介 > 认证和代码示例 > 合约交易 > RESTful公共接口。
响应示例
以下是上述Python请求返回的示例响应:
{
"code": 0,
"data": [
{
"base": "btc",
"closeSpread": 0.0002,
"commissionRate": 0.0006,
"configBo": {
"margins": {
"100": 0.075,
"5": 0.00375,
"50": 0.0375,
"20": 0.015,
"10": 0.0075
},
"simulatedMargins": {
"5": 0.00375,
"20": 0.015,
"10": 0.0075
}
},
"createdDate": 1548950400000,
"defaultLeverage": 20,
"defaultStopLossRate": 0.99,
"defaultStopProfitRate": 100,
"depthPrecision": "0.1,1,10,100",
"iconUrl": "https://hkto-test.oss-accelerate.aliyuncs.com/811af5a9209c67c91346f313467438d10f0fc06a622a7e5e7291cf4a2cfaf17d.png",
"id": 1,
"indexId": 1,
"leverage": [
5,
10,
20,
50,
100,
125,
200
],
"makerFee": "0.0004",
"maxLeverage": 200,
"maxPosition": 200000,
"minLeverage": 1,
"minSize": 1,
"name": "BTC",
"oneLotMargin": 1,
"oneLotSize": 0.001,
"oneMaxPosition": 15000,
"openSpread": 0.0003,
"partitionIds": "2013,2011",
"pricePrecision": 1,
"quote": "usdt",
"selected": 0,
"settledAt": 1760086800000,
"settledPeriod": 1,
"settlementRate": 0.0004,
"sort": 1,
"status": "online",
"stopCrossPositionRate": 0.1,
"stopSurplusRate": 0.01,
"takerFee": "0.0006",
"updatedDate": 1760083873000
},
{
"base": "eth",
"closeSpread": 0.0003,
"commissionRate": 0.0006,
"configBo": {
"margins": {
"100": 0.075,
"5": 0.00375,
"50": 0.0375,
"20": 0.015,
"10": 0.0075
},
"simulatedMargins": {
"5": 0.00375,
"20": 0.015,
"10": 0.0075
}
},
"createdDate": 1553101108000,
"defaultLeverage": 200,
"defaultStopLossRate": 0.985,
"defaultStopProfitRate": 100,
"depthPrecision": "0.01,0.1,1,10",
"iconUrl": "https://hkto-prod.oss-accelerate.aliyuncs.com/201810011747047_OukYw.png",
"id": 2,
"indexId": 2,
"leverage": [
5,
10,
20,
50,
120,
200
],
"makerFee": "0.0004",
"maxLeverage": 200,
"maxPosition": 20000,
"minLeverage": 1,
"minSize": 1,
"name": "ETH",
"oneLotMargin": 1,
"oneLotSize": 0.01,
"oneMaxPosition": 20000,
"openSpread": 0.0003,
"partitionIds": "2013",
"pricePrecision": 2,
"quote": "usdt",
"selected": 0,
"settledAt": 1760112000000,
"settledPeriod": 8,
"settlementRate": 0.0004,
"sort": 2,
"status": "online",
"stopCrossPositionRate": 0.1,
"stopSurplusRate": 0.015,
"takerFee": "0.0006",
"updatedDate": 1760083873000
}
],
"msg": ""
}