Index Constituents

v0.2.1
io.github.pipeworx-io/index-constituents Checked 1 day ago Published 1 month ago

Index constituents and holdings, point-in-time.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

index_constituents

Current constituents of a major US or developed-markets equity index — ticker, name, GICS sector, and weight — sourced from the matching iShares index-tracking ETF's daily holdings file (the closest free, point-in-time proxy for official index membership and weights; S&P/Russell do not publish those for free). Answers "what's in the S&P 500 right now", "top holdings of the Russell 2000 by weight", "which sectors make up the S&P MidCap 400". Cash, collateral and futures positions the ETF holds are excluded here — use ishares_etf_holdings for those.

ParameterTypeDescription
index *stringWhich index. One of: sp500, sp400, sp600, russell1000, russell2000, eafe.
limitnumberMax rows to return, sorted by weight descending (default 50, max 600 — pass the max to get the full index in one call).
offsetnumberRows to skip, for paging past `limit` (default 0).
sectorstringOptional GICS sector filter, case-insensitive substring match (e.g. "Health Care", "Energy").

ishares_etf_holdings

Full reported holdings of one of six iShares index-tracking ETFs (IVV, IJH, IJR, IWB, IWM, EFA) as of the fund's own "as of" date — every position including cash, collateral and futures, each labeled with its asset class so they are never silently mixed in with equities. Answers "what does IVV actually hold today", "how much cash does this ETF carry". For just the equity index membership, use index_constituents instead.

ParameterTypeDescription
ticker *stringOne of the supported iShares ETFs: IVV, IJH, IJR, IWB, IWM, EFA.
asset_classstringOptional filter, case-insensitive exact match against the fund's own asset-class label (e.g. "Equity", "Cash", "Futures", "Cash Collateral and Margins", "Money Market").
limitnumberMax rows to return, sorted by market value descending (default 50, max 600).
offsetnumberRows to skip, for paging past `limit` (default 0).

constituent_changes

Dated additions and removals from the S&P 500, sourced from Wikipedia's maintained "Historical components of the S&P 500" table (every S&P-announced swap since 1963, each with its effective date, the ticker/company added, the ticker/company removed, and the stated reason). Answers "what changed in the S&P 500 in 2024", "when was X removed from the S&P 500 and what replaced it". Only sp500 is covered — the iShares-backed indexes above have no equivalent public, dated changes table.

ParameterTypeDescription
index *stringOnly "sp500" is supported.
fromstringEarliest effective date to include, as a year ("2024") or ISO date ("2024-01-01"). Omit for no lower bound.
limitnumberMax rows to return, most recent first (default 50, max 600).
tostringLatest effective date to include, as a year ("2024") or ISO date ("2024-12-31"). Omit for no upper bound.