AI agent?先讀 /llms.txt 取得全站索引。
市場與價格
指數分類——將每個指數代碼對映到所屬家族與類別(大盤、類股、主題)的參考查表。
GET /v2/datasets/index-classification指數分類是台灣市場資料集,來源為 TWSE,由 TW Market Data 以 GET /v2/datasets/index-classification 提供。
index-classification 為參考型資料集:每個指數一筆紀錄,描述其在 TWSE 指數體系中的位置。用於將指數代碼解析為名稱與類別,或列舉某家族下的指數。此為查表快照,非水準時間序列。
| 欄位 | 型別 | 說明 |
|---|---|---|
index_code | string | 指數代碼。 |
market | string | |
as_of_date | string | |
index_name | string | 指數顯示名稱。 |
index_type | string | |
sector | null | |
industry | null | |
parent_index_code | null | |
is_sector_index | boolean | |
is_broad_market_index | boolean | |
theme_primary | null | |
theme_secondary | null |
| 列數 | 5 |
| 涵蓋起訖 | 2026-05-22 – 2026-05-28 |
| 分級 | 參考 |
| 量測時間 | 2026-09-01取自資料集登錄表 |
此為本端點的真實回應。資料列位於 "envelope.data" 之下,來源資訊如下方所示;各資料集形狀不盡相同,請以本頁為準。
{
"api_version": "v2",
"endpoint": "/v2/datasets/index-classification",
"request_id": "req_90acb32ace38",
"plan_id": "enterprise",
"dataset": "index_classification",
"query": {
"index_code": null,
"market": "TWSE",
"index_type": null,
"sector": null,
"industry": null,
"limit": 50,
"offset": 0,
"sort_by": "as_of_date",
"sort_order": "desc"
},
"meta": {
"rows_returned": 5,
"mandatory_contract_fields_present": [
"api_version",
"data",
"data_as_of"
],
"plan": "enterprise",
"row_limit": 100000,
"is_limited": false
},
"envelope": {
"api_version": "v2",
"dataset": "index_classification",
"dataset_version": "v2.0.0-preview",
"release_version": "v2.2026-05-28.preview",
"release_date": "2026-05-28",
"data_as_of": "2026-05-28",
"request_context": {
"ticker": null,
"as_of_date": "2026-05-28",
"family": "market_structure_corporate_actions",
"field_group_type": "derived",
"dataset_view": "index_classification_v1",
"supported_sort_by": [
"as_of_date",
"index_code"
],
"supported_filter_fields": [
"index_code",
"market",
"index_type"
]
},
"data": [
{
"index_code": "TWSE_TAIEX",
"market": "TWSE",
"as_of_date": "2026-05-28",
"classification_version": "v1",
"index_name": "TWSE Capitalization Weighted Stock Index",
"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": "official_twse_mi_index",
"lineage": {
"source_key": {
"market": "TWSE",
"as_of_date": "2026-05-28",
"index_code": "TWSE_TAIEX"
},
"mapping_rule": "deterministic index_code mapping v1 only",
"upstream_lineage": {
"source": "TWSE_MI_INDEX",
"source_date": "2026-05-28",
"source_type": "ALLBUT0999",
"special_note": null,
"identity_rule": "exact_index_name_match",
"source_lineage": {
"row_number": 1,
"table_index": 0,
"table_title": "115年05月28日 價格指數(臺灣證券交易所)"
},
"source_table_id": "table_0",
"turnover_lineage": {
"stat_item": "1.一般股票",
"row_number": 0,
"table_index": 6,
"table_title": "115年05月28日 大盤統計資訊"
}
},
"classification_version": "v1",
"excluded_fields_reason": "ai/theme confidence/ranking/regime fields excluded by deterministic policy"
},
"updated_at": "2026-06-17T05:21:52.769338"
},
{
"index_code": "TWSE_TAIEX",
"market": "TWSE",
"as_of_date": "2026-05-27",
"classification_version": "v1",
"index_name": "TWSE Capitalization Weighted Stock Index",
"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": "official_twse_mi_index",
"lineage": {
"source_key": {
"market": "TWSE",
"as_of_date": "2026-05-27",
"index_code": "TWSE_TAIEX"
},
"mapping_rule": "deterministic index_code mapping v1 only",
"upstream_lineage": {
"source": "TWSE_MI_INDEX",
"source_date": "2026-05-27",
"source_type": "ALLBUT0999",
"special_note": null,
"identity_rule": "exact_index_name_match",
"source_lineage": {
"row_number": 1,
"table_index": 0,
"table_title": "115年05月27日 價格指數(臺灣證券交易所)"
},
"source_table_id": "table_0",
"turnover_lineage": {
"stat_item": "1.一般股票",
"row_number": 0,
"table_index": 6,
"table_title": "115年05月27日 大盤統計資訊"
}
},
"classification_version": "v1",
"excluded_fields_reason": "ai/theme confidence/ranking/regime fields excluded by deterministic policy"
},
"updated_at": "2026-06-17T05:21:52.769338"
}
],
"quality": {
"freshness_state": "fresh",
"freshness_as_of": "2026-05-28",
"completeness_ratio": 1,
"quality_status": "ready"
},
"lineage": {
"source_role": "canonical",
"selected_source": "index_classification",
"fallback_chain": [],
"policy_notes": [
"official/public-first canonical",
"index classification facts mapped deterministically from canonical index/classification sources",
"ai/rank/regime fields excluded from public contract"
]
},
"error": {
"error_code": null,
"error_message": null,
"dataset": "index_classification",
"request_id": "read-api-66158c9b9f87",
"blocking_gate": null
}
}
}擷取自 2026-07-20 的線上 API。
本頁顯示原始中文值;英文頁會以標記取代,以維持全英文。
以下欄位會隨資料一併回傳,記錄這一列的來源。它們屬於出處而非本資料集要講的事實,因此列在這裡而不進欄位表。
classification_versionclassification_sourceprovidersource_rolelineageupdated_at本服務部分資料取自政府資料開放平臺(data.gov.tw),依「政府資料開放授權條款-第1版」授權利用。資料提供機關:臺灣證券交易所、證券櫃檯買賣中心、臺灣期貨交易所、臺灣集中保管結算所、國家發展委員會、中央銀行、經濟部統計處、財政部關務署。本服務之加值處理、衍生計算與呈現方式由 TWMD 負責,與各資料提供機關無涉。
TW Market Data. (n.d.). 指數分類 [Data set]. TW Market Data. Retrieved 2026-09-05, from https://twmarketdata.com/zh-TW/docs/api/market-prices/index-classification
版本取自資料集自己的 as_of,不是這一頁的產生日期。沒有 as_of 的資料集就不列這個欄位,不會補一個看起來合理的值。 驗證簽章
可與本資料集對齊的其他資料集。每組都標出可用來 join 的欄位,規劃跨表查詢時不必自己猜。
curl "https://api.twmarketdata.com/v2/datasets/index-classification?market=TWSE" \
-H "X-API-Key: sk_live_..."| 參數 | 必填 | 型別 | 說明 |
|---|---|---|---|
index_code | 否 | string | 由端點自身在 envelope.request_context.supported_filter_fields 宣告。 |
market | 否 | string | 由端點自身在 envelope.request_context.supported_filter_fields 宣告。 |
index_type | 否 | string | 由端點自身在 envelope.request_context.supported_filter_fields 宣告。 |
import requests
resp = requests.get(
"https://api.twmarketdata.com/v2/datasets/index-classification",
params={"market": "TWSE"},
headers={"X-API-Key": "sk_live_..."},
)
resp.raise_for_status()
print(resp.json()["envelope"]["data"])此端點為 GET /v2/datasets/index-classification。完整機器可讀 schema(參數、認證、回應封裝)見 OpenAPI spec。