获取合约列表
获取合约列表信息
(鉴权类型:NONE, 参见接口权限)
请求格式
GET https://api-cloud.bitmart.com/contract/v1/ifcontract/contracts
请求限制
参见 速率限制详细
请求参数
参数 | 类型 | 是否必须 | 描述 |
---|---|---|---|
contractID | long | 否 | 合约 ID, 如果合约 ID 参数为空或为 0,标识获取所有合约 |
exchange | string | 是 | 固定为 bitmart |
请求示例
curl https://api-cloud.bitmart.com/contract/v1/ifcontract/contracts?exchange=bitmart
响应详情
字段 | 类型 | 描述 |
---|---|---|
contract_id | long | 合约 ID |
index_id | int | 指数 ID |
name | string | 合约名称 |
display_name | string | 合约中文显示名称 |
display_name_en | string | 合约英文显示名称 |
contract_type | int | 合约类型,永续还是期货 1:永续,2:期货 |
base_coin | string | 基础币 |
quote_coin | string | 计价币 |
price_coin | string | 合约大小的单位币 |
contract_size | decimal | 合约大小,表示一张合约值多少个基础币 |
delivery_cycle | int | 交割周期 单位秒 |
min_leverage | decimal | 合约支持的最小杠杆 |
max_leverage | decimal | 合约支持的最大杠杆 |
price_unit | decimal | 价格精度 |
vol_unit | decimal | 量精度 |
value_unit | decimal | 价值精度 |
min_vol | decimal | 合约支持的最小交易量 |
max_vol | decimal | 合约支持的最大交易量 |
liquidation_warn_ratio | decimal | 平仓预警系数 |
fast_liquidation_ratio | decimal | 快速平仓系数 |
settle_type | int | 结算类型 1 :自动,2 :手动 |
open_type | int | 开仓类型,1 :全仓,2 :逐仓,3 :都支持 |
status | int | 状态 |
1 审批中,系统内部使用 |
||
2 测试中,系统内部使用 |
||
3 可用,正在撮合的合约 |
||
4 暂停,合约可见,但是撮合暂停了 |
||
5 交割中,期货合约到期后,暂停撮合,开始结算 |
||
6 交割完成,结算完成 |
||
7 下线,合约已经下线,合约的生命周期结束 |
||
compensate_type | int | 穿仓补偿方式 1 :ADL 方式,2 :盈利均摊方式 |
created_at | time | 创建时间 |
base_limit | decimal | 风险限额基础 |
step | decimal | 步长 |
maintenance_margin | decimal | 基本维持保证金率 |
initial_margin | decimal | 基本开仓保证金率 |
maker_fee | decimal | makefee 系数 |
taker_fee | decimal | takefee 系数 |
settlement_fee | decimal | 交割手续费率,到期合约才有 |
long_funding | decimal | 多仓资金费率,掉期合约才有 |
short_funding | decimal | 空仓资金费率,掉期合约才有 |
funding_interval | int64 | 资金费率时间段,掉期合约才有,单位秒 |
created_at | string | 创建时间 |
解释说明
返回合约列表数组
返回数据格式示例
{
"code": 1000,
"trace":"886fb6ae-456b-4654-b4e0-d681ac05cea1",
"message": "OK",
"data": {
"contracts": [
{
"contract": {
"contract_id": 1,
"index_id": 1,
"name": "BTCUSDT",
"display_name": "BTCUSDT永续合约",
"display_name_en": "BTCUSDT_SWAP",
"contract_type": 1,
"base_coin": "USDT",
"quote_coin": "BTC",
"price_coin": "USDT",
"contract_size": "1",
"delivery_cycle": 0,
"min_leverage": "1",
"max_leverage": "100",
"price_unit": "0.01",
"vol_unit": "1",
"min_vol": "1",
"value_unit": "0.01",
"max_vol": "100000",
"liquidation_warn_ratio": "0.85",
"fast_liquidation_ratio": "0.3",
"settle_type": 1,
"open_type": 3,
"status": 3,
"compensate_type": 1,
"created_at": "2018-07-12T19:16:57Z"
},
"risk_limit": {
"contract_id": 1,
"base_limit": "10",
"step": "5",
"initial_margin": "0.1"
},
"fee_config": {
"contract_id": 1,
"maker_fee": "0.00025",
"taker_fee": "0.00075",
"settlement_fee": "0",
"long_funding": "0.03",
"short_funding": "0.06",
"funding_interval": 28800,
"created_at": "2018-07-12T20:47:22Z"
}
}
]
}
}