Skip to content

Add group-by endpoint for vault analytics #863

Description

@Jayy4rl

Context: Analytics dashboards need vault metrics grouped by category or state without client-side aggregation.

Requirements:

  • GET /api/v1/analytics/vaults/group-by?by=rwa_category returns [{ group; vaultCount; totalValueLocked; averageApy }].
  • Support by values: rwa_category, state, maturityMonth. Return HTTP 400 for invalid values.

Acceptance criteria:

  • Grouping by state returns one row per non-empty state.
  • totalValueLocked is the sum of total_assets within each group.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions