Skip to content

Implement GET /api/commitments/[id]/health #116

@1nonlypiece

Description

@1nonlypiece

Description

Expose a backend endpoint that returns the latest health metrics and compliance score for a commitment, as computed by the attestation engine.

Implementation Requirements

  • Path: src/app/api/commitments/[id]/health/route.ts.
  • Use contracts/attestation service:
    • get_health_metrics(commitmentId)
    • calculate_compliance_score(commitmentId) if separate.
  • Response:
    • currentValue, initialValue, drawdownPercent, feesGenerated, volatilityExposure, lastAttestation, complianceScore.

Acceptance Criteria

  • Endpoint exists and returns health metrics.
  • Handles missing or invalid commitment IDs.
  • Shape matches what frontend health UI expects.

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions