Free ETF X-Ray API — Deep Fundamental Analysis
Look inside any ETF at the holding level. Our X-Ray endpoint computes HHI concentration, runs bottom-up Piotroski & Altman Z analysis across all holdings, and returns weighted valuation metrics — similar to Morningstar X-Ray but via a free REST API.
Endpoint
GET https://securitiesdb.com/api/v1/etfs/{ticker}/xrayWhat Does ETF X-Ray Measure?
Unlike a simple holdings list, the X-Ray endpoint performs fundamental analysis at the constituent level and aggregates the results:
- HHI Concentration: Herfindahl-Hirschman Index — measures how concentrated the ETF is in its top holdings
- Bottom-Up Quant Scores: Weighted Piotroski F-Score and Altman Z-Score at the fund level
- Weighted Valuation: Holdings-weighted PE ratio, price-to-book, and enterprise value metrics
- Style Classification: Value/Growth/Blend based on underlying factor exposures
- Distress Exposure: Percentage of assets in Altman Z "distress zone" companies
Response Fields
| Field | Description |
|---|---|
| overview | ETF name, expense ratio, total holdings count |
| concentration | HHI score, top-10 weight %, concentration verdict |
| valuation | Weighted PE, PB, and enterprise valuation metrics |
| risk | Distress exposure %, volatility metrics |
| bottom_up_analysis | Weighted Piotroski, Altman Z, and style classification |
Python Example — Compare ETF Quality
import requests
etfs = ["VTI", "SPY", "QQQ", "SCHD", "VIG"]
print(f"{'ETF':>5} {'HHI':>6} {'Piotroski':>10} {'Altman Z':>9} {'PE':>6} {'Style':>8}")
print("-" * 50)
for ticker in etfs:
r = requests.get(f"https://securitiesdb.com/api/v1/etfs/{ticker}/xray")
if r.status_code != 200:
continue
d = r.json()["data"]
hhi = d["concentration"]["hhi"]
piotroski = d["bottom_up_analysis"]["weighted_piotroski"]
altman = d["bottom_up_analysis"]["weighted_altman_z"]
pe = d["valuation"].get("weighted_pe", "N/A")
style = d["bottom_up_analysis"].get("style", "N/A")
print(f"{ticker:>5} {hhi:>6.0f} {piotroski:>10.1f} {altman:>9.2f} "
f"{pe:>6} {style:>8}")