指数接口更适合作为市场概览、看板、策略基准和技术面分析的数据源。结构上和股票数据保持一致,因此可以复用相同的客户端模式。
指数目录
GET
/api/v1/indicesList indices
listIndices
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
| market | query | MarketId | 否 | — |
| code | query | string | 否 | — |
| name | query | string | 否 | — |
| page[size] | query | integer (default 100) | 否 | — |
| 状态码 | 说明 | Schema |
|---|---|---|
| 200 | Index collection | InstrumentCollectionResponse |
| 400 | Invalid request parameters | ErrorResponse |
| 401 | Unauthorized | ErrorResponse |
GET
/api/v1/indices/{instrument_id}Get one index
getIndex
| 状态码 | 说明 | Schema |
|---|---|---|
| 200 | Index resource | InstrumentResponse |
| 401 | Unauthorized | ErrorResponse |
| 404 | Resource not found | ErrorResponse |
指数行情
GET
/api/v1/indices/{instrument_id}/quotesList index quotes
listIndexQuotes
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
| instrument_id | path | string | 是 | — |
| from | query | string (date-time) | 否 | — |
| to | query | string (date-time) | 否 | — |
| date | query | string (date) | 否 | — |
| page[size] | query | integer (default 100) | 否 | — |
| 状态码 | 说明 | Schema |
|---|---|---|
| 200 | Quote collection | QuoteCollectionResponse |
| 400 | Invalid request parameters | ErrorResponse |
| 401 | Unauthorized | ErrorResponse |
GET
/api/v1/indices/{instrument_id}/barsList index bars
listIndexBars
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
| instrument_id | path | string | 是 | — |
| interval | query | IntervalId | 是 | — |
| adjustment | query | AdjustmentId | 否 | — |
| from | query | string (date-time) | 否 | — |
| to | query | string (date-time) | 否 | — |
| date | query | string (date) | 否 | — |
| page[size] | query | integer (default 100) | 否 | — |
| 状态码 | 说明 | Schema |
|---|---|---|
| 200 | Bar collection | BarCollectionResponse |
| 400 | Invalid request parameters | ErrorResponse |
| 401 | Unauthorized | ErrorResponse |
技术指标
GET
/api/v1/indices/{instrument_id}/technical-indicators/{indicator}List index technical indicators
listIndexTechnicalIndicators
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
| instrument_id | path | string | 是 | — |
| indicator | path | IndicatorId | 是 | — |
| interval | query | IntervalId | 是 | — |
| adjustment | query | AdjustmentId | 否 | — |
| from | query | string (date-time) | 否 | — |
| to | query | string (date-time) | 否 | — |
| date | query | string (date) | 否 | — |
| page[size] | query | integer (default 100) | 否 | — |
| 状态码 | 说明 | Schema |
|---|---|---|
| 200 | Technical indicator collection | TechnicalIndicatorCollectionResponse |
| 400 | Invalid request parameters | ErrorResponse |
| 401 | Unauthorized | ErrorResponse |
TechnicalIndicatorCollectionResponse
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
| data | Array<TechnicalIndicatorPoint> | 是 | — |
| data[].instrument_id | string | 是 | — |
| data[].indicator | IndicatorId | 是 | — |
| data[].interval | IntervalId | 是 | — |
| data[].adjustment | AdjustmentId | 是 | — |
| data[].timestamp | string (date-time) | 是 | — |
| data[].values | object | 是 | — |
| data[].values.* | string | 是 | — |
| meta | Meta | 是 | — |
| meta.next_cursor | string | null | 是 | — |
| links | SelfLinks | 是 | — |
| links.self | string | 是 | — |
拉取指数技术指标bash
curl "https://heliumlabz.com/api/v1/indices/000300.SH/technical-indicators/rsi?interval=1d&from=2026-01-01&to=2026-03-01" \
-H "X-API-Key: $ASHARE_API_KEY"