Skip to content

Add wallet balance history endpoint #84

Description

@Akatenvictor

What

Add a user wallet balance history endpoint that returns a chronological list of balance changes with transaction details.

Why

Artists and users need a clear audit trail of their wallet activity. Currently there is no way to view historical balance changes through the API.

Scope

  • In: Balance history endpoint with pagination, transaction type filtering, date range filtering
  • Out: Export to CSV/PDF, balance projections, multi-token support

Acceptance Criteria

  • GET /api/wallet/history returns chronological balance changes
  • Filter by transaction type: payout, purchase, upload reward
  • Filter by date range (from, to query params)
  • Pagination with page and limit params
  • Each entry includes: amount, type, description, timestamp, related song/album ID
  • Response includes running balance calculation

Technical Context

  • WalletController in src/controllers/ for history endpoint
  • WalletService logic or new WalletHistoryService in src/services/
  • TransactionLog entity in src/entities/TransactionLog is the data source
  • TransactionLogService in src/services/TransactionLogService for querying
  • walletRoutes in src/routes/ for route registration

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions