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

# 股票筛选器

> 股票筛选器



## OpenAPI

````yaml openapi/zh/openapi-financial.json POST /financials/search/screener
openapi: 3.0.1
info:
  title: Financial Datasets API
  description: 股票市场 API，提供超过 30 年、涵盖 30,000 多个股票代码的实时和历史金融数据，包括财务报表、股票价格、内部人士交易、SEC 申报文件等。
  version: 1.0.0
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  contact:
    name: API Support
    url: https://financialdatasets.ai/support
    email: support@financialdatasets.ai
  termsOfService: https://financialdatasets.ai/terms
servers:
  - url: https://api.aisa.one/apis/v1/financial
    description: Production server
security:
  - bearerAuth: []
tags:
  - name: Financial Statements
    description: Access to income statements, balance sheets, and cash flow statements
  - name: Market Data
    description: Real-time and historical price data
  - name: Company Information
    description: Company facts like ticker, name, and description
  - name: Earnings
    description: Earnings press releases and related data
  - name: Crypto
    description: Cryptocurrency price data and market information
  - name: News
    description: Real-time and historical news articles
  - name: SEC Filings
    description: SEC filings and regulatory documents
  - name: Insider Trades
    description: Insider trading activity and transactions
  - name: Institutional Ownership
    description: Equity holdings of investment managers
  - name: Financial Metrics
    description: Financial ratios, metrics, and key performance indicators
paths:
  /financials/search/screener:
    post:
      tags:
        - Financials
        - Search
      summary: 搜索财务报表
      description: 通过筛选损益表、资产负债表和现金流量表中的财务指标来搜索股票。
      operationId: stockScreener
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SearchFiltersRequest'
      responses:
        '200':
          description: 搜索成功响应
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FinancialsScreenerResponse'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '402':
          $ref: '#/components/responses/PaymentRequiredError'
        '404':
          $ref: '#/components/responses/NotFoundError'
      security:
        - bearerAuth: []
components:
  schemas:
    SearchFiltersRequest:
      type: object
      required:
        - filters
      properties:
        period:
          type: string
          enum:
            - annual
            - quarterly
            - ttm
          default: ttm
          description: 财务数据的时间段。
        limit:
          type: integer
          minimum: 1
          maximum: 100
          default: 100
          description: 要返回的最大结果数量。
        order_by:
          type: string
          enum:
            - ticker
            - '-ticker'
            - report_period
            - '-report_period'
          default: ticker
          description: 用于对结果排序的字段。使用 -field 按降序排列。
        currency:
          type: string
          enum:
            - USD
            - EUR
            - GBP
            - JPY
            - CHF
            - AUD
            - CAD
            - SEK
          description: 财务数据的货币。
        historical:
          type: boolean
          default: false
          description: 是否返回历史财务数据。
        filters:
          type: array
          items:
            type: object
            required:
              - field
              - operator
              - value
            properties:
              field:
                type: string
                description: >-
                  筛选条件。对于财务指标字段，请使用 'gt'、'lt'、'gte'、'lte'、'eq' 运算符。对于 'ticker' 和
                  'cik' 字段，请使用 'in' 运算符筛选多个值。
              operator:
                type: string
                enum:
                  - gt
                  - lt
                  - gte
                  - lte
                  - eq
                  - in
                description: 比较运算符。'in' 运算符只能用于字段值为 'ticker' 或 'cik' 的情况，并允许根据多个值进行筛选。
              value:
                oneOf:
                  - type: number
                    description: 单值运算符（gt、lt、gte、lte、eq）的比较值
                  - type: array
                    items:
                      type: string
                    description: 使用 'in' 运算符时用于比较的 ticker 或 cik 值数组
          minItems: 1
          description: 应用于搜索的筛选器对象数组。
    FinancialsScreenerResponse:
      type: object
      properties:
        results:
          type: array
          items:
            type: object
            properties:
              ticker:
                type: string
                description: 公司的股票代码。
              report_period:
                type: string
                format: date
                description: 财务数据的报告期。
              period:
                type: string
                enum:
                  - annual
                  - quarterly
                  - ttm
                description: 财务数据的时间周期。
              currency:
                type: string
                description: 财务数据的货币。
            additionalProperties:
              type: string
              description: 基于搜索条件的其他财务指标。
          description: 符合请求的筛选条件的股票。
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: 简短的错误消息。
        message:
          type: string
          description: 更详细的错误消息。
  responses:
    BadRequestError:
      description: 错误请求
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Bad Request
            message: Invalid request parameters
    UnauthorizedError:
      description: 未授权
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Unauthorized
            message: Invalid API key provided
    PaymentRequiredError:
      description: 该请求需要付费订阅
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Payment Required
            message: >-
              This endpoint requires a paid subscription. Please upgrade your
              plan.
    NotFoundError:
      description: 未找到指定的资源
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Not Found
            message: Ticker XXXX not found
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````