-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Labels
Description
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
Saleshistory. - API: Endpoints to fetch charts data (e.g.,
[timestamp, value]).
Suggested Execution
- Create
AnalyticsService. - Implement a Cron job that runs at midnight.
- Query the
Saleentity 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
Reactions are currently unavailable