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

籌碼與資金

外資持股比率

外資持股比率

已驗證來源: TWSE·方案: pro·計費: 2 ·GET /v2/datasets/foreign-holding

外資持股比率是台灣市場資料集,來源為 TWSE,由 TW Market Data 以 GET /v2/datasets/foreign-holding 提供。

總覽

外資持股比率——每列粒度:ticker / trade_date。

欄位型別說明
tickerstring
trade_datestring
marketstring
namestring
isinstring
shares_issuednumber
remaining_investablenumber
held_sharesnumber
remaining_pctnumber尚可投資比率(%)
holding_pctnumber外資持股比率(%)
limit_change_datestring

涵蓋範圍

列數
涵蓋起訖涵蓋自 2004-02
分級已驗證

範例回應

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

{  "api_version": "v2",  "dataset": "foreign_holding",  "dataset_version": "v2.0.0-preview",  "release_version": "v2.2026-08-04.preview",  "release_date": "2026-08-04",  "data_as_of": "2026-08-04",  "request_context": {    "ticker": "0050",    "as_of_date": "2026-08-04",    "family": "chip_deep",    "field_group_type": "canonical",    "dataset_view": "foreign_holding_v1",    "scope": "twse_qfiis_foreign_and_mainland_holding_daily",    "coverage_type": "daily_per_ticker_holding_snapshot",    "supported_filter_fields": [      "ticker",      "market",      "trade_date"    ],    "ticker_filter": "0050",    "market_filter": null,    "date_range": {      "date_from": null,      "date_to": null    },    "applied_default_window": false,    "default_window_days": null,    "order_by": "ticker ASC, trade_date DESC"  },  "data": [    {      "ticker": "0050",      "trade_date": "2026-08-04",      "market": "TWSE",      "name": "元大台灣50",      "isin": "TW0000050004",      "shares_issued": 22489500000,      "remaining_investable": 21261492785,      "held_shares": 1228007215,      "remaining_pct": 94.53,      "holding_pct": 5.46,      "limit_change_date": "2026-07-02",      "provider": "twse_official",      "source_role": "official_twse_qfiis",      "source_authority": "TWSE MI_QFIIS 外資及陸資投資持股統計",      "source_family": "TWSE_MI_QFIIS",      "lineage": {        "row_index": 10,        "source_hash": "qfiis:20260804",        "payload_date": "20260804",        "request_date": "2026-08-04",        "endpoint_name": "rwd_fund_MI_QFIIS",        "source_authority": "TWSE MI_QFIIS 外資及陸資投資持股統計"      },      "not_investment_advice": true    },    {      "ticker": "0050",      "trade_date": "2026-08-03",      "market": "TWSE",      "name": "元大台灣50",      "isin": "TW0000050004",      "shares_issued": 22487000000,      "remaining_investable": 21229326239,      "held_shares": 1257673761,      "remaining_pct": 94.4,      "holding_pct": 5.59,      "limit_change_date": "2026-07-02",      "provider": "twse_official",      "source_role": "official_twse_qfiis",      "source_authority": "TWSE MI_QFIIS 外資及陸資投資持股統計",      "source_family": "TWSE_MI_QFIIS",      "lineage": {        "row_index": 10,        "source_hash": "qfiis:20260803",        "payload_date": "20260803",        "request_date": "2026-08-03",        "endpoint_name": "rwd_fund_MI_QFIIS",        "source_authority": "TWSE MI_QFIIS 外資及陸資投資持股統計"      },      "not_investment_advice": true    }  ],  "quality": {    "freshness_state": "fresh",    "freshness_as_of": "2026-08-04",    "completeness_ratio": 1,    "quality_status": "ready",    "ticker_count": 1  },  "lineage": {    "source_role": "canonical",    "selected_source": "twse_mi_qfiis",    "fallback_chain": [],    "policy_notes": [      "official/public-first canonical",      "TWSE MI_QFIIS 外資及陸資投資持股統計 (per ticker, per trading day)",      "held_shares / holding_pct are the published aggregate; no beneficial-owner identity"    ]  },  "error": {    "error_code": null,    "error_message": null,    "dataset": "foreign_holding",    "request_id": "read-api-20260804",    "blocking_gate": null  },  "dataset_id": "foreign_holding",  "data_count": 50,  "known_gaps": [    "twse_only_scope",    "no_tpex_coverage",    "qfiis_daily_snapshot_only"  ],  "warnings": [    "not_investment_advice",    "twse_only_scope"  ],  "not_investment_advice": true}

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

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

出處

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

providersource_rolesource_authoritysource_familylineagenot_investment_advice

可與本資料集對齊的其他資料集。每組都標出可用來 join 的欄位,規劃跨表查詢時不必自己猜。

快速開始

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

篩選參數

參數必填型別說明
symbolstring股票代碼,例如 2330。
start_datestring (YYYY-MM-DD)查詢起始日期。
end_datestring (YYYY-MM-DD)查詢結束日期。
limitinteger回傳筆數上限。

Python 範例

第一個呼叫:

import requests resp = requests.get(    "https://api.twmarketdata.com/v2/datasets/foreign-holding",    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/foreign-holding",    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/foreign-holding。完整機器可讀 schema(參數、認證、回應封裝)見 OpenAPI spec