AI agent?先讀 /llms.txt 取得全站索引。
公司與事件
上市櫃公司行動——股利、增資、分割等結構性事件,跨 TWSE/TPEx/MOPS 正規化為單一資料流。
GET /v2/datasets/corporate-actions公司行動是台灣市場資料集,來源為 TWSE / TPEx / MOPS,由 TW Market Data 以 GET /v2/datasets/corporate-actions 提供。
corporate-actions 每筆公司行動回傳一列,附正規化行動類型與關鍵日期(基準日、除權息日、生效日),整合自官方 TWSE/TPEx/MOPS 公告。每列附來源角色與 lineage,任一行動可回溯到上游原始揭露,而非僅憑信任。
| 欄位 | 型別 | 說明 |
|---|---|---|
ticker | string | |
action_type | string | 正規化行動類型(如 cash_dividend、capital_increase、split)。 |
effective_date | string | |
announcement_date | null | |
record_date | null | 股東基準日。 |
ex_date | string | 除權(息)日。 |
cash_dividend | null | |
stock_dividend | null | |
capital_reduction_ratio | null | |
source_id | string | |
quality_flag | string | |
market | string | |
split_ratio | null | |
rights_ratio | null | |
rights_price | null | |
par_value_ratio | null | |
par_value_from | null | |
par_value_to | null |
| 列數 | 約 18,720 |
| 涵蓋起訖 | 2003-06-02 – 2026-09-07 |
| 分級 | 參考 |
| 量測時間 | 2026-09-04取自資料集登錄表 |
此為本端點的真實回應。資料列位於 "envelope.data" 之下,來源資訊如下方所示;各資料集形狀不盡相同,請以本頁為準。
{
"api_version": "v2",
"endpoint": "/v2/datasets/corporate-actions",
"request_id": "req_55b6cbfee53b",
"plan_id": "enterprise",
"dataset": "corporate_actions",
"query": {
"ticker": "00929",
"action_type": null,
"date_from": null,
"date_to": "2026-08-06",
"limit": 50
},
"meta": {
"rows_returned": 37,
"mandatory_contract_fields_present": [
"api_version",
"data",
"data_as_of"
],
"plan": "enterprise",
"row_limit": 100000,
"is_limited": false
},
"envelope": {
"api_version": "v2",
"dataset": "corporate_actions",
"dataset_version": "v2.0.0-preview",
"release_version": "v2.2026-08-06.preview",
"release_date": "2026-08-06",
"data_as_of": "2026-08-06",
"request_context": {
"ticker": "00929",
"as_of_date": "2026-08-06",
"family": "market_structure_corporate_actions",
"field_group_type": "canonical",
"dataset_view": "market_corporate_actions_aggregate_v1"
},
"data": [
{
"ticker": "00929",
"action_type": "ex_dividend",
"effective_date": "2026-07-21",
"announcement_date": null,
"record_date": null,
"ex_date": "2026-07-21",
"cash_dividend": null,
"stock_dividend": null,
"capital_reduction_ratio": null,
"source_id": "00929,20260721",
"quality_flag": "ok",
"market": "TWSE",
"provider": "twse_official",
"source_role": "historical_ex_right_ex_dividend_reference_price",
"lineage": {
"row_index": 301,
"detail_ref": "00929,20260721",
"endpoint_name": "TWT49U",
"payload_status": "OK",
"request_end_date": "20260731",
"request_start_date": "20260701"
},
"split_ratio": null,
"rights_ratio": null,
"rights_price": null,
"par_value_ratio": null,
"par_value_from": null,
"par_value_to": null
},
{
"ticker": "00929",
"action_type": "ex_dividend",
"effective_date": "2026-06-17",
"announcement_date": null,
"record_date": null,
"ex_date": "2026-06-17",
"cash_dividend": null,
"stock_dividend": null,
"capital_reduction_ratio": null,
"source_id": "00929,20260617",
"quality_flag": "ok",
"market": "TWSE",
"provider": "twse_official",
"source_role": "historical_ex_right_ex_dividend_reference_price",
"lineage": {
"row_index": 114,
"detail_ref": "00929,20260617",
"endpoint_name": "TWT49U",
"payload_status": "OK",
"request_end_date": "20260930",
"request_start_date": "20260601"
},
"split_ratio": null,
"rights_ratio": null,
"rights_price": null,
"par_value_ratio": null,
"par_value_from": null,
"par_value_to": null
}
],
"quality": {
"freshness_state": "fresh",
"freshness_as_of": "2026-08-06",
"completeness_ratio": 1,
"quality_status": "ready"
},
"lineage": {
"source_role": "canonical",
"selected_source": "twse_official",
"fallback_chain": [
"tpex_official",
"data_gov_mirror"
],
"policy_notes": [
"official/public-first canonical",
"market-structure canonical aggregate first",
"no Yahoo canonical dependency"
]
},
"error": {
"error_code": null,
"error_message": null,
"dataset": "corporate_actions",
"request_id": "read-api-e351b108c8e7",
"blocking_gate": null
}
}
}擷取自 2026-07-20 的線上 API。
以下欄位會隨資料一併回傳,記錄這一列的來源。它們屬於出處而非本資料集要講的事實,因此列在這裡而不進欄位表。
providersource_rolelineage本服務部分資料取自政府資料開放平臺(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/companies-events/corporate-actions
版本取自資料集自己的 as_of,不是這一頁的產生日期。沒有 as_of 的資料集就不列這個欄位,不會補一個看起來合理的值。 驗證簽章
可與本資料集對齊的其他資料集。每組都標出可用來 join 的欄位,規劃跨表查詢時不必自己猜。
可用 market + ticker 對齊
可用 market + ticker 對齊
可用 market + ticker 對齊
可用 market + ticker 對齊
可用 market + ticker 對齊
curl "https://api.twmarketdata.com/v2/datasets/corporate-actions?ticker=00929" \
-H "X-API-Key: sk_live_..."| 參數 | 必填 | 型別 | 說明 |
|---|---|---|---|
symbol | 是 | string | 股票代碼,例如 2330。 |
start_date | 否 | string (YYYY-MM-DD) | 查詢起始日期。 |
end_date | 否 | string (YYYY-MM-DD) | 查詢結束日期。 |
limit | 否 | integer | 回傳筆數上限。 |
import requests
resp = requests.get(
"https://api.twmarketdata.com/v2/datasets/corporate-actions",
params={"ticker": "00929"},
headers={"X-API-Key": "sk_live_..."},
)
resp.raise_for_status()
print(resp.json()["envelope"]["data"])此端點為 GET /v2/datasets/corporate-actions。完整機器可讀 schema(參數、認證、回應封裝)見 OpenAPI spec。