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

# POST /batch-kline 调试模块

> POST /batch-kline 调试模块

## POST /batch-kline 调试模块

<Card title="返回接口说明" href="/apis/apis/zh/api-reference/stock/batch-kline" />

<script src="/apis/seo-keywords.js" />


## OpenAPI

````yaml apis/api-reference/openapi-zh.json POST /quote-stock-b-api/batch-kline
openapi: 3.1.0
info:
  title: AllTick 行情数据 API
  description: 股票、外汇、加密货币和商品的实时及历史行情数据API。
  version: 1.0.0
servers:
  - url: https://quote.alltick.co
    description: Production
security: []
paths:
  /quote-stock-b-api/batch-kline:
    post:
      summary: Stock Batch K-Line Query
      description: >-
        Batch query latest 2 K-lines for multiple stock products. Supports
        querying multiple products and K-line types simultaneously.
      operationId: postStockBatchKline
      parameters:
        - name: token
          in: query
          required: true
          description: 您的API认证Token
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchKlineRequest'
            example:
              trace: abc-123
              data:
                data_list:
                  - code: 700.HK
                    kline_type: 1
                    kline_timestamp_end: 0
                    query_kline_num: 2
                    adjust_type: 0
                  - code: AAPL.US
                    kline_type: 8
                    kline_timestamp_end: 0
                    query_kline_num: 2
                    adjust_type: 0
      responses:
        '200':
          description: 成功响应
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchKlineResponse'
components:
  schemas:
    BatchKlineRequest:
      type: object
      required:
        - trace
        - data
      properties:
        trace:
          type: string
          description: 唯一追踪ID，用于请求追踪
        data:
          type: object
          required:
            - data_list
          properties:
            data_list:
              type: array
              items:
                type: object
                required:
                  - code
                  - kline_type
                  - kline_timestamp_end
                  - query_kline_num
                  - adjust_type
                properties:
                  code:
                    type: string
                    description: 产品代码
                  kline_type:
                    type: integer
                    description: >-
                      K线类型（1=1分钟, 2=5分钟, 3=15分钟, 4=30分钟, 5=小时, 6=2小时, 7=4小时,
                      8=日K, 9=周K, 10=月K）
                  kline_timestamp_end:
                    type: integer
                    description: 结束时间戳（0 = 最新）
                  query_kline_num:
                    type: integer
                    description: 查询K线数量（批量最大2根）
                  adjust_type:
                    type: integer
                    description: 复权类型（0=除权, 1=前复权）
    BatchKlineResponse:
      type: object
      properties:
        ret:
          type: integer
        msg:
          type: string
        trace:
          type: string
        data:
          type: object
          properties:
            kline_list:
              type: array
              items:
                type: object
                properties:
                  code:
                    type: string
                  kline_type:
                    type: integer
                  kline_data:
                    type: array
                    items:
                      type: object
                      properties:
                        timestamp:
                          type: string
                        open_price:
                          type: string
                        close_price:
                          type: string
                        high_price:
                          type: string
                        low_price:
                          type: string
                        volume:
                          type: string
                        turnover:
                          type: string

````