Skip to content

feat: add stock ownership etfHoldings REST endpoint#8

Merged
kevinypfan merged 2 commits into
release/v1.5.0from
feat/etf-holdings
Jul 1, 2026
Merged

feat: add stock ownership etfHoldings REST endpoint#8
kevinypfan merged 2 commits into
release/v1.5.0from
feat/etf-holdings

Conversation

@kevinypfan

Copy link
Copy Markdown
Collaborator

What

Adds a client method for GET /v1.0/stock/ownership/etf-holdings/{symbol} (fugle-realtime issue #622, Phase 1 ETF holdings). Client-side only — no backend.

API

stock.ownership.etfHoldings({ symbol, from?, to?, sort?, code? })
  : Promise<RestStockOwnershipEtfHoldingsResponse>

Returns { type, exchange, market, symbol, data: [{ date, components: [{ symbol, name, quantity, weight, quantityChange?, weightChange? }] }] }.

Changes

  • New src/rest/stock/ownership/etf-holdings.ts (follows the historical/candles pattern).
  • New get ownership() getter on RestStockClient.
  • 4 new tests in test/rest-client.spec.ts (URL + query string). npm test → 147/147.
  • README usage example.

🤖 Generated with Claude Code

kevinypfan and others added 2 commits June 22, 2026 17:30
Add client method for GET /v1.0/stock/ownership/etf-holdings/{symbol},
exposing daily ETF component holdings via stock.ownership.etfHoldings()
with optional from/to/sort/code query params. Includes endpoint module,
client getter, tests, and README usage example.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Other endpoints aren't individually listed in the README; keep it consistent.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@kevinypfan kevinypfan changed the base branch from master to release/v1.5.0 July 1, 2026 09:23
@kevinypfan kevinypfan merged commit 8425bae into release/v1.5.0 Jul 1, 2026
4 checks passed
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