Skip to content

mainsequence-projects/etfholdingextractor

Repository files navigation

etfh_extractor

etfh_extractor extracts ticker weights from iShares ETF fund pages.

Installation

pip install -e .

CLI

etfh-read https://www.ishares.com/us/products/251614/ishares-msci-usa-momentum-factor-etf

That prints JSON like:

{
  "AVGO": 5.4749,
  "MU": 5.71228,
  "NVDA": 5.09816
}

Use --format full to include fund metadata and the full parsed holdings rows.

Python

from etfh_extractor import ETFHoldingsReader

url = "https://www.ishares.com/us/products/251614/ishares-msci-usa-momentum-factor-etf"
reader = ETFHoldingsReader()
fund = reader.read(url)

print(fund.fund_name)
print(fund.as_of_date)
print(fund.ticker_weights())

What It Does

  • Fetches the iShares fund page.
  • Resolves the actual Data Download export link from the page HTML.
  • Parses the holdings workbook.
  • Returns ticker-to-weight JSON or a full holdings payload.

Additional documentation:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages