Skip to content

📊 Feat: NFT Analytics & Aggregation Service #83

@Cedarich

Description

@Cedarich

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

  1. Create AnalyticsService.
  2. Implement a Cron job that runs at midnight.
  3. Query the Sale entity to sum volumes and find min price for each collection.
  4. Save results to CollectionStats.
  5. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions