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

# 获取财务日历

> 获取财报、股息、拆股、IPO 和宏观事件等财务日历事件。



## OpenAPI

````yaml /cn/api-reference/openapi.json get /api/market-data/calendar/finance
openapi: 3.1.0
info:
  title: Financial Context
  version: 1.0.0
  description: >-
    Financial Context 提供经过认证、按量计费的只读美股市场数据访问。可通过 `/api/market-data/*` 端点，针对
    `.US` 标的和 `US` 市场筛选条件访问行情、K 线、市场日历、基本面、新闻、选股器和相关分析。
servers:
  - url: https://openapi.fcontext.com
    description: 生产环境
security:
  - ApiKeyHeader: []
  - BearerAuth: []
tags:
  - name: 行情
    description: 行情、K 线、交易日、深度、经纪队列和其他市场数据端点。
  - name: 内容
    description: 证券内容：新闻和话题。
  - name: 市场
    description: 市场状态、交易日历、异常活动和排行。
  - name: 日历
    description: 财务事件日历。
  - name: 基本面
    description: 基本面、分析师评级、估值、股东和交易披露。
  - name: 选股器
    description: 选股策略、筛选条件和指标。
paths:
  /api/market-data/calendar/finance:
    get:
      tags:
        - 日历
      summary: 获取财务日历
      description: 获取财报、股息、拆股、IPO 和宏观事件等财务日历事件。
      parameters:
        - name: category
          in: query
          required: false
          description: 事件类型：`report`、`dividend`、`split`、`ipo` 或 `macrodata`；也接受数值 `0-7`。
          schema:
            type: string
            default: report
          example: report
        - name: start
          in: query
          required: false
          description: 开始日期 `YYYY-MM-DD`。省略时，默认使用结束日期前 3 天。
          schema:
            type: string
            format: date
        - name: end
          in: query
          required: false
          description: 结束日期 `YYYY-MM-DD`。省略时，默认使用当前日期。
          schema:
            type: string
            format: date
        - name: market
          in: query
          required: false
          description: 可选市场代码：仅支持 `US`。
          schema:
            type: string
          example: US
      responses:
        '200':
          description: 财务日历
          content:
            application/json:
              schema:
                type: object
                properties:
                  calendar:
                    $ref: '#/components/schemas/FinanceCalendar'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          description: 需要付费的 Financial Context 方案或剩余数据请求额度。
        '403':
          description: 该凭证无权访问 Financial Context 市场数据。
components:
  schemas:
    FinanceCalendar:
      type: object
      additionalProperties: true
      properties:
        date:
          type: string
        list:
          type: array
          items:
            type: object
            additionalProperties: true
            properties:
              date:
                type: string
              count:
                type: integer
              infos:
                type: array
                items:
                  type: object
                  additionalProperties: true
                  properties:
                    symbol:
                      type: string
                    market:
                      type: string
                    content:
                      type: string
                    counterName:
                      type: string
                    eventType:
                      type: string
                    datetime:
                      type: string
                    star:
                      type: integer
        nextDate:
          type: string
    Error:
      type: object
      description: 标准错误响应。
      additionalProperties: true
      properties:
        error:
          type: string
          description: 可读错误消息。
  responses:
    BadRequest:
      description: 请求参数无效。
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: 缺少或使用了无效的 Financial Context 凭证。
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: 'Unauthorized: missing API key'
  securitySchemes:
    ApiKeyHeader:
      type: apiKey
      in: header
      name: x-api-key
      description: '在账户设置中生成的 Financial Context key。请以 `x-api-key: <key>` 形式发送。'
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: OAuth access token
      description: >-
        面向具有 `market_data` scope 的 Financial Context CLI、MCP 或 agent 客户端的 OAuth
        bearer token。

````