Skip to content

feat(etf-holdings): add ETF Holdings API (beta) - #87

Open
alexpipipi wants to merge 1 commit into
mainfrom
feat/etf-holdings-api
Open

alexpipipi wants to merge 1 commit into
mainfrom
feat/etf-holdings-api

Conversation

@alexpipipi

Copy link
Copy Markdown
Member

Adds the ETF Holdings API (beta) to this repo. Docs: https://eodhd.com/financial-apis/etf-holdings-api

Two endpoints, both JSON, 10 API calls per request, plans Fundamentals Data Feed and All-In-One:

  • GET /api/etf/holdings/{ticker}: all positions of a US-listed ETF from its latest SEC N-PORT filing (no pagination, no fmt)
  • GET /api/etf/security/{ticker}/held-by: ETFs that hold a security; page[offset] (default 0) and page[limit] (default 100, 1 to 5000). The demo token is rejected here (403); it works for VTI on holdings.

Behaviour that the code handles on purpose: coded 404 bodies (FUND_NOT_FOUND, NOT_COVERED, NO_HOLDINGS_YET), 422 for non-US fund tickers, and Holdings being an empty list instead of an object for a fund with no positions.

SDK: get_etf_holdings() and get_etf_held_by() on the client, EtfHoldingsAPI wrapper, tests, Unreleased changelog line (no version bump).

Checked: pytest tests/ 189 passed (16 new); one live call per method returned the documented shape.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant