> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tickdb.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 当日分时

> 获取股票当日的分时数据，包括每分钟的价格、成交量、成交额等信息。

## 套餐权限

| 套餐 | 可用 |
| - | :-: |
| 免费版 | ✅ |
| 基础版 | ✅ |
| 专业版 | ✅ |
| 全量套餐（A 股、港股、美股） | ✅ |
| 企业版 | ✅ |

## 注意事项

* 数据为当日开盘至当前时间的分时数据
* 非交易时段以实际可用数据为准，可能返回已有分时数据，也可能返回空数组。

## 支持的市场

| 市场 | 示例 |
| - | - |
| 美股 | AAPL.US, TSLA.US, MSFT.US |
| 港股 | 700.HK, 9988.HK, 3690.HK |
| A股 | 600519.SH, 000001.SZ |

## 请求参数

| 参数名 | 是否必须 | 描述 |
| - | - | - |
| symbols | 是 | 股票代码，多个用逗号分隔，最多50个 |
| type | 否 | 产品类型，可选。代码无歧义时无需传递；若返回 `AMBIGUOUS_SYMBOL` 错误，按提示传入对应值即可。可选值：`stock`、`indices`、`crypto`、`forex` |

## 返回字段说明

| 字段名 | 描述 |
| - | - |
| symbol | 交易产品 |
| type | 产品类型，当前为 `stock` |
| lines | 分时数据 |
| └─ timestamp | 当前分钟的开始时间，Unix 时间戳，单位为毫秒 |
| └─ price | 当前分钟的收盘价格 |
| └─ volume | 成交量 |
| └─ turnover | 成交额 |
| └─ avg\_price | 均价 |


## OpenAPI

````yaml openapi.yaml GET /v1/market/intraday
openapi: 3.1.0
info:
  title: TickDB API
  description: TickDB 统一实时行情数据 API，提供 REST 和 WebSocket 接入。
  version: 1.0.3
  contact:
    email: support@tickdb.ai
servers:
  - url: https://api.tickdb.ai
    description: 生产环境
security:
  - ApiKeyAuth: []
paths:
  /v1/market/intraday:
    get:
      summary: 当日分时
      description: 获取股票当日的分时数据，包括每分钟的价格、成交量、成交额等信息。
      parameters:
        - name: symbols
          in: query
          required: true
          description: 股票代码，多个用逗号分隔，最多50个
          schema:
            type: string
            default: 700.HK,9988.HK
            example: 700.HK,9988.HK
        - name: type
          in: query
          required: false
          description: >-
            产品类型，可选。代码无歧义时无需传递；若返回 `AMBIGUOUS_SYMBOL`
            错误，按提示传入对应值即可。可选值：`stock`、`indices`、`crypto`、`forex`
          schema:
            type: string
            enum:
              - stock
              - indices
              - crypto
              - forex
            example: stock
      responses:
        '200':
          description: 请求成功。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    example: 0
                  message:
                    type: string
                    example: success
                  data:
                    type: array
                    items:
                      type: object
                      required:
                        - symbol
                        - type
                        - lines
                      additionalProperties: false
                      properties:
                        symbol:
                          type: string
                          example: 700.HK
                        type:
                          type: string
                          enum:
                            - stock
                          example: stock
                        lines:
                          type: array
                          items:
                            type: object
                            required:
                              - timestamp
                              - price
                              - volume
                              - turnover
                              - avg_price
                            additionalProperties: false
                            properties:
                              timestamp:
                                type: integer
                                example: 1773192600000
                                description: 当前分钟的开始时间，Unix 时间戳，单位为毫秒
                              price:
                                type: string
                                example: '568'
                                description: 当前分钟的收盘价格
                              volume:
                                type: integer
                                example: 7294905
                                description: 成交量
                              turnover:
                                type: string
                                example: '4181560679.96'
                                description: 成交额
                              avg_price:
                                type: string
                                example: '573.216605'
                                description: 均价
              examples:
                single_symbol:
                  summary: 单个产品响应
                  value:
                    code: 0
                    message: success
                    data:
                      - symbol: 700.HK
                        type: stock
                        lines:
                          - timestamp: 1773192600000
                            price: '568'
                            volume: 7294905
                            turnover: '4181560679.96'
                            avg_price: '573.216605'
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.