# Get average daily balance for an account Fetches the average of daily end-of-day balance for the specified account and date range. A maximum of one year can be provided as date range. If the account has no balance for a given day because for example it was opened after the OR closed before , those days will have end-of-day balance as . If is in the future, those days' balance is equal to the latest balance. It is recommended to present the average balance to the Customer as Yearly for past years and Year to Date for current year. Endpoint: GET /v1/accounts/{account_id}/average_daily_balance Version: 1.0 ## Path parameters: - `account_id` (string, required) Unique identifier to an account. Example: "e48c29b85992b8772eb7ddd518490920cacc" ## Query parameters: - `start_date` (string, required) Starting date (inclusive) for balance calculation Example: "2020-01-31" - `end_date` (string, required) End date (inclusive) for balance calculation Example: "2020-12-31" ## Response 200 fields (application/json): - `acccount_id` (string) Example: "e48c29b85992b8772eb7ddd518490920cacc" - `average_daily_balance` (object) - `average_daily_balance.value` (integer) Amount in cents Example: 2000 - `average_daily_balance.unit` (string) Money unit - cents Example: "cents" - `average_daily_balance.currency` (string) Currency - 'EUR' Example: "EUR" ## Response 400 fields (application/json): - `id` (string) Example: "a95f2aaf-4e0c-4d49-8021-8a16a884ed86" - `status` (string) Example: "400" - `code` (string) Example: "build_pagination_headers_failure" - `title` (string) Example: "Failed to build pagination headers." - `detail` (string) Example: "Cannot connect to database." ## Response 404 fields (application/json): - `id` (string) Example: "a95f2aaf-4e0c-4d49-8021-8a16a884ed86" - `status` (string) Example: "404" - `code` (string) Example: "model_not_found" - `title` (string) Example: "Model Not Found" - `detail` (string) Example: "Couldn't find 'Account' for id 'DE24112233445566'." ## Response 500 fields (application/json): - `id` (string) Example: "e8915041-9d8c-4d96-9dd1-04e8522ecdbf" - `status` (string) Example: "500" - `code` (string) Example: "generic_error" - `title` (string) Example: "Generic Error" - `detail` (string) Example: "There was an error."