Implement Yahoo Finance API for monthly closing prices and exchange rates#205
Merged
Merged
Conversation
…orage - Add priceApi types with provider configs, monthly closing prices, rate limits - Add priceApi service with Yahoo Finance, Alpha Vantage, financialdata.net support, fallback chain, caching, and rate limiting - Add exchangeRateApi service for live exchange rates with fallback to defaults - Add apiKeyStorage for encrypted storage of user API keys - Add comprehensive tests: 58 new tests (all passing) - Full test suite: 951 tests pass, build succeeds Co-authored-by: mbianchidev <37507190+mbianchidev@users.noreply.github.com> Agent-Logs-Url: https://github.com/mbianchidev/fire-tools/sessions/3b3ad307-f427-4dfd-b09d-83c29295c929
…ta.net Remove multi-provider support per user requirement. Yahoo Finance is the sole data source for both asset prices and exchange rates. No API key is required. Removes apiKeyStorage utility entirely. All 927 tests pass (893 original + 34 new), build succeeds. Co-authored-by: mbianchidev <37507190+mbianchidev@users.noreply.github.com> Agent-Logs-Url: https://github.com/mbianchidev/fire-tools/sessions/3b3ad307-f427-4dfd-b09d-83c29295c929
- Use proper Date.setMonth() for accurate month subtraction - Use vi.stubGlobal/vi.unstubAllGlobals for proper fetch mock cleanup Co-authored-by: mbianchidev <37507190+mbianchidev@users.noreply.github.com> Agent-Logs-Url: https://github.com/mbianchidev/fire-tools/sessions/3b3ad307-f427-4dfd-b09d-83c29295c929
Copilot
AI
changed the title
[WIP] Implement reliable API for monthly closing prices
Implement Yahoo Finance API for monthly closing prices and exchange rates
Mar 23, 2026
Resolved conflict in package-lock.json by regenerating via npm install. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Restrict the build and deploy jobs to runs triggered by a tag matching 'v*' instead of every push to main. Tests still run on all branches. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
mbianchidev
approved these changes
May 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds client-side API layer for fetching monthly closing asset prices and live exchange rates via Yahoo Finance (free, no API key required).
New modules
src/types/priceApi.ts— Types for price data, exchange rates, cache entries, and rate limit trackingsrc/utils/priceApi.ts— Monthly closing prices via Yahoo Finance chart API (/v8/finance/chart,interval=1mo)src/utils/exchangeRateApi.ts— Live FX rates via Yahoo Finance quote API (/v7/finance/quote) using EUR-based currency pairs (EURUSD=X, etc.)Design
DEFAULT_FALLBACK_RATESwhen Yahoo is unavailableUsage
Tests
34 new tests covering fetch logic, caching, rate limiting, error paths, and type validation.
💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.