Add Yahoo Finance stock data integration #4

Closed
chezu wants to merge 0 commits from feat-yahoofinance into main
Collaborator

Summary

  • Add stock quote cards to the IrisCompanion feed using Yahoo Finance API
  • Users can configure up to 5 stock symbols in a new "Stocks" settings tab
  • Stock cards appear in the FYI bucket and sync to Google Glass via BLE

Changes

  • StockDataSource.swift - Fetches quotes from Yahoo Finance v8 chart API with 5-min caching
  • StockSettingsStore.swift - Persists user's stock symbols in UserDefaults
  • StockSettingsView.swift - Settings UI to add/remove stock symbols
  • Winner.swift - Add STOCK feed item type
  • HeuristicRanker.swift - Add stock priority weight (0.3)
  • ContextOrchestrator.swift - Integrate stock fetch into pipeline, add to FYI bucket
  • ContentView.swift - Add Stocks tab to main navigation

Card Format

  • Title: AAPL $189.84
  • Subtitle: +2.34 (+1.25%)
  • TTL: 10 minutes
  • Bucket: FYI (always)

Test plan

  • Add stock symbols in Stocks tab (e.g., AAPL, SPY, ^GSPC)
  • Tap "Recompute Now" on Orchestrator tab
  • Verify stock cards appear in the feed
  • Verify stock data syncs to Glass via BLE
## Summary - Add stock quote cards to the IrisCompanion feed using Yahoo Finance API - Users can configure up to 5 stock symbols in a new "Stocks" settings tab - Stock cards appear in the FYI bucket and sync to Google Glass via BLE ## Changes - **StockDataSource.swift** - Fetches quotes from Yahoo Finance v8 chart API with 5-min caching - **StockSettingsStore.swift** - Persists user's stock symbols in UserDefaults - **StockSettingsView.swift** - Settings UI to add/remove stock symbols - **Winner.swift** - Add `STOCK` feed item type - **HeuristicRanker.swift** - Add stock priority weight (0.3) - **ContextOrchestrator.swift** - Integrate stock fetch into pipeline, add to FYI bucket - **ContentView.swift** - Add Stocks tab to main navigation ## Card Format - **Title**: `AAPL $189.84` - **Subtitle**: `+2.34 (+1.25%)` - **TTL**: 10 minutes - **Bucket**: FYI (always) ## Test plan - [ ] Add stock symbols in Stocks tab (e.g., AAPL, SPY, ^GSPC) - [ ] Tap "Recompute Now" on Orchestrator tab - [ ] Verify stock cards appear in the feed - [ ] Verify stock data syncs to Glass via BLE
chezu added 2 commits 2026-01-10 21:14:49 +00:00
- Add StockDataSource to fetch quotes from Yahoo Finance API
- Add StockSettingsStore for persisting user's stock symbols
- Add StockSettingsView with UI to manage symbols (max 5)
- Add STOCK feed item type and ranker weight (0.3)
- Integrate stock fetch into ContextOrchestrator pipeline
- Stock cards appear in FYI bucket and sync to Glass via BLE

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The v7 /quote endpoint returns 401 Unauthorized as it now requires
cookie-based authentication. The v8 /chart endpoint works without auth.

- Switch to v8/finance/chart/{symbol} endpoint
- Fetch each symbol individually (chart API limitation)
- Update response parsing for chart JSON structure
- Calculate price change from regularMarketPrice - chartPreviousClose

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
chezu force-pushed feat-yahoofinance from 25cdebd1b2 to 34838f5ae1 2026-01-10 21:16:36 +00:00 Compare
chezu closed this pull request 2026-01-10 21:17:42 +00:00
chezu deleted branch feat-yahoofinance 2026-01-10 21:23:24 +00:00

Pull request closed

Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kennethnym/aris-old#4
No description provided.