ETF 持股資料
取得指定 ETF 在日期區間內的每日成分股清單,含 成分股代號、名稱、持股數、權重,以及相對前一個有資料日的變動。
GET /ownership/etf-holdings/{symbol}
版本資訊
v2.2.9 起新增功能
Parameters
| Name | Type | Description |
|---|---|---|
symbol* | string | ETF 代碼(如 0050、00981A),路徑參數 |
from | string | 開始日期(格式:yyyy-MM-dd),預設 30 天前 |
to | string | 結束日期(格式:yyyy-MM-dd),預設今天 |
sort | string | 依日期排序,預設 desc 降冪;可選 asc 升冪 |
Response
| Name | Type | Description |
|---|---|---|
symbol* | string | ETF 代號 |
type* | string | 證券類型 |
exchange* | string | 交易所 |
market* | string | 市場別 |
data* | object[] | 每日成分資料,一日一筆 |
data.date* | string | 日期 |
data.components* | object[] | 成分股清單 |
data.components.symbol* | string | 成分股代號(海外型 ETF 可能為外國代號,如 AAPL UQ) |
data.components.name | string | 成分股名稱 |
data.components.quantity | number | 持股股數 |
data.components.weight | number | 權重(%) |
data.components.quantityChange | number | 相對上一個有資料日的持股變動(首日省略) |
data.components.weightChange | number | 相對上一個有資料日的權重變動(首日省略) |
資料說明
- 資料來源:整理自各 ETF 發行投信公司公開揭露之每日成分資訊,僅供參考 ,實際持股內容以各投信公司/基金公開說明書之公告為準。
- 歷史涵蓋:資料涵蓋起始日依個別 ETF 而異,並非單一固定日期;實測
0050/00878最早分別可回溯至 2019 年初、2020 年中,請勿假設所有 ETF 涵蓋期間一致,以實際回傳為準。 - 無成分資料的交易日:發行商未提供成分資料之交易日不會出現在回應的
data陣列中。 - 權重範圍:本資料僅涵蓋 ETF 的股票部位成分。股票型 ETF(被動或主動)權重接近 100%(差額為現金部位);平衡型/多重資產型僅回股票部位、權重不會加總至 100%(可能僅約 30%);純債券型/期貨型/商品型因無股票部位,回傳
data: []。 - 變動欄位:
quantityChange/weightChange為相對「該 ETF 上一個有成分資料的日期」之差,不保證對照前一交易日;該 ETF 首個有資料日不含此兩欄位。
Example
- Python
- Node.js
- C#
from fubon_neo.sdk import FubonSDK, Order
sdk = FubonSDK()
accounts = sdk.login("Your ID", "Your password", "Your cert path", "Your cert password") # 需登入後,才能取得行情權限
sdk.init_realtime() # 建立行情連線
reststock = sdk.marketdata.rest_client.stock
## 2.2.6 及以後版本使用更簡化 (使用 Exception 進行例外處理)
from fubon_neo.sdk import FugleAPIError
try:
response = reststock.ownership.etf_holdings(**{"symbol": "0050", "from": "2026-07-09", "to": "2026-07-09"})
except FugleAPIError as e:
print(f"Error: {e}")
print("------------")
print(f"Status Code: {e.status_code}") # 例: 429
print(f"Response Text: {e.response_text}") # 例: {"statusCode":429,"message":"Rate limit exceeded"}
print(response)
const { FubonSDK } = require('fubon-neo');
const sdk = new FubonSDK();
const accounts = sdk.login("Your ID", "Your Password", "Your Cert Path", "Your Cert Password");
sdk.initRealtime(); // 建立行情連線
const client = sdk.marketdata.restClient
client.stock.ownership.etfHoldings({ symbol: '0050', from: '2026-07-09', to: '2026-07-09' })
.then(data => console.log(data));
using FubonNeo.Sdk;
using FugleMarketData.QueryModels.Stock.Ownership;
var sdk = new FubonSDK();
var result = sdk.Login("Your ID", "Your Password", "Your Cert Path", "Your Cert Password");
sdk.InitRealtime(); // 建立行情連線
var rest = sdk.MarketData.RestClient.Stock;
var etfHoldings = await rest.Ownership.EtfHoldings(new()
{
Symbol = "0050",
From = fromDate,
To = toDate
});
var etfHoldings_cont = etfHoldings.Content.ReadAsStringAsync().Result;
Console.WriteLine(etfHoldings_cont);
Response Body(為節省篇幅,components 僅列前 3 檔成分股並以 ... 註記截斷;實際回應會包含當日全部成分股,此處以 2026-07-09 收盤後實測資料為例,預設查詢區間共回傳 21 個交易日):
{
"symbol": "0050",
"type": "EQUITY",
"exchange": "TWSE",
"market": "TSE",
"data": [
{
"date": "2026-07-09",
"components": [
{
"symbol": "2330",
"name": "台積電",
"quantity": 530358242,
"weight": 58.82,
"quantityChange": 370562,
"weightChange": 0.17
},
{
"symbol": "2454",
"name": "聯發科",
"quantity": 32045645,
"weight": 5.76,
"quantityChange": 22388,
"weightChange": -0.09
},
{
"symbol": "2308",
"name": "台達電",
"quantity": 41931322,
"weight": 3.56,
"quantityChange": 29348,
"weightChange": -0.03
}
// ... 其餘成分股略
]
}
// ... 其餘交易日略
]
}