> ## 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 股、港股、美股） | ✅ |
| 企业版 | ✅ |

## 注意事项

* `amount` 是每股现金分红金额的十进制字符串；非现金分派时可能为 `null`。分页游标位于响应外层 `page`。

## 支持的市场

| 市场 | 示例 |
| - | - |
| 美股 | AAPL.US |
| 港股 | 700.HK |
| A股 | 600519.SH |

## 请求参数

| 参数 | 是否必须 | 说明 |
| - | :-: | - |
| `symbol` | 是 | 股票代码 |
| `type` | 否 | 产品类型，当前支持 `stock` |
| `dividend_type` | 否 | `normal`、`special`、`non_cash`、`unknown` |
| `from` | 否 | 起始日期，格式 `YYYY-MM-DD` |
| `to` | 否 | 结束日期，格式 `YYYY-MM-DD` |
| `limit` | 否 | 单页数量，默认 100，范围 `1–500` |
| `cursor` | 否 | 下一页游标 |

## 请求示例

```bash theme={null}
curl -H "X-API-Key: YOUR_API_KEY" \
  "https://api.tickdb.ai/v1/fundamentals/dividends?symbol=AAPL&type=stock&limit=100"
```

## 返回字段说明

以下列出 `data` 及分页字段；外层 `code=0` 表示成功。

| 字段 | 说明 |
| - | - |
| symbol | 股票代码。 |
| events | 符合筛选条件的分红记录列表。 |
| └─ event\_id | 事件 ID。 |
| └─ type | 分红类别。 |
| └─ distribution\_kind | 分派形式。 |
| └─ amount | 每股现金金额；非现金分派时可能为 null。 |
| └─ stock\_distribution\_ratio | 每股送股或转增比例；例如 `0.7` 表示每 1 股送转 0.7 股，即每 10 股送转 7 股。 |
| └─ currency | 币种。 |
| └─ declaration\_date | 公告日，格式 `YYYY-MM-DD`；可能为 `null`。 |
| └─ record\_date | 股权登记日，格式 `YYYY-MM-DD`；可能为 `null`。 |
| └─ ex\_date | 除权除息日，格式 `YYYY-MM-DD`；可能为 `null`。 |
| └─ payment\_date | 支付日，格式 `YYYY-MM-DD`；可能为 `null`。 |
| └─ description | 事件说明。 |
| └─ detail\_level | 详情级别。 |
| page | 响应外层的分页信息。 |
| └─ next\_cursor | 下一页游标；末页为空。 |
| └─ limit | 当前分页上限。 |

每条记录包含分红类型、每股金额、币种及相关日期；未来日期不代表分红已经完成。


## OpenAPI

````yaml openapi.yaml GET /v1/fundamentals/dividends
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/fundamentals/dividends:
    get:
      tags:
        - fundamentals-capital-actions
      summary: 分红记录
      description: 查询股票的分红记录，包括历史及已知的未来分红事件，支持日期、类型和分页筛选。
      operationId: getFundamentalsDividends
      parameters:
        - $ref: '#/components/parameters/SymbolQuery'
        - $ref: '#/components/parameters/TypeQuery'
        - $ref: '#/components/parameters/DividendTypeQuery'
        - $ref: '#/components/parameters/FromQuery'
        - $ref: '#/components/parameters/ToQuery'
        - $ref: '#/components/parameters/DividendLimitQuery'
        - $ref: '#/components/parameters/CursorQuery'
      responses:
        '200':
          $ref: '#/components/responses/DividendsResponse'
        default:
          $ref: '#/components/responses/ErrorResponse'
components:
  parameters:
    SymbolQuery:
      name: symbol
      in: query
      required: true
      schema:
        type: string
        examples:
          - AAPL
          - '700'
          - '600519'
          - AAPL.US
          - 700.HK
          - 600519.SH
      description: 股票代码
    TypeQuery:
      name: type
      in: query
      required: false
      schema:
        type: string
        enum:
          - stock
      description: 产品类型，当前支持 `stock`
    DividendTypeQuery:
      name: dividend_type
      in: query
      required: false
      schema:
        type: string
        enum:
          - normal
          - special
          - non_cash
          - unknown
      description: 分红类型：`normal`、`special`、`non_cash`、`unknown`。
    FromQuery:
      name: from
      in: query
      required: false
      schema:
        type: string
        format: date
        examples:
          - '2024-01-01T00:00:00.000Z'
      description: 起始日期，格式 `YYYY-MM-DD`
    ToQuery:
      name: to
      in: query
      required: false
      schema:
        type: string
        format: date
        examples:
          - '2026-12-31T00:00:00.000Z'
      description: 结束日期，格式 `YYYY-MM-DD`
    DividendLimitQuery:
      name: limit
      in: query
      required: false
      schema:
        type: integer
        minimum: 1
        maximum: 500
        default: 100
      description: 单页数量，默认 100，范围 `1–500`
    CursorQuery:
      name: cursor
      in: query
      required: false
      schema:
        type: string
        minLength: 1
      description: 下一页游标；第一页不传
  responses:
    DividendsResponse:
      description: 分红记录响应。
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DividendsEnvelope'
    ErrorResponse:
      description: >-
        错误响应。常见 HTTP 状态包括
        400（参数错误）、401（鉴权失败）、403（权限或配额限制）、404（无匹配数据）、429（请求频率限制）和 503（服务暂不可用）。
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          examples:
            missingAPIKey:
              summary: 缺少 API Key
              value:
                code: '1002'
                message: API key is required. Provide via X-API-Key header
                error: '1002'
            missingKind:
              summary: 缺少必填参数
              value:
                code: 40001
                message: kind is required
                data: null
            endpointForbidden:
              summary: API Key 无权访问该接口
              value:
                code: 3009
                message: This endpoint is not allowed for your API key
                data: null
            marketForbidden:
              summary: API Key 未开放该市场
              value:
                code: 3010
                message: Fundamentals market not allowed for your API key
                data:
                  market: US
            noAvailableSource:
              summary: 数据暂不可用
              value:
                code: 5003
                message: Data is temporarily unavailable
                data: null
            notFound:
              summary: 无匹配数据
              value:
                code: 40404
                message: shareholder detail not found
                data: null
            businessNoData:
              summary: 查询条件无有效业务数据
              value:
                code: 40405
                message: valuation time series not found
                data: null
  schemas:
    DividendsEnvelope:
      allOf:
        - $ref: '#/components/schemas/SuccessEnvelope'
        - type: object
          required:
            - page
          properties:
            data:
              $ref: '#/components/schemas/DividendData'
            page:
              $ref: '#/components/schemas/PageInfo'
    ErrorEnvelope:
      type: object
      required:
        - code
        - message
      properties:
        code:
          description: TickDB API 业务错误码；可能为整数或字符串，客户端应归一化为字符串后比较。
          oneOf:
            - type: integer
            - type: string
        message:
          type: string
          description: 错误说明。
        error:
          type: string
          description: 兼容错误标识；仅部分错误响应返回。
        data:
          description: 可选的错误上下文；可能为 null、对象或数组。
          oneOf:
            - type: 'null'
            - type: object
              additionalProperties: true
            - type: array
              items: {}
    SuccessEnvelope:
      type: object
      required:
        - code
        - data
      properties:
        code:
          type: integer
          const: 0
          description: 业务状态码，成功为 0。
    DividendData:
      type: object
      required:
        - symbol
        - events
      properties:
        symbol:
          type: string
          description: 标准化股票代码。
        events:
          type: array
          description: 符合筛选条件的分红记录列表，可能包含已知的未来事件。
          items:
            $ref: '#/components/schemas/DividendEvent'
      additionalProperties: true
    PageInfo:
      type: object
      required:
        - next_cursor
        - limit
      properties:
        next_cursor:
          type:
            - string
            - 'null'
          description: 下一页游标；非空时原样作为下一次请求的 cursor 参数，末页为 null。
        limit:
          type: integer
          minimum: 1
          description: 当前分页上限。
      additionalProperties: true
    DividendEvent:
      type: object
      required:
        - event_id
        - type
        - distribution_kind
        - description
        - amount
        - stock_distribution_ratio
        - currency
        - declaration_date
        - record_date
        - ex_date
        - payment_date
        - detail_level
      properties:
        event_id:
          type: string
          description: 事件 ID。
        type:
          type: string
          enum:
            - normal
            - special
            - non_cash
            - unknown
          description: 对外分红分类。
        distribution_kind:
          type: string
          enum:
            - cash
            - stock
            - other_non_cash
            - unknown
          description: 分派形式。
        description:
          type:
            - string
            - 'null'
          description: 事件说明。
        amount:
          type:
            - string
            - 'null'
          description: 每股现金金额的十进制字符串；纯非现金事件为 null。
        stock_distribution_ratio:
          type:
            - string
            - 'null'
          description: 每股送股或转增比例；例如 0.7 表示每 1 股送转 0.7 股（每 10 股送转 7 股）。
        currency:
          type:
            - string
            - 'null'
          description: 币种。
        declaration_date:
          type:
            - string
            - 'null'
          format: date
          description: 公告日。
        record_date:
          type:
            - string
            - 'null'
          format: date
          description: 股权登记日。
        ex_date:
          type:
            - string
            - 'null'
          format: date
          description: 除权除息日。
        payment_date:
          type:
            - string
            - 'null'
          format: date
          description: 派息日。
        detail_level:
          type: string
          enum:
            - summary
            - detail
          description: 详情级别。
      additionalProperties: true
  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.