Skip to content

[FEATURE] Aggregate Total Fiat Balance API #473

@codeZe-us

Description

@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

  • 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

Metadata

Metadata

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions