Building an AI agent? Start with /llms.txt for the full site index.
Market Structure & Reference
Company peer groups
Company peer groups
GET /v2/datasets/company-peer-groupsCompany peer groups is a Taiwan market dataset sourced from TWMD, served by TW Market Data as GET /v2/datasets/company-peer-groups.
Overview
Company peer groups — the backend metadata exposes no grain, so none is stated here.
| Field | Type | Description |
|---|---|---|
peer_group_id | string | |
peer_group_name | string | |
peer_group_type | string | |
ticker | string | |
company_name | string | |
market | string | |
exchange | string | |
industry | string | |
sub_industry | null | |
theme | null | |
confidence_score | number | |
evidence_tier | string |
Example response
A real response from this endpoint. Rows are returned under "data", and provenance is carried in the shape shown below — it is not identical across datasets, so read this page's rather than assuming another's.
{ "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": "<Chinese value - see the zh page>", "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 }}Captured from the live API on 2026-07-20.
Chinese data values are shown as a marker here so this page stays in English; the /zh page shows them verbatim.
Provenance
These columns are returned alongside the data and record where the row came from. They are provenance, not the dataset's subject matter, so they are listed here rather than in the field table.
source_namesource_urlpeer_group_versionGetting started
- Put your key in the X-API-Key header.
- Add query parameters (symbol, date range, limit).
- Send the request and read the data array.
curl "https://api.twmarketdata.com/v2/datasets/company-peer-groups?symbol=2330" \ -H "X-API-Key: sk_live_..."Filtering
| Parameter | Required | Type | Description |
|---|---|---|---|
symbol | No | string | Ticker to filter to a single security. |
limit | No | integer | Maximum rows to return. |
Python
A first call:
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"])With a date-range filter:
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
This endpoint is GET /v2/datasets/company-peer-groups. The full machine-readable schema (parameters, security, response envelope) lives in the OpenAPI spec.
Notes & limitations
- Peer groups are a derived entity-attribute snapshot of the present: no date column, so it cannot be replayed to a past date. Membership changes as classifications are revised — do not assume a historical peer group matched today's.