TW Market Data LogoTW Market Data

核心資料

市場與價格

TWSE / TPEx 日線、還原價格、指數與市場廣度

財務與成長

月營收、財報三表、財務指標與估值資料

籌碼與資金

三大法人與融資融券資料

公司與結構

公司與事件

公司基本資料、公告、事件、公司行動與股利

分類與結構

主題分類、指數分類與跨資料集 mapping

策略與量化

Features、Factor Data、Time Alignment 與 Screener

平台能力

API 存取

REST API、認證與第一個 request

查詢與工具

Search API、Query API、欄位清單與查詢範例

Tools / MCP

Agent workflow、MCP tools 與 OpenAPI 入口

方案價格文件觀點文章
EN儀表板

TW Market Data(TWMD)提供之歷史資料與統計,非投資建議;投資決策與風險由您自行判斷。

隱私政策|服務條款|幫助中心||EN|TW Market Data © 2026

文件總覽

DASHBOARD

儀表板定價

FOR AI AGENTS

MCP Serverllms.txt工具清單OpenAPI SpecAgent 工作流範例
Webhooks建置中

OVERVIEW

總覽快速開始認證來源政策資料分級資料血緣市場覆蓋

DATA APIS

選股器公司基本資料股票主檔主題分類權證參考券商分點參考

GUIDES

如何取得財報三表如何查三大法人籌碼如何看市場狀態如何接策略・AI Agent

SDKS

Release StatusPython SDKJavaScript / TypeScript SDK

AI agent?先讀 /llms.txt 取得全站索引。

市場結構與參考

主題分類

主題分類——由 TWMD 維護的投資主題參考樹,及每個主題所歸類的產業/概念。

參考來源: TWMD·方案: free·計費: 1 點·GET /v2/datasets/theme-taxonomy

總覽

theme-taxonomy 為參考型資料集:每個主題節點一筆紀錄,描述 TWMD 用來歸類證券的分類樹。用於將主題代碼解析為名稱與上層節點,或列舉可供標記的主題。此為策展快照,非時間序列。

欄位型別說明
theme_idstring穩定主題識別碼。
theme_namestring主題顯示名稱。
parent_idstring上層主題代碼(根節點為 null)。
levelnumber分類樹層級深度。
source_rolestringtwmd_theme_taxonomy。

涵蓋範圍

列數2,160
涵蓋起訖2026-05-30(單日快照)
分級參考

範例回應

此為本端點的真實回應。資料列位於 "envelope.data" 之下,來源資訊如下方所示;各資料集形狀不盡相同,請以本頁為準。

{  "api_version": "v2",  "endpoint": "/v2/datasets/theme-taxonomy",  "request_id": "req_8e048197993f",  "plan_id": "enterprise",  "dataset": "theme_taxonomy",  "query": {    "symbol": "2330",    "theme": null,    "taxonomy_type": null,    "market": null,    "as_of_date": null,    "limit": 50,    "legacy_alias_ticker": null,    "legacy_alias_theme_primary": null  },  "meta": {    "rows_returned": 2,    "mandatory_contract_fields_present": [      "api_version",      "data",      "data_as_of"    ],    "plan": "enterprise",    "row_limit": 100000,    "is_limited": false  },  "envelope": {    "api_version": "v2",    "dataset": "theme_taxonomy",    "dataset_version": "v2.0.0-preview",    "release_version": "v2.2026-05-30.preview",    "release_date": "2026-05-30",    "data_as_of": "2026-05-30",    "request_context": {      "ticker": "2330",      "as_of_date": "2026-05-30",      "family": "discovery_reference",      "field_group_type": "derived",      "dataset_view": "theme_taxonomy_v1",      "supported_sort_by": [        "as_of_date"      ],      "supported_filter_fields": [        "symbol",        "theme",        "taxonomy_type"      ]    },    "data": [      {        "symbol": "2330",        "theme_id": "24",        "theme_name": "24",        "taxonomy_type": "industry",        "market": "TWSE",        "classification_level": "2",        "source_name": "tw_feature_engine",        "source_url": null,        "as_of_date": "2026-05-30",        "source_role": "derived_theme_taxonomy",        "lineage": {          "sources": [            "issuer_profiles",            "ticker_metadata"          ],          "theme_policy": "theme fields only from explicit issuer_classification_map entries; no AI inference",          "mapping_version": "theme_taxonomy_v1",          "taxonomy_version": "v1",          "subindustry_policy": "from issuer_classification_map taxonomy subindustry/sub_industry only"        },        "updated_at": "2026-06-19T05:46:08.775720"      },      {        "symbol": "2330",        "theme_id": "24",        "theme_name": "24",        "taxonomy_type": "sector",        "market": "TWSE",        "classification_level": "1",        "source_name": "tw_feature_engine",        "source_url": null,        "as_of_date": "2026-05-30",        "source_role": "derived_theme_taxonomy",        "lineage": {          "sources": [            "issuer_profiles",            "ticker_metadata"          ],          "theme_policy": "theme fields only from explicit issuer_classification_map entries; no AI inference",          "mapping_version": "theme_taxonomy_v1",          "taxonomy_version": "v1",          "subindustry_policy": "from issuer_classification_map taxonomy subindustry/sub_industry only"        },        "updated_at": "2026-06-19T05:46:08.775720"      }    ],    "quality": {      "freshness_state": "fresh",      "freshness_as_of": "2026-05-30",      "completeness_ratio": 1,      "quality_status": "ready"    },    "lineage": {      "source_role": "canonical",      "selected_source": "issuer_classification_map",      "fallback_chain": [        "issuer_profiles",        "ticker_metadata"      ],      "policy_notes": [        "official/public-first canonical",        "theme_taxonomy uses deterministic mapping only from explicit classification map entries",        "ai/confidence/cluster/rank fields excluded from public contract"      ]    },    "error": {      "error_code": null,      "error_message": null,      "dataset": "theme_taxonomy",      "request_id": "read-api-f235e586efe2",      "blocking_gate": null    }  }}

擷取自 2026-07-20 的線上 API。

快速開始

  1. 把你的金鑰放進 X-API-Key 標頭。
  2. 加上查詢參數(symbol、日期區間、limit)。
  3. 送出請求並讀取 envelope.data 陣列。
curl "https://api.twmarketdata.com/v2/datasets/theme-taxonomy?symbol=2330" \  -H "X-API-Key: sk_live_..."

篩選參數

參數必填型別說明
symbol否string以股票代碼篩選單一標的。
limit否integer回傳筆數上限。

Python 範例

第一個呼叫:

import requests resp = requests.get(    "https://api.twmarketdata.com/v2/datasets/theme-taxonomy",    params={"symbol": "2330"},    headers={"X-API-Key": "sk_live_..."},)resp.raise_for_status()print(resp.json()["envelope"]["data"])

帶日期區間篩選:

import requests # The full verified example — the same call with every supported filter set.resp = requests.get(    "https://api.twmarketdata.com/v2/datasets/theme-taxonomy",    params={"symbol": "2330"},    headers={"X-API-Key": "sk_live_..."},)resp.raise_for_status()for row in resp.json()["envelope"]["data"]:    print(row)

OpenAPI

此端點為 GET /v2/datasets/theme-taxonomy。完整機器可讀 schema(參數、認證、回應封裝)見 OpenAPI spec。

備註與限制

  • 僅策展現用快照/查表——非倖存者偏誤安全的時間序列;主題定義可能修訂,過去的分類樹版本不會被重建。

請求與回應

請求

curl "https://api.twmarketdata.com/v2/datasets/theme-taxonomy?symbol=2330&limit=5" \  -H "X-API-Key: $TWMD_API_KEY"

以 X-API-Key 標頭認證,使用儀表板發放的 sk_live_ 金鑰。

回應

JSON
{  "api_version": "v2",  "endpoint": "/v2/datasets/theme-taxonomy",  "request_id": "req_8e048197993f",  "plan_id": "enterprise",  "dataset": "theme_taxonomy",  "query": {    "symbol": "2330",    "theme": null,    "taxonomy_type": null,    "market": null,    "as_of_date": null,    "limit": 50,    "legacy_alias_ticker": null,    "legacy_alias_theme_primary": null  },  "meta": {    "rows_returned": 2,    "mandatory_contract_fields_present": [      "api_version",      "data",      "data_as_of"    ],    "plan": "enterprise",    "row_limit": 100000,    "is_limited": false  },  "envelope": {    "api_version": "v2",    "dataset": "theme_taxonomy",    "dataset_version": "v2.0.0-preview",    "release_version": "v2.2026-05-30.preview",    "release_date": "2026-05-30",    "data_as_of": "2026-05-30",    "request_context": {      "ticker": "2330",      "as_of_date": "2026-05-30",      "family": "discovery_reference",      "field_group_type": "derived",      "dataset_view": "theme_taxonomy_v1",      "supported_sort_by": [        "as_of_date"      ],      "supported_filter_fields": [        "symbol",        "theme",        "taxonomy_type"      ]    },    "data": [      {        "symbol": "2330",        "theme_id": "24",        "theme_name": "24",        "taxonomy_type": "industry",        "market": "TWSE",        "classification_level": "2",        "source_name": "tw_feature_engine",        "source_url": null,        "as_of_date": "2026-05-30",        "source_role": "derived_theme_taxonomy",        "lineage": {          "sources": [            "issuer_profiles",            "ticker_metadata"          ],          "theme_policy": "theme fields only from explicit issuer_classification_map entries; no AI inference",          "mapping_version": "theme_taxonomy_v1",          "taxonomy_version": "v1",          "subindustry_policy": "from issuer_classification_map taxonomy subindustry/sub_industry only"        },        "updated_at": "2026-06-19T05:46:08.775720"      },      {        "symbol": "2330",        "theme_id": "24",        "theme_name": "24",        "taxonomy_type": "sector",        "market": "TWSE",        "classification_level": "1",        "source_name": "tw_feature_engine",        "source_url": null,        "as_of_date": "2026-05-30",        "source_role": "derived_theme_taxonomy",        "lineage": {          "sources": [            "issuer_profiles",            "ticker_metadata"          ],          "theme_policy": "theme fields only from explicit issuer_classification_map entries; no AI inference",          "mapping_version": "theme_taxonomy_v1",          "taxonomy_version": "v1",          "subindustry_policy": "from issuer_classification_map taxonomy subindustry/sub_industry only"        },        "updated_at": "2026-06-19T05:46:08.775720"      }    ],    "quality": {      "freshness_state": "fresh",      "freshness_as_of": "2026-05-30",      "completeness_ratio": 1,      "quality_status": "ready"    },    "lineage": {      "source_role": "canonical",      "selected_source": "issuer_classification_map",      "fallback_chain": [        "issuer_profiles",        "ticker_metadata"      ],      "policy_notes": [        "official/public-first canonical",        "theme_taxonomy uses deterministic mapping only from explicit classification map entries",        "ai/confidence/cluster/rank fields excluded from public contract"      ]    },    "error": {      "error_code": null,      "error_message": null,      "dataset": "theme_taxonomy",      "request_id": "read-api-f235e586efe2",      "blocking_gate": null    }  }}

擷取自對此端點的真實呼叫,非手寫。

此資料集的資料列在 "envelope.data" 之下。各資料集的信封不同,請以本頁為準,勿沿用其他頁的形狀。

本頁的分級徽章屬文件分級,並非回應欄位。