Create an API endpoint to calculate and aggregate the total available fiat balance across all connected bank accounts for the organization.
Contribution Guide
- PRs go to the dev branch, not main
- Please application must explain a short specific approach to this task
- PR description must clearly describe what you built and changed
- Link your PR to the correct issue number
Implementation Guidelines
- Key files:
src/app/api/v1/dashboard/balance/route.ts, src/server/services/finance.service.ts
- Create a
GET method that fetches all active bank accounts tied to the user's organization.
- Sum the balances (handling currency conversions if necessary, or assuming single currency).
- Return the aggregated total and a breakdown per account.
Expectations
- What done looks like: The endpoint successfully returns a combined fiat balance that correctly mirrors the sum of the individual accounts in the database.
- Discord for questions: codeze_us
Create an API endpoint to calculate and aggregate the total available fiat balance across all connected bank accounts for the organization.
Contribution Guide
Implementation Guidelines
src/app/api/v1/dashboard/balance/route.ts,src/server/services/finance.service.tsGETmethod that fetches all active bank accounts tied to the user's organization.Expectations