> ## 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.

# GET /kline 调试模块

> GET /kline 调试模块

## GET /kline 调试模块

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

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


## OpenAPI

````yaml apis/api-reference/openapi-zh.json GET /quote-stock-b-api/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/kline:
    get:
      summary: Stock K-Line Query
      description: >-
        Query historical K-line (candlestick) data for a single stock product
        (US stocks, HK stocks, A-shares). Returns OHLCV data. Max 500 K-lines
        per request.
      operationId: getStockKline
      parameters:
        - name: token
          in: query
          required: true
          description: 您的API认证Token
          schema:
            type: string
            default: YOUR_TOKEN_HERE
          example: YOUR_TOKEN_HERE
        - name: query
          in: query
          required: true
          description: URL编码的JSON字符串，包含trace和data字段。
          schema:
            type: string
            default: >-
              {"trace":"abc-123","data":{"code":"700.HK","kline_type":1,"kline_timestamp_end":0,"query_kline_num":2,"adjust_type":0}}
          example: >-
            {"trace":"abc-123","data":{"code":"700.HK","kline_type":1,"kline_timestamp_end":0,"query_kline_num":2,"adjust_type":0}}
      responses:
        '200':
          description: 成功响应
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KlineResponse'
components:
  schemas:
    KlineResponse:
      type: object
      properties:
        ret:
          type: integer
          description: 返回码（200 = 成功）
        msg:
          type: string
          description: 响应消息
        trace:
          type: string
          description: 请求追踪ID
        data:
          type: object
          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_list:
              type: array
              items:
                type: object
                properties:
                  timestamp:
                    type: string
                    description: K线时间戳
                  open_price:
                    type: string
                    description: 开盘价
                  close_price:
                    type: string
                    description: 收盘价
                  high_price:
                    type: string
                    description: 最高价
                  low_price:
                    type: string
                    description: 最低价
                  volume:
                    type: string
                    description: 成交量
                  turnover:
                    type: string
                    description: 成交额

````