Skip to content

Refactor market data provider integration and add support for multiple data sources#55

Open
phbrgnomo wants to merge 17 commits into
MarkT1065:mainfrom
phbrgnomo:data-provider-connections
Open

Refactor market data provider integration and add support for multiple data sources#55
phbrgnomo wants to merge 17 commits into
MarkT1065:mainfrom
phbrgnomo:data-provider-connections

Conversation

@phbrgnomo
Copy link
Copy Markdown
Contributor

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 Provider interface, implementation of a PolygonProvider, 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

phbr and others added 17 commits February 13, 2026 17:55
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.
…d improve error handling in API connection tests
… provider structure and enhance error handling
Refactor web utilities and enhance UI components
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.

Feature Proposal

1 participant