ETF and index-fund holdings
financialdatasets.index-fundsGet an ETF or index fund's holdings and weights, or find funds that hold a US security
- 价格
- $0.02/success按供应商原价
- 成功率
- —暂无成功率数据暂无成功率数据
- 延迟 p50
- ——
- 最后验证
- 2026年9月15日实测可用
GEThttps://toolswitch.dev/v1/tools/financialdatasets.index-funds?limit=1&ticker=SPY预览- 可用平台额度调用
- 同步返回
- 读取公开数据
参数
Supply exactly one of ticker or holding unless continuing with cursor. The response shape depends on the query: ticker returns fund and holdings; holding returns security and funds.
| 参数 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| 查询参数 | ||||
as_of | 字符串 | 可选 | YYYY-MM-DD; valid only with ticker; returns the fund composition in effect on or before this date | |
limit | 整数 | 可选 | total rows across all pages; default 50; each response page contains up to 10 rows | 1 |
cursor | 字符串 | 可选 | opaque cursor from the response next_page_url; when supplied, omit the original filters because the cursor preserves them | |
offset | 整数 | 可选 | rows to skip; default 0 | |
ticker | 字符串 | 可选 | ETF or index-fund ticker; supply exactly one of ticker or holding. If availability is uncertain, call financialdatasets.index-funds.tickers first | SPY |
holding | 字符串 | 可选 | US security ticker; supply exactly one of ticker or holding to find funds whose latest filing holds the security | |
asset_class | 字符串 | 可选 | equity | bond; valid only with ticker; omit for all holdings | |
- 查询参数
as_of字符串可选YYYY-MM-DD; valid only with ticker; returns the fund composition in effect on or before this date
limit整数可选total rows across all pages; default 50; each response page contains up to 10 rows
示例:
1cursor字符串可选opaque cursor from the response next_page_url; when supplied, omit the original filters because the cursor preserves them
offset整数可选rows to skip; default 0
ticker字符串可选ETF or index-fund ticker; supply exactly one of ticker or holding. If availability is uncertain, call financialdatasets.index-funds.tickers first
示例:
SPYholding字符串可选US security ticker; supply exactly one of ticker or holding to find funds whose latest filing holds the security
asset_class字符串可选equity | bond; valid only with ticker; omit for all holdings
代码示例
将 $TOOLSWITCH_KEY 替换为你在控制台创建的密钥。
curl -X GET 'https://toolswitch.dev/v1/tools/financialdatasets.index-funds?limit=1&ticker=SPY' \
-H "X-Toolswitch-Key: $TOOLSWITCH_KEY"import os
import requests
response = requests.request(
"GET",
"https://toolswitch.dev/v1/tools/financialdatasets.index-funds?limit=1&ticker=SPY",
headers={"X-Toolswitch-Key": os.environ["TOOLSWITCH_KEY"]},
)
response.raise_for_status()
print(response.text)const response = await fetch("https://toolswitch.dev/v1/tools/financialdatasets.index-funds?limit=1&ticker=SPY", {
method: "GET",
headers: {
"X-Toolswitch-Key": process.env.TOOLSWITCH_KEY ?? "",
},
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
console.log(await response.text());网关接口为预览版,地址与鉴权方式可能调整。 示例参数仅为样例数据。 调用按 $0.02/success 计费,已含服务费。