批量获取标的池详情
OpenAPI
/zh-Hans/api-reference/openapi.json post /v1/universes/batch
openapi: 3.1.0
info:
title: TickFlow 行情数据 API
description: |-
高性能行情数据服务,支持 A股、ETF、美股、港股。
## 认证方式
所有接口需要通过 `x-api-key` 请求头传递 API Key 进行认证。
## 速率限制
根据 API Key 配置的权限,可能会有请求频率和配额限制。
## 批量查询
部分接口同时支持 GET 和 POST 方法:
- **GET**: 通过 URL 参数传递,适合少量数据
- **POST**: 通过 JSON Body 传递,适合大批量查询,不受 URL 长度限制
## K线周期
支持的周期:1m, 5m, 10m, 15m, 30m, 60m, 1d, 1w, 1M, 1Q, 1Y
- 日内周期(5m/15m/30m/60m)从1m数据聚合
- 周线(1w)/月线(1M)/季线(1Q)/年线(1Y)从日线聚合
- intraday 接口当前为 Beta 版本
contact:
name: TickFlow Team
license:
name: ''
version: 1.0.0
servers:
- url: https://api.tickflow.org
security:
- api_key: []
paths:
/v1/universes/batch:
post:
tags:
- 标的池
summary: 批量获取标的池详情
operationId: batch_universes
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UniverseBatchRequest'
required: true
responses:
'200':
description: 查询成功
content:
application/json:
schema:
$ref: '#/components/schemas/UniverseBatchResponse'
'400':
description: 参数错误
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
'401':
description: 认证失败
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
security:
- api_key: []
components:
schemas:
UniverseBatchRequest:
type: object
description: 批量获取标的池详情请求体
required:
- ids
properties:
ids:
type: array
items:
type: string
description: 标的池 ID 列表
example:
- CN_Equity_A
- CN_ETF
UniverseBatchResponse:
type: object
description: 批量获取标的池详情响应
required:
- data
properties:
data:
type: object
description: 以有效的标的池 ID 为 key,UniverseDetail 为 value
additionalProperties:
$ref: '#/components/schemas/UniverseDetail'
propertyNames:
type: string
ApiError:
type: object
description: API 错误响应体
required:
- code
- message
properties:
code:
type: string
description: 错误代码 (如 "INVALID_PERIOD", "SYMBOL_NOT_FOUND")
example: INVALID_PERIOD
details:
description: 详细信息 (可选,用于调试)
message:
type: string
description: 错误消息 (人类可读)
example: 'Invalid period: 2d'
UniverseDetail:
allOf:
- $ref: '#/components/schemas/UniverseSummary'
description: 基本信息
- type: object
required:
- symbols
properties:
symbols:
type: array
items:
type: string
description: 标的列表
description: 标的池详情(包含标的列表)
UniverseSummary:
type: object
description: 标的池摘要(用于列表展示)
required:
- id
- name
- region
- category
- symbol_count
properties:
category:
type: string
description: 分类
description:
type:
- string
- 'null'
description: 描述
id:
type: string
description: 唯一标识符
name:
type: string
description: 显示名称
region:
type: string
description: 地区代码
symbol_count:
type: integer
description: 标的数量
minimum: 0
securitySchemes:
api_key:
type: apiKey
in: header
name: x-api-key