Skip to content

Conversation

@mukama
Copy link
Contributor

@mukama mukama commented Feb 12, 2026

Summary

  • Add GET /auth/finance/cost-summary endpoint with energy and operational cost breakdowns
  • Support period param for daily/monthly/yearly aggregation
  • Support site param for site-specific production costs
  • Fixed cost processing to handle globalDataLib flat object format

Example Queries

Monthly (default):

/auth/finance/cost-summary?start=1735689600000&end=1770898000000

Daily:

/auth/finance/cost-summary?start=1735689600000&end=1770898000000&period=daily

Add cost summary API endpoint that aggregates production costs, BTC
prices, and power consumption to calculate energy and operational cost
breakdowns with period-based aggregation.
- Fix processCostsData to handle flat objects from globalDataLib with daily costs
- Replace direct globalDataLib range query with getProductionCosts helper
- Add site query param to schema, cache key, and handler for site-specific costs
- Update tests to match new cost format
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant