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

# 获取标的元数据

> 根据标的代码获取元数据（名称、交易所、类型、上市日期等）。支持逗号分隔传入多个标的。



## OpenAPI

````yaml /zh-Hans/api-reference/openapi.json get /v1/instruments
openapi: 3.1.0
info:
  contact:
    email: support@tickflow.org
  description: 提供中国A股、美股、港股的实时和历史行情数据接口
  title: MarketData API
  version: 1.0.0
servers:
  - url: https://api.alphafeed.org
security:
  - ApiKeyHeader: []
  - ApiKeyQuery: []
tags:
  - description: 历史K线（OHLCV）数据
    name: K线数据
  - description: 实时报价和市场深度
    name: 实时行情
  - description: 日内分钟级别数据
    name: 日内分时
  - description: 标的元数据
    name: 基础信息
paths:
  /v1/instruments:
    get:
      tags:
        - 基础信息
      summary: 获取标的元数据
      description: 根据标的代码获取元数据（名称、交易所、类型、上市日期等）。支持逗号分隔传入多个标的。
      operationId: getInstruments
      parameters:
        - description: 标的代码，逗号分隔（如 `600000.SH,000001.SZ,AAPL.US`）
          example: 600000.SH,000001.SZ
          in: query
          name: symbols
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InstrumentsResponse'
          description: 标的数据
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    InstrumentsResponse:
      properties:
        data:
          items:
            $ref: '#/components/schemas/Instrument'
          type: array
      required:
        - data
      type: object
    Instrument:
      description: 标的元数据
      properties:
        code:
          description: 标的纯数字/字母代码
          example: '600519'
          type: string
        exchange:
          description: 交易所代码（SH/SZ/HK/US等）
          example: SH
          type: string
        ext:
          $ref: '#/components/schemas/InstrumentExt'
        name:
          description: 标的名称
          example: 贵州茅台
          type: string
        region:
          description: 市场地区
          enum:
            - CN
            - US
            - HK
          type: string
        symbol:
          description: 标的代码
          example: 600519.SH
          type: string
        type:
          description: 标的类型
          enum:
            - stock
            - etf
            - index
            - bond
            - fund
            - futures
            - options
            - other
          type: string
      required:
        - symbol
        - exchange
        - code
        - name
        - region
        - type
      type: object
    ErrorResponse:
      description: 错误响应
      properties:
        code:
          description: HTTP 状态码
          type: integer
        message:
          description: 错误描述
          type: string
      required:
        - code
        - message
      type: object
    InstrumentExt:
      description: 标的扩展信息（因市场/类型而异）
      properties:
        float_shares:
          description: 流通股本
          type: number
        limit_down:
          description: 跌停价（A股）
          type: number
        limit_up:
          description: 涨停价（A股）
          type: number
        listing_date:
          description: 上市日期（YYYY-MM-DD）
          format: date
          type: string
        tick_size:
          description: 最小变动价位
          type: number
        total_shares:
          description: 总股本
          type: number
        type:
          description: 具体类型（如 cn_equity, us_stock）
          type: string
      type: object
  responses:
    Unauthorized:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
      description: API Key 无效或缺失
  securitySchemes:
    ApiKeyHeader:
      description: 在请求头 X-API-Key 中传递 API Key
      in: header
      name: X-API-Key
      type: apiKey
    ApiKeyQuery:
      description: 在 URL 查询参数 api_key 中传递 API Key
      in: query
      name: api_key
      type: apiKey

````