> ## Documentation Index
> Fetch the complete documentation index at: https://developers.thinkout.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get balances

> Every account's balance and the workspace total, in one call.

Balances are historical only. A balance is the account's opening balance plus the
signed amounts of its transactions up to the end of `as_of`, so a future `as_of` is
rejected rather than answered with today's figure wearing a future date. For a
forward-looking position, render a cash flow view of type `balances`, which projects
planned movements and reports them separately from actuals.

Conversion here differs from the summaries, deliberately. An account holds one
currency, so its whole balance converts at a single rate for `as_of`, answering what
the position is worth then. A transaction summary converts each movement at its own
date, answering what each cost at the time.




## OpenAPI

````yaml /openapi/v1.yaml get /balances
openapi: 3.1.0
info:
  title: ThinkOut API
  version: '1.0'
  description: >
    Programmatic access to the data of a ThinkOut workspace.


    Every endpoint in version 1 is a `GET`. Lists share one response envelope,
    and page

    with a cursor wherever the list can grow.


    Version 1 changes additively. New endpoints, new optional parameters, new
    response

    fields and new enum values can appear at any time, so tolerate unknown
    fields and

    never treat an enum as a closed set.
  contact:
    name: ThinkOut developer support
    url: https://developers.thinkout.io/guides/support
servers:
  - url: https://api.thinkout.io/v1
security:
  - apiKey: []
tags:
  - name: Banks
    description: The workspace's bank connections and the state of each one.
  - name: Accounts
    description: Manual, bank-synced and delegated accounts with computed balances.
  - name: Transactions
    description: Booked and pending movements on the workspace's accounts.
  - name: Categories
    description: The workspace category tree, split by direction and business activity.
  - name: Counterparties
    description: Customers and suppliers that transactions and forecasts are attributed to.
  - name: Labels
    description: Free-form tags grouped by label type.
  - name: Forecasts
    description: Planned inflows and outflows and the transactions that realised them.
  - name: Reports
    description: >-
      Totals rather than rows. Summaries over transactions and forecasts, and
      the workspace's own saved cash flow views.
paths:
  /balances:
    get:
      tags:
        - Reports
      summary: Get balances
      description: >
        Every account's balance and the workspace total, in one call.


        Balances are historical only. A balance is the account's opening balance
        plus the

        signed amounts of its transactions up to the end of `as_of`, so a future
        `as_of` is

        rejected rather than answered with today's figure wearing a future date.
        For a

        forward-looking position, render a cash flow view of type `balances`,
        which projects

        planned movements and reports them separately from actuals.


        Conversion here differs from the summaries, deliberately. An account
        holds one

        currency, so its whole balance converts at a single rate for `as_of`,
        answering what

        the position is worth then. A transaction summary converts each movement
        at its own

        date, answering what each cost at the time.
      operationId: getBalances
      parameters:
        - $ref: '#/components/parameters/as_of'
        - $ref: '#/components/parameters/currency'
      responses:
        '200':
          description: Balances per account and in total.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Balances'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  parameters:
    as_of:
      name: as_of
      in: query
      description: >
        Compute balances as of the end of this day. Defaults to today in UTC. A
        future date

        is rejected, because a balance is only ever historical.
      schema:
        type: string
        format: date
    currency:
      name: currency
      in: query
      description: >
        Currency to report totals in. Defaults to the workspace currency. The
        `conversion`

        object on the response says whether conversion happened and on what
        basis.
      schema:
        $ref: '#/components/schemas/Currency'
  schemas:
    Balances:
      type: object
      required:
        - object
        - as_of
        - conversion
        - total
        - accounts
      properties:
        object:
          type: string
          const: balances
        as_of:
          type: string
          format: date
          description: The day whose end-of-day position is reported.
        conversion:
          $ref: '#/components/schemas/Conversion'
        total:
          $ref: '#/components/schemas/Money'
          description: Every account added together, in the requested currency.
        accounts:
          type: array
          items:
            $ref: '#/components/schemas/AccountBalance'
    Currency:
      type: string
      description: ISO 4217 alphabetic currency code.
      pattern: ^[A-Z]{3}$
      example: RON
    Conversion:
      type: object
      description: What was done to make amounts comparable.
      required:
        - applied
        - currency
        - basis
      properties:
        applied:
          type: boolean
          description: '`false` when every amount was already in `currency`.'
        currency:
          $ref: '#/components/schemas/Currency'
        basis:
          type: string
          description: >
            `transaction_date` converts each movement at the rate for its own
            date, which is

            what totals over movements use. `balance_date` converts a whole
            balance at one

            rate, which is what balances use because an account holds a single
            currency.
          enum:
            - transaction_date
            - balance_date
            - none
    Money:
      type: string
      description: >
        Decimal amount as a string. Signed on transactions, forecasts and report
        figures,

        where negative means an outflow. The sign is authoritative: `direction`
        is derived

        from it and the two can never disagree.
      pattern: ^-?[0-9]+(\.[0-9]+)?$
      example: '-1250.00'
    AccountBalance:
      type: object
      required:
        - account_id
        - name
        - native_currency
        - native_balance
        - balance
      properties:
        account_id:
          type: string
          format: uuid
        name:
          type: string
          example: ING Curent
        native_currency:
          $ref: '#/components/schemas/Currency'
        native_balance:
          $ref: '#/components/schemas/Money'
          description: The balance in the account's own currency, unconverted.
        balance:
          $ref: '#/components/schemas/Money'
          description: The same balance in the requested currency.
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - type
            - code
            - message
            - param
            - request_id
          properties:
            type:
              type: string
              enum:
                - invalid_request
                - authentication
                - not_found
                - rate_limit
                - server
            code:
              type: string
              description: >
                Stable machine-readable reason. Branch on this, not on
                `message`.

                Report-specific codes are `too_many_groups`, `period_too_long`,

                `as_of_in_future` and `invalid_expand`.
            message:
              type: string
              description: Human-readable explanation. Wording may change.
            param:
              type:
                - string
                - 'null'
              description: The query or path parameter at fault, when there is one.
            request_id:
              type: string
              description: Quote this when contacting support.
  responses:
    BadRequest:
      description: A parameter is invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              type: invalid_request
              code: invalid_parameter
              message: Parameter 'from' must be a date in YYYY-MM-DD format.
              param: from
              request_id: req_01J8ZT4Q7Y6M3K
    Unauthorized:
      description: The API key is missing, unknown or revoked.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              type: authentication
              code: unauthorized
              message: Invalid API key.
              param: null
              request_id: req_01J8ZT4Q7Y6M3K
    RateLimited:
      description: Too many requests. Wait for the number of seconds in `Retry-After`.
      headers:
        Retry-After:
          schema:
            type: integer
          description: Seconds to wait before retrying.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              type: rate_limit
              code: rate_limited
              message: Rate limit exceeded. Retry after 12 seconds.
              param: null
              request_id: req_01J8ZT4Q7Y6M3K
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: >-
        A workspace API key created in ThinkOut settings. One key reads one
        workspace.

````