---
updatedAt: 2026-04-22T18:05:56.000Z
agentTools:
  siteIndex: https://developers.pismo.io/llms.txt
  projectIndex: https://developers.pismo.io/pismo-docs/llms.txt
---

# Get average balance

Get an already calculated average balance for an account.


# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Banking - Interest-bearing accounts",
    "version": "1.0.0",
    "description": "API for interest-bearing account functionality",
    "contact": {
      "name": "API Support",
      "url": "https://developers.pismo.io/support/"
    },
    "license": {
      "name": "Copyright Pismo"
    }
  },
  "servers": [
    {
      "url": "https://sandbox.pismolabs.io/savings-products",
      "description": "Sandbox API server for testing"
    }
  ],
  "tags": [
    {
      "name": "Average balance",
      "description": "Endpoints that enable calculating average balances for an account"
    }
  ],
  "components": {
    "parameters": {
      "accountIdentifier": {
        "description": "Account ID. Accepts either the Pismo `account_id` or your `external_account_id`. Send the same ID used to generate the access token.\n",
        "in": "path",
        "name": "accountId",
        "required": true,
        "schema": {
          "type": "string",
          "maxLength": 60
        },
        "example": "123456"
      },
      "idempotencyHeader": {
        "name": "idempotency",
        "in": "header",
        "schema": {
          "type": "string"
        },
        "required": true,
        "description": "A unique identifier for the request. If you need to retry a request, use the same idempotency key to avoid creating duplicate resources.\n",
        "example": "123e4567-e89b-12d3-a456-426614174000"
      }
    },
    "schemas": {
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Error type code",
            "example": "EIBACC0003"
          },
          "details": {
            "type": "string",
            "description": "Error details",
            "example": "error EIBACC0008: Validation error [(Field 'Order' is invalid)]"
          },
          "message": {
            "description": "Error message",
            "example": "Bad Request",
            "type": "string"
          }
        }
      },
      "GetAverageBalanceResponse": {
        "type": "object",
        "properties": {
          "account_id": {
            "type": "number",
            "description": "Account ID.",
            "example": 123456
          },
          "external_account_id": {
            "type": "string",
            "description": "External account ID resolved from the account context. Returned when available, including while the calculation status is `PROCESSING`.",
            "example": "ext-acct-001"
          },
          "begin_date_datetime": {
            "type": "string",
            "format": "date-time",
            "description": "The date and time when the calculation begins. The date and time are displayed in RFC 3339 format, for example: `2024-01-28T10:33:01Z`.\n",
            "example": "2024-01-28T10:33:01.000Z"
          },
          "end_date_datetime": {
            "type": "string",
            "format": "date-time",
            "description": "The date and time when the calculation ends. The date and time are displayed in RFC 3339 format, for example: `2024-01-29T10:33:01Z`.\n",
            "example": "2024-01-30T10:33:01.000Z"
          },
          "balance_types_to_calculate": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "AVAILABLE",
                "SAVINGS",
                "HELD_FUNDS"
              ]
            },
            "description": "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>\n* `available`\n* `savings`\n* `held_funds`\n example: [ \"AVAILABLE\", \"SAVINGS\", \"HELD_FUNDS\" ]\n"
          }
        }
      }
    },
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    },
    "responses": {
      "400BadRequest": {
        "description": "Bad request",
        "content": {
          "application/json": {
            "schema": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              ]
            },
            "examples": {
              "invalidRequestBody": {
                "summary": "Bad Request",
                "value": {
                  "code": "EIBACC0008",
                  "message": "Bad Request",
                  "details": "error EIBACC0008: Validation error [(Field 'Order' is invalid)]"
                }
              }
            }
          }
        }
      },
      "404NotFound": {
        "description": "Bad request",
        "content": {
          "application/json": {
            "schema": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              ]
            },
            "examples": {
              "invalidRequestBody": {
                "summary": "Bad Request",
                "value": {
                  "code": "EIBACC0064",
                  "message": "Product not found"
                }
              }
            }
          }
        }
      },
      "500InternalServer": {
        "description": "Internal error",
        "content": {
          "application/json": {
            "schema": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              ]
            },
            "examples": {
              "internalProcessingError": {
                "summary": "Internal processing error",
                "value": {
                  "code": "EIBACC0007",
                  "message": "Internal error",
                  "detail": "Internal error"
                }
              }
            }
          }
        }
      }
    }
  },
  "paths": {
    "/v1/accounts/{accountId}/average-balance": {
      "get": {
        "tags": [
          "Average balance"
        ],
        "summary": "Get average balance",
        "description": "Get an already calculated average balance for an account.\n",
        "operationId": "interest-bearing-get-average-balance",
        "parameters": [
          {
            "$ref": "#/components/parameters/idempotencyHeader"
          },
          {
            "$ref": "#/components/parameters/accountIdentifier"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetAverageBalanceResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/404NotFound"
          },
          "500": {
            "$ref": "#/components/responses/500InternalServer"
          }
        }
      }
    }
  },
  "security": [
    {
      "BearerAuth": []
    }
  ]
}
```