获取合约最新行情
获取合约最新行情
(鉴权类型:NONE, 参见接口权限)
请求格式
GET https://api-cloud.bitmart.com/contract/v1/ifcontract/tickers
请求限制
参见 速率限制详细
请求参数
参数 | 类型 | 是否必须 | 描述 |
---|---|---|---|
contractID | long | 否 | 合约 ID, 如果合约 ID 参数为空, 标识获取所有合约 |
解释说明
如果合约ID不存在,tickers会返回空。
请求示例
curl https://api-cloud.bitmart.com/contract/v1/ifcontract/tickers?contractID=1
响应详情
字段 | 类型 | 描述 |
---|---|---|
last_price | string | 最后成交价 |
open | string | 当天的开盘价 |
close | string | 当前的收盘价 |
low | string | 当天的最低价 |
high | string | 当天的最高加 |
avg_price | string | 均价 |
volume | string | 最后一笔交易量,单位张数,如果要显示 btc 交易量,需要 volume 乘以合约的大小 |
total_volume | string | 24 小时总量,单位张数 |
base_coin_volume | string | 基础币的交易量(币值对前面的币为基础币) |
quote_coin_volume | string | 计价币的交易量(币值对后面的币为计价币) |
timestamp | long | 时间戳 |
rise_fall_rate | string | 涨幅比例 |
rise_fall_value | string | 涨幅值 |
contract_id | long | 合约 id |
position_size | string | 未平仓位量 |
volume_day | string | 当天交易量 |
amount24 | string | 24 小时交易额 |
index_price | string | 指数价格 |
fair_basis | string | 基差率 |
fair_value | string | 基差 |
fair_price | string | 标记价 |
quote_rate | string | 计价币借贷利率 |
base_rate | string | 基础币借贷利率 |
interest_rate | string | 利率 |
premium_index | string | 溢价指数 |
funding_rate | string | 当前资金费率 |
next_funding_rate | string | 下一个预计资金费率 |
next_funding_at | string | 下一个结算时间(UTC 时间) |
解释说明
返回合约列表数组
返回数据格式示例
{
"code": 1000,
"trace":"886fb6ae-456b-4654-b4e0-d681ac05cea1",
"message": "OK",
"data": {
"tickers": [
{
"last_price": "6277.5",
"open": "6074.5",
"close": "6277.5",
"low": "6261.3",
"high": "6279",
"avg_price": "6274.67",
"volume": "20000",
"total_volume": "45462",
"base_coin_volume": "163.9",
"quote_coin_volume": "34555.38199999999999998882",
"timestamp": 1534315695,
"rise_fall_rate": "0.033",
"rise_fall_value": "203",
"contract_id": 1,
"position_size": "374266",
"volume_day": "45270",
"amount24": "28520.77363",
"index_price": "6406.53",
"fair_basis": "0.000000690",
"fair_value": "0.00442673",
"fair_price": "6406.5344267",
"rate": {
"quote_rate": "0.0003",
"base_rate": "0.0006",
"interest_rate": "-0.00009999"
},
"premium_index": "-0.0309530479798782534",
"funding_rate": "0.0001",
"next_funding_rate": "-0.0304530",
"next_funding_at": "2018-08-15T08:00:01Z"
}
]
}
}