Refactor market data provider integration and add support for multiple data sources#55
Open
phbrgnomo wants to merge 17 commits into
Open
Refactor market data provider integration and add support for multiple data sources#55phbrgnomo wants to merge 17 commits into
phbrgnomo wants to merge 17 commits into
Conversation
Gitignore fix
Introduces a provider abstraction layer to support multiple market data sources. **Changes:** - Created `internal/providers/` package with Provider interface - Implemented PolygonProvider wrapping existing Polygon.io client - Created providers.Service to manage provider lifecycle - Updated Server to use providerService instead of polygonService - Renamed polygonService to providerService throughout handlers **Benefits:** - Enables support for multiple data providers - Maintains backward compatibility with existing Polygon.io integration - Provides clear interface for adding new providers (e.g., Alpha Vantage) - Standardizes error handling and response types **Files Added:** - internal/providers/provider.go (interface definition) - internal/providers/polygon.go (Polygon.io implementation) - internal/providers/service.go (provider service layer) - internal/providers/provider_test.go (unit tests) - internal/providers/README.md (documentation) **Files Modified:** - internal/web/server.go - internal/web/polygon_handlers.go - internal/web/symbol_handlers.go No breaking changes - all existing functionality preserved.
…dling and rate limiting
… error handling and logging
…d improve error handling in API connection tests
… provider structure and enhance error handling
Refactor web utilities and enhance UI components
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.
This update introduces a provider abstraction layer to support multiple market data sources, allowing for easier integration of new providers like Yahoo Finance. The existing Polygon.io integration remains intact, ensuring backward compatibility. Key changes include the creation of a
Providerinterface, implementation of aPolygonProvider, and modifications to the server to utilize the new provider service. Additionally, comprehensive tests for API key handling and rate limiting have been added, along with updated development instructions.Fixes #52
Original fork PR for reference: phbrgnomo#2