获取单个 ticker
订阅
{
"method": "sub.ticker",
"param": {
"symbol": "BTC_USDT"
}
}
取消订阅
{
"method": "unsub.ticker",
"param": {
"symbol": "BTC_USDT"
}
}
数据示例
{
"channel": "push.ticker",
"data": {
"ask1": 6866.5,
"bid1": 6865,
"contractId": 1,
"fairPrice": 6867.4,
"fundingRate": 0.0008,
"high24Price": 7223.5,
"indexPrice": 6861.6,
"lastPrice": 6865.5,
"lower24Price": 6756,
"maxBidPrice": 7073.42,
"minAskPrice": 6661.37,
"riseFallRate": -0.0424,
"riseFallValue": -304.5,
"symbol": "BTC_USDT",
"timestamp": 1587442022003,
"holdVol": 2284742,
"volume24": 164586129
},
"symbol": "BTC_USDT"
}
获取某个合约的最新成交价、买一价、卖一价和 24 交易量,无需用户登录,有成交数据就推送,订阅后 1 秒发送一次。
响应参数:
| 参数名 | 类型 | 说明 |
|---|---|---|
| symbol | string | 合约名 |
| timestamp | long | 成交时间 |
| lastPrice | decimal | 最新价 |
| bid1 | decimal | 买一价 |
| ask1 | decimal | 卖一价 |
| holdVol | decimal | 总持仓量 |
| fundingRate | decimal | 资金费率 |
| riseFallRate | decimal | 涨跌幅 |
| riseFallValue | decimal | 涨跌额 |
| volume24 | decimal | 24 小时成交量,按张数统计 |
| amount24 | decimal | 24 小时成交额,按金额统计 |
| fairPrice | decimal | 合理价 |
| indexPrice | decimal | 指数价 |
| maxBidPrice | decimal | 最大买入价格 |
| minAskPrice | decimal | 最低卖出价格 |
| lower24Price | decimal | 24 小时最低价 |
| high24Price | decimal | 24 小时最高价 |