EN

API 文档

市场与分类

从市场枚举、交易日到行业分类,先建立基础字典和过滤维度,再进入具体证券查询。

打开 llm.txt

如果你正在构建筛选器、市场选择器、日期校验或分类面板,这一组接口应该最先接入。它们提供的是后续所有查询都会依赖的基础字典。

市场基础信息

GET/api/v1/markets

List supported markets

listMarkets

该接口未定义请求参数。

状态码说明Schema
200Market collectionMarketCollectionResponse
401UnauthorizedErrorResponse

MarketCollectionResponse

字段类型必填说明
dataArray<Market>
data[].idMarketId
data[].namestring
metaMeta
meta.next_cursorstring | null
linksSelfLinks
links.selfstring
GET/api/v1/markets/{market}

Get one market

getMarket

状态码说明Schema
200Market resourceMarketResponse
401UnauthorizedErrorResponse
404Resource not foundErrorResponse

交易日历

GET/api/v1/markets/{market}/trading-days

List trading days for one market

listTradingDays

名称位置类型必填说明
marketpathMarketId
fromquerystring (date)
toquerystring (date)
page[size]queryinteger (default 100)
状态码说明Schema
200Trading day collectionTradingDayCollectionResponse
400Invalid request parametersErrorResponse
401UnauthorizedErrorResponse
404Resource not foundErrorResponse

TradingDayCollectionResponse

字段类型必填说明
dataArray<TradingDay>
data[].marketMarketId
data[].datestring (date)
metaMeta
meta.next_cursorstring | null
linksSelfLinks
links.selfstring

这类接口适合:

  • 回测或数据下载前先校验日期是否合法
  • 前端日历组件只展示交易日
  • 避免在节假日或停市日上做无意义请求

行业与板块分类

GET/api/v1/classifications/sectors

List sector classifications

listSectors

状态码说明Schema
200Sector collectionClassificationCollectionResponse
401UnauthorizedErrorResponse
GET/api/v1/classifications/primary-industries

List primary industries

listPrimaryIndustries

状态码说明Schema
200Primary industry collectionClassificationCollectionResponse
401UnauthorizedErrorResponse

ClassificationCollectionResponse

字段类型必填说明
dataArray<Classification>
data[].idstring
data[].namestring
data[].typestring
metaMeta
meta.next_cursorstring | null
linksSelfLinks
links.selfstring
按行业初始化过滤器bash
curl https://heliumlabz.com/api/v1/classifications/sectors \
-H "X-API-Key: $ASHARE_API_KEY"