Title: feat(analytics): implement collection stats and floor price history
Complexity Score: 200 points
Description
Provide historical data analysis for collections, such as volume over time, floor price trends, and holder distribution.
Requirements and Context
- Entities:
CollectionStats (date, volume, floor_price, sales_count).
- Aggregation: A scheduled job should calculate these stats daily/hourly from the
Sales history.
- API: Endpoints to fetch charts data (e.g.,
[timestamp, value]).
Suggested Execution
- Create
AnalyticsService.
- Implement a Cron job that runs at midnight.
- Query the
Sale entity to sum volumes and find min price for each collection.
- Save results to
CollectionStats.
- Expose
GET /collections/:id/stats.
Test and Commit
- Test aggregation logic with mock sales data.
- Commit Message:
feat(analytics): implement collection stats and floor price history
Title:
feat(analytics): implement collection stats and floor price historyComplexity Score: 200 points
Description
Provide historical data analysis for collections, such as volume over time, floor price trends, and holder distribution.
Requirements and Context
CollectionStats(date, volume, floor_price, sales_count).Saleshistory.[timestamp, value]).Suggested Execution
AnalyticsService.Saleentity to sum volumes and find min price for each collection.CollectionStats.GET /collections/:id/stats.Test and Commit
feat(analytics): implement collection stats and floor price history