> For the complete documentation index, see [llms.txt](https://docs-cn.multimarkets.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-cn.multimarkets.org/client-api/bao-jia-jie-kou/ding-yue-jie-kou/24-xiao-shi-gun-dong-bao-jia-ding-yue.md).

# 24小时滚动报价订阅

## 接口说明

该接口特性为对于每一个websocket连接，每发送一次该请求，后台会默认覆盖上一次订阅请求。订阅成功后会进行推送数据。

## 请求-协议号：14016

### 数据格式:json

### 数据结构

#### data定义

| 字段            | 名称   | 类型     | 必填项 | 说明                                                     |
| ------------- | ---- | ------ | --- | ------------------------------------------------------ |
| symbol\_list  | 产品列表 | array  | 是   | 具体格式见下面symbol定义                                        |
| update\_speed | 更新速度 | uint32 | 是   | 单位毫秒，如果该值小于后台的配置，则后台会按照自己配置的来推送，如果大于则按该值来推送（前提有变动才会推送） |

#### symbol定义

| 字段          | 名称   | 类型     | 必填项 | 说明                           |
| ----------- | ---- | ------ | --- | ---------------------------- |
| symbol\_id  | 产品ID | uint64 | 是   |                              |
| trade\_type | 交易类型 | uint32 | 是   | 1:全仓合约,2:逐仓合约,3:杠杆,5:现货,6:股票 |
| trade\_mode | 交易模式 | uint32 | 是   | 1:MM,2:蝴蝶MM,3:撮合,4:聚合        |

### 请求示例

```json
{
    "cmd_id":14016,
    "seq_id":123,
    "ext":"3baaa938-f92c-4a74-a228-fd49d5e2f8bc-1678419657806",
    "data":{
	"symbol_list": [
            {
		"symbol_id": 112312,
		"trade_type": 1,
                "trade_mode": 0,
            },
	],
        "update_speed": 1000,
    }
}
```

## 应答-协议号：14017

### 数据格式:json

### 数据结构

#### data定义

| 字段         | 名称       | 类型    | 说明            |
| ---------- | -------- | ----- | ------------- |
| tick\_list | tick快照数据 | array | 具体格式见下面tick定义 |

#### tick定义

| 字段                            | 名称             | 类型     | 说明                           |
| ----------------------------- | -------------- | ------ | ---------------------------- |
| symbol\_id                    | 产品ID           | uint64 |                              |
| trade\_type                   | 交易类型           | uint32 | 1:全仓合约,2:逐仓合约,3:杠杆,5:现货,6:股票 |
| trade\_mode                   | 交易模式           | uint32 | 1:MM,2:蝴蝶MM,3:撮合,4:聚合        |
| rolling\_last\_price          | 24小时里最后一口价     | string |                              |
| rolling\_first\_price         | 24小时里第一口价      | string |                              |
| rolling\_low\_price           | 24小时里最低价       | string |                              |
| rolling\_transactions\_number | 24小时成交量        | string |                              |
| rolling\_amount               | 24小时成交金额       | string |                              |
| rolling\_last\_tick\_time     | 24小时里最后一口价的时间戳 | uint64 | 单位毫秒                         |
| rolling\_last\_tick\_seq      | 24小时里最后一口价的序号  | uint64 |                              |

### 应答示例

```json
{
    "ret":200,
    "msg":"ok",
    "cmd_id":14017,
    "seq_id":123,
    "ext":"3baaa938-f92c-4a74-a228-fd49d5e2f8bc-1678419657806",
    "data":{
        "tick_list":[
            {
		"symbol_id": 123,
		"trade_type": 1,
                "trade_mode": 1,
                "rolling_last_price": "9.99",
		"rolling_first_price": "9.12",
                "rolling_high_price": "10.12",
                "rolling_low_price": "8.12",
                "rolling_transactions_number": "123.456",
                "rolling_amount": "1125.918", 
                "rolling_last_tick_time": 1668741120384, 
                "rolling_last_tick_seq": 123,
            },
        ]
    }
}
```

## 推送数据-实时成交报价推送

### 说明

请求者发送了24小时滚动报价订阅请求，后台服务才会对请求者推送该数据\
会按订阅请求里的更新速度字段定时进行推送

### 字段解释

pr(产品ID，报价交易类型，成交模式，24小时里最后一口价，24小时里第一口价，24小时里最高价，24小时里最低价，24小时成交量，24小时成交金额); "pr(symbol\_id,trade\_type,trade\_mode,rolling\_last\_price,rolling\_first\_price,rolling\_high\_price,rolling\_low\_price,rolling\_transactions\_number,rolling\_amount);" trade\_type的值含义 1:全仓合约,2:逐仓合约,3:杠杆,5:现货,6:股票 trade\_mode的值含义 1:MM,2:蝴蝶MM,3:撮合,4:聚合

### 推送数据示例

"pr(123,1,1,9.99,9.12,10.12,8.12,123.456,1125.918);pr(123,1,1,9.99,9.12,10.12,8.12,123.456,1125.918);"


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs-cn.multimarkets.org/client-api/bao-jia-jie-kou/ding-yue-jie-kou/24-xiao-shi-gun-dong-bao-jia-ding-yue.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
