分類與結構
提供 deterministic 指數分類欄位,適合市場結構分析與指數維度整理。
/v2/datasets/index-classification指數分類 API 提供指數層級的分類事實欄位(type/sector/industry/theme flags),適合做市場分類視角分析與索引維度整理。
此 endpoint 對應 `index_classification` live route,不是 AI 分群或動態評分模型。
至少需要提供一個 filter(index_code、market、index_type、sector、industry 任一),未提供時會回傳 `missing_required_filter`。
| 欄位 | 型別 | Required | 說明 |
|---|---|---|---|
| index_code | string | no | 指數代碼。 |
| market | string | no | 市場代碼。 |
| index_type | string | no | 指數類型(如 broad_market / sector)。 |
| sector | string | no | 產業分類條件。 |
| industry | string | no | 產業細分類條件。 |
| limit | integer | no | 回傳筆數限制(1..1000)。 |
| offset | integer | no | 分頁偏移。 |
| sort_by | string | no | 排序欄位:as_of_date 或 index_code。 |
| sort_order | string | no | 排序方向:asc 或 desc。 |
回應採 canonical envelope,頂層包含 query/meta,實際分類資料位於 envelope.data。
contract 僅包含 deterministic 分類欄位,不包含信心分數與動態 ranking。
{
"api_version": "v2",
"endpoint": "/v2/datasets/index-classification",
"request_id": "req_idxcls_9f8e7d6c",
"plan_id": "developer",
"dataset": "index_classification",
"query": {
"index_code": "TWSE_TAIEX",
"market": null,
"index_type": null,
"sector": null,
"industry": null,
"limit": 20,
"offset": 0,
"sort_by": "as_of_date",
"sort_order": "desc"
},
"meta": {
"rows_returned": 1
},
"envelope": {
"dataset": "index_classification",
"ticker": "TWSE_TAIEX",
"as_of_date": "2026-04-22",
"data": [
{
"index_code": "TWSE_TAIEX",
"market": "TWSE",
"as_of_date": "2026-04-22",
"classification_version": "v1",
"index_name": "發行量加權股價指數",
"index_type": "broad_market",
"sector": null,
"industry": null,
"parent_index_code": null,
"is_sector_index": false,
"is_broad_market_index": true,
"theme_primary": null,
"theme_secondary": null,
"classification_source": "index_code_mapping_v1",
"provider": "twse_official",
"source_role": "canonical"
}
]
}
}| 欄位路徑 | 型別 | 說明 |
|---|---|---|
| dataset | string | 固定為 index_classification。 |
| meta.rows_returned | integer | 回傳筆數。 |
| envelope.data[].index_code | string | 指數代碼。 |
| envelope.data[].market | string | 市場代碼。 |
| envelope.data[].as_of_date | string | 資料日期。 |
| envelope.data[].index_name | string|null | 指數名稱。 |
| envelope.data[].index_type | string|null | 指數類型。 |
| envelope.data[].is_broad_market_index | boolean|null | 是否為大盤型指數。 |
| envelope.data[].is_sector_index | boolean|null | 是否為產業型指數。 |
| envelope.data[].theme_primary | string|null | 主題主分類。 |
| envelope.data[].classification_source | string|null | 分類映射來源。 |
| envelope.data[].source_role | string|null | 來源角色。 |