Skip to content

Add Stock.get_quote_summary for sector + industry#14

Merged
fleveque merged 1 commit into
mainfrom
feat/quote-summary
May 17, 2026
Merged

Add Stock.get_quote_summary for sector + industry#14
fleveque merged 1 commit into
mainfrom
feat/quote-summary

Conversation

@fleveque

Copy link
Copy Markdown
Owner

Summary

  • New `Stock.get_quote_summary(symbol)` returns `{ sector:, industry: }` from Yahoo's `v10/finance/quoteSummary?modules=assetProfile` endpoint.
  • Returns `nil` for funds, ETFs, or any symbol whose `assetProfile` is empty / missing the sector.
  • Bumps to 0.8.0, updates CHANGELOG + README.

Why

Phase 1 of the new portfolio-stats work in dividend-portfolio needs to display a sector breakdown of holdings. Yahoo's `v7/finance/quote` doesn't carry sector data, so we need a dedicated call — verified `quoteSummary?modules=assetProfile` works with the same cookie+crumb auth our existing endpoints use.

Test plan

  • `bundle exec rspec` — 79 examples, 0 failures (8 new cases on the quote-summary helper).
  • `bundle exec rubocop` — clean.

🤖 Generated with Claude Code

Yahoo's v7/finance/quote payload doesn't include sector, so a dedicated
v10/finance/quoteSummary call is needed. Same cookie+crumb auth as the
existing quote endpoint; returns nil for funds/ETFs where assetProfile
is empty. Bumps to 0.8.0.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@fleveque fleveque merged commit 15090a9 into main May 17, 2026
1 check passed
@fleveque fleveque deleted the feat/quote-summary branch May 17, 2026 16:00
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