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

市場結構與參考

同業對照組

同業對照組

參考來源: TWMD·方案: free·計費: 1 ·GET /v2/datasets/company-peer-groups

同業對照組是台灣市場資料集,來源為 TWMD,由 TW Market Data 以 GET /v2/datasets/company-peer-groups 提供。

總覽

同業對照組——後端 meta 未提供 grain,故此處不述。

欄位型別說明
peer_group_idstring
peer_group_namestring
peer_group_typestring
tickerstring
company_namestring
marketstring
exchangestring
industrystring
sub_industrynull
themenull
confidence_scorenumber
evidence_tierstring

範例回應

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

{  "dataset_id": "company_peer_groups",  "request_context": {    "scope": "tw_listed_company_peer_groups",    "coverage_type": "current_state_reference",    "filters": {      "ticker": "5236",      "market": null,      "industry": null,      "limit": 50    }  },  "quality": {    "row_count": 1,    "ticker_count": 1,    "rows_exceed_tickers": false,    "sensitive_fields_exposed": false  },  "lineage": {    "sources": [      "twse_t187ap03_L"    ],    "versions": [      "company_peer_group_official_industry_market_v1"    ],    "semantics": "Which peer groups each listed company belongs to, with the group's type and theme. A CURRENT-STATE reference surface: refreshes bump peer_group_version. Membership is a grouping judgement, not an official classification."  },  "error": null,  "data": [    {      "peer_group_id": "official_industry_market_group:twse:24",      "peer_group_name": "TWSE official industry 24",      "peer_group_type": "official_industry_market_group",      "ticker": "5236",      "company_name": "凌陽創新科技股份有限公司",      "market": "TWSE",      "exchange": "listed",      "industry": "24",      "sub_industry": null,      "theme": null,      "confidence_score": 1,      "evidence_tier": "official-source-backed",      "source_name": "twse_t187ap03_L",      "source_url": "https://openapi.twse.com.tw/v1/opendata/t187ap03_L",      "peer_group_version": "company_peer_group_official_industry_market_v1"    }  ],  "data_count": 1,  "known_gaps": [    "peer_membership_is_a_grouping_judgement_not_an_official_classification",    "a_company_may_belong_to_several_groups_so_ticker_is_not_unique_in_this_surface",    "current_state_snapshot_not_a_time_series_there_is_no_history_to_range_over"  ],  "warnings": [    "not_investment_advice"  ],  "envelope": {    "dataset_id": "company_peer_groups",    "scope": "tw_listed_company_peer_groups",    "row_count": 1  }}

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

本頁顯示原始中文值;英文頁會以標記取代,以維持全英文。

出處

以下欄位會隨資料一併回傳,記錄這一列的來源。它們屬於出處而非本資料集要講的事實,因此列在這裡而不進欄位表。

source_namesource_urlpeer_group_version

快速開始

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

篩選參數

參數必填型別說明
symbolstring以股票代碼篩選單一標的。
limitinteger回傳筆數上限。

Python 範例

第一個呼叫:

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

帶日期區間篩選:

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

OpenAPI

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

備註與限制

  • 同業組是推導出的『實體屬性』現況快照,整表沒有日期欄,無法回放到過去某日。成分會隨分類調整而變,回測請勿假設歷史同業組與今日相同。