Skip to main content

Returns a view of the authenticated user's wallet history with a running balance, plus overall balance and refill thresholds.

GET 

/wallet/history

Implementation details:

  • Base query filters UserWallet rows by the current user's UserId and uses AsNoTracking().
  • Overall balance is computed as SUM(Balance) across all the user's entries.
  • For windowed queries: filters by Updated between rangeFrom and rangeTo (inclusive). If no window is specified, selects the last 10 by Updated (DESC).
  • To compute the running balance, materializes the visible window ascending by Updated, computes an opening balance as the sum of all entries before the first day in the window (UTC), then projects each row with cumulative Running.
  • Results are returned newest-first (Created DESC).

Intended for authenticated clients; suitable for history views and lightweight polling.

Request

Responses

OK