con un clic
fund-holdings
Fetch ETF/fund holding details from Eastmoney (天天基金)
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Menú
Fetch ETF/fund holding details from Eastmoney (天天基金)
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Basado en la clasificación ocupacional SOC
Single-file HTML slide-deck template for Tao Te Ching chapter decks — ink-style, 10-page narrative, hand-rolled engine, reusable CSS variables and animation classes
Design or interpret dye process curves for woven synthetics, diagnose defects, and recommend colorfastness improvements with explicit trade-offs.
Identify woven synthetic fibers and explain their dyeing and finishing implications from lab clues, fabric specs, and supplier claims.
Compare finish systems, interpret SDS or trade names, assess PFAS and chemical compliance, and recommend substitutes for woven synthetics.
Reference knowledge for DWR system comparison, PFAS regulations, hazardous substance thresholds, and auxiliary chemical brand identification.
Reference knowledge for woven synthetic fiber identification, dye-class matching, process windows, and cost/energy structure.
| name | fund-holdings |
| version | 1.0.0 |
| description | Fetch ETF/fund holding details from Eastmoney (天天基金) |
| dependencies | {"skills":[],"mcps":[]} |
Fetch ETF and fund portfolio holding details via Eastmoney's Tiantian Fund (天天基金) public API. No API key required.
GET https://fundf10.eastmoney.com/FundArchivesDatas.aspx
Parameters:
type = jjcc # 股票投资明细
code = {fund_code} # e.g. 512800
topline = 20 # number of top holdings to return
Headers:
Referer: https://fundf10.eastmoney.com
Response is JavaScript variable assignment containing HTML table. Parse the HTML to extract holdings data.
The response format is:
var apidata={ content:"<div>...</div>", arryear:[2025,2024,...], curyear:2025 };
Each quarter's holdings are in a separate <table> within the HTML. Key fields per row:
import requests
import re
def get_fund_holdings(fund_code, top=20):
"""Fetch top holdings for an ETF/fund."""
url = "https://fundf10.eastmoney.com/FundArchivesDatas.aspx"
params = {"type": "jjcc", "code": fund_code, "topline": top}
headers = {"Referer": "https://fundf10.eastmoney.com"}
r = requests.get(url, params=params, headers=headers)
# Extract first quarter's data (most recent)
# Parse HTML table rows for holdings
content = r.text
# Find all <tr> rows with stock data
rows = re.findall(
r'<td>(\d+)</td>.*?r/(\d\.\d+)\'?>(\d{6})</a>.*?'
r'class=\'tol\'.*?>(.+?)</a>.*?'
r"class='tor'>(\d+\.\d+%)</td>",
content, re.DOTALL
)
holdings = []
for row in rows:
seq, market, code, name, weight = row
holdings.append({
"seq": int(seq),
"code": code,
"name": name,
"market": int(market.split(".")[0]), # 0=SZ, 1=SH
"weight": weight
})
return holdings
# Example: 银行ETF (512800)
holdings = get_fund_holdings("512800")
for h in holdings[:10]:
print(f"{h['name']} ({h['code']}) — {h['weight']}")