Repository navigation
Closed
Labels
refactorImprovement of certain features or its functionalitiesImprovement of certain features or its functionalities
Milestone
Description
Goal
Refactor TimeSeriesService into MarketDataService and add a storage-first workflow.
Why
ARGUS should use stored historical data before calling external APIs again. This keeps data access centralized and prepares the project for analytics and reporting workflows that can reuse saved market data.
Scope
- Rename or refactor
TimeSeriesServiceintoMarketDataService - Check DuckDB for requested historical price bars first
- Return stored price bars if the full requested data is available
- Call the API client only if no matching stored data is found
- Normalize fetched API data into internal models
- Save fetched historical data to DuckDB before returning it
- Trend Analysis get their own serivce and they call analytics to create charts (not vise versa)
- Add a
MarketDataSetto internal models so this service can reliably transport dataframe with internal meta data - Keep client access inside
MarketDataService
Out of scope
- Partial range handling: if only part of the requested data exists, treat it as not found
Acceptance criteria
-
TimeSeriesServiceis refactored or renamed toMarketDataService - Historical data requests check DuckDB before calling an API client
- Stored data is returned when the requested data exists
- Add MarketDataSet
- Created new Service
trend_analysis_service - API client is called only when no matching stored data is found
- Fetched API data is normalized into internal models
- Fetched historical data is saved to DuckDB
- Tests for storage hit and storage miss behavior + exception handeling tests
- tests for the new service
Note
Priority: Should
Metadata
Metadata
Assignees
Labels
refactorImprovement of certain features or its functionalitiesImprovement of certain features or its functionalities
Activity
feat(#70): rename timeseries_service
refactor(#70): get data is a own func
refactor(#70): service generate a chart
refactor(#70): coordinate workflow
refactor(#70): establish the model
test(#70): edit the tests
refactor(#70): remove unused vars
refactor(#70): improve req/resp model
test(#70): improve db and model tests
test(#70): improve client tests
refactor(#70): trend service report err
chore(#70): ruff formatting
chore(#70): ruff formatting again
chore(#70): ruff formatting again
fix(#70): add duckdb dependency