v1

latestOpenAPI 3.1.0Copyright Pismo2026-07-247702,7523.1 MB
Average balance

Calculate average balance

Calculate an average balance for an account.<br> Using this endpoint, you can specify a datetime range and calculate the average balance of an account over that period. This involves multiplying the balance by the number of days it has remained unchanged, summing the results, and then dividing them by the total number of days in the specified period.

post/v1/accounts/{accountId}/average-balance

Path parameters

accountIdinteger required

Account ID

Headers

x-idempotency-keystring

A unique identifier to ensure the operation remains idempotent, allowing for operation repetition without causing unintended effects or duplication. An idempotent operation is one that can be applied multiple times, yet the outcome remains the same. it ensures that network errors, retries, or failures can occur without introducing inconsistencies. 36 chars max.

Request body

account_idnumber

Account identifier.

begin_date_datetimestring date-time

The specified datetime when the average balance calculation begins. The datetime is displayed in the RFC 3339 format; for example: 2024-01-28T10:33:01Z.

end_date_datetimestring date-time

The specified datetime when the average balance calculation ends. The datetime is displayed in the RFC 3339 format; for example: 2024-01-29T10:33:01Z.

balance_types_to_calculatestring[]

Choose a balance to calculate its average balance, you can select multiple balance types to calculate their average balances simultaneously. The balance types are:<br>

  • available
  • savings
  • held_funds

Example request

{
  "account_id": 123456,
  "begin_date_datetime": "2024-01-28T10:33:01.000Z",
  "end_date_datetime": "2024-01-30T10:33:01.000Z",
  "balance_types_to_calculate": [
    "available",
    "savings",
    "held_funds"
  ]
}

Response

Accepted

account_idnumber

Account ID.

idempotency_keystring

Idempotency key.

status'PROCESSING' | 'COMPLETE'

Status of the average balance calculation request.

messagestring

Message.

Example response

{
  "account_id": 123456,
  "idempotency_key": "123e4567-e89b-12d3-a456-xyz",
  "message": "Request is under progress"
}