Skip to content

Platform Statistics API #46

@hman38705

Description

@hman38705

Descriptions:

Backend Issue #3:

Title: Create Platform Statistics Aggregation Service

Description:
Build a service to aggregate and serve platform statistics for display on the landing page (total markets, volume, users, etc.).

Requirements:

  • GET /api/v1/stats endpoint
  • Aggregate statistics from smart contract:
    • Total markets created
    • Total trading volume
    • Active markets count
    • Total users/wallets
    • Total bets placed
  • Implement caching (Redis) with TTL
  • Schedule periodic updates (cron job)
  • Handle blockchain RPC failures gracefully
  • Return cached data if blockchain unavailable
  • Add historical data tracking
  • Implement data validation

Acceptance Criteria:

  • Endpoint returns accurate statistics
  • Caching reduces blockchain calls
  • Updates run on schedule
  • Graceful error handling
  • Response time < 200ms

Technical Notes:
typescript
GET /api/v1/stats
Response: {
totalMarkets: number,
totalVolume: string,
activeMarkets: number,
totalUsers: number,
lastUpdated: string
}
[ ] git checkout -b features/issue-3- Platform Statistics API

  • Pr Request create your pr against develop branch

Labels: backend, api, statistics, high-priority

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