> 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/cha-xun-jie-kou/fen-shi-tu-huo-qu.md).

# 分时图获取

## 接口说明

## 请求-协议号：14004

### 数据格式:json

### 数据结构

#### data定义

| 字段           | 名称   | 类型     | 必填项 | 说明                           |
| ------------ | ---- | ------ | --- | ---------------------------- |
| symbol\_id   | 产品ID | uint64 | 是   |                              |
| trade\_type  | 交易类型 | uint32 | 是   | 1:全仓合约,2:逐仓合约,3:杠杆,5:现货,6:股票 |
| trade\_mode  | 交易模式 | uint32 | 是   | 1:MM,2:蝴蝶MM,3:撮合,4:聚合        |
| start\_index | 起步索引 | uint32 | 是   | 0表示从当前行情日（目前只支持它为0）          |

### 请求示例

```json
{
    "cmd_id":14004,
    "seq_id":123,
    "ext":"3baaa938-f92c-4a74-a228-fd49d5e2f8bc-1678419657806",
    "data":{
        "symbol_id": 1,
	"trade_type": 1,
        "trade_mode": 0,
        "start_index": 0,
    }
}
```

## 应答-协议号：14005

### 数据格式:json

### 数据结构

#### data定义

| 字段                    | 名称              | 类型     | 说明                           |
| --------------------- | --------------- | ------ | ---------------------------- |
| symbol\_id            | 产品ID            | uint64 |                              |
| trade\_type           | 交易类型            | uint32 | 1:全仓合约,2:逐仓合约,3:杠杆,5:现货,6:股票 |
| trade\_mode           | 交易模式            | uint32 | 1:MM,2:蝴蝶MM,3:撮合,4:聚合        |
| price\_digits         | 价格小数位           | uint32 |                              |
| kline\_list           | K线列表            | array  | 具体格式见下面kline\_list定义         |
| quote\_time\_start    | 行情开始时间戳         | uint64 | 单位秒                          |
| quote\_time\_end      | 行情结束时间戳         | uint64 | 单位秒                          |
| quote\_minitue\_count | 该行情日下一共有多少个行情分钟 | uint32 |                              |

#### kline\_list定义

| 字段           | 名称      | 类型     | 说明        |
| ------------ | ------- | ------ | --------- |
| close\_price | 该K线收盘价  | string |           |
| timestamp    | 该K线的时间戳 | uint64 | 单位秒，精确到分钟 |

### 应答示例

```json
{
    "ret":200,
    "msg":"ok",
    "cmd_id":14005,
    "seq_id":123,
    "ext":"3baaa938-f92c-4a74-a228-fd49d5e2f8bc-1678419657806",
    "data":{
	"symbol_id": 1123,
	"trade_type": 1,
        "trade_mode": 0,
	"price_digits": 2,
        "kline_list":[
            {
                "close_price": "623.12",
		"timestamp": 1605509068000001,
            },
        ],
	"quote_time_start": 1605509068000001,
	"quote_time_end": 1605509068000001,
	"quote_minitue_count": 240,
    }    
}
```
