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

# Get treasury balances

> Returns balances by source, now or at an `as_of` date, with freshness information and warnings for unavailable sources.



## OpenAPI

````yaml openapi-public-preview.json GET /v1/reports/treasury-balances
openapi: 3.1.0
info:
  title: Entendre API
  version: 1.0.0
  description: Programmatic access to crypto-native accounting and treasury operations.
servers:
  - url: https://api.entendre.finance
    description: Production API.
security:
  - ApiKey: []
tags:
  - name: Cost Basis
    description: >-
      Read and configure the organization cost-basis method and lot-tracking
      scope.
  - name: Organization
    description: Read your organization profile and find members for agent assignments.
  - name: Transactions
    description: Find transactions, inspect their details and create manual records.
  - name: Sources
    description: >-
      Manage wallets, exchange accounts, bank accounts and other transaction
      sources.
  - name: Assets
    description: Inspect asset acquisitions, remaining quantities and cost basis.
  - name: Journals
    description: >-
      Create and post journal entries, correct eligible entries and sync posted
      journals to a connected general ledger.
  - name: Documents
    description: >-
      Upload documents, check processing status and link supporting evidence to
      transactions.
  - name: Legal Entities
    description: Manage the legal entities used in your accounting records.
  - name: Ledger Accounts
    description: Manage your chart of accounts and find accounts for journal entries.
  - name: Tags
    description: Create and manage tags to classify your records.
  - name: Accruals
    description: >-
      Create and post accruals, inspect their status and reverse eligible
      entries.
  - name: Cash Application
    description: Match deposits to invoices and manage the resulting cash applications.
  - name: Classification
    description: >-
      Classify transactions in a batch, post eligible entries and inspect the
      results.
  - name: Revaluation
    description: Run asset revaluations for an accounting period and check their results.
  - name: Accounting Periods
    description: Check whether a period is ready to close, then close or reopen it.
  - name: Income Statement
    description: View revenue, expenses and net income for a reporting period.
  - name: Balance Sheet
    description: View assets, liabilities and equity as of a reporting date.
  - name: Trial Balance
    description: Review ledger account balances and debit and credit totals.
  - name: Closing Positions
    description: View asset positions at the end of a reporting period.
  - name: Treasury Balances
    description: Review treasury balances by asset and source.
  - name: Realized Gains & Losses
    description: Review realized gains and losses from asset dispositions.
  - name: Asset Tax Lots
    description: Inspect asset tax lots, remaining quantities and cost basis.
  - name: Schedule of Dispositions
    description: >-
      Review asset dispositions and their proceeds, cost basis and gains or
      losses.
  - name: Financial Insights
    description: Review financial insights for your selected reporting context.
  - name: Agents
    description: Create agents, schedule their work and inspect their runs.
  - name: Memory
    description: Read, search and maintain the memory files your agents use.
  - name: Connections
    description: Connect providers, manage authorization and disconnect.
  - name: GL Mapping
    description: >-
      Map ledger accounts and legal entities to your ERP. Import legal entities,
      tags and chart of accounts.
  - name: Request
    description: Request information, documents or connections from a client.
  - name: Client
    description: Manage your firm’s client relationships.
  - name: Team
    description: Invite team members and manage their access to your firm.
  - name: Settings
    description: Read and update your firm settings.
  - name: Purpose Accounts
    description: >-
      Read accounting purpose assignments and set the realized gain or loss
      account.
externalDocs:
  description: Versioning, deprecation, and rate-limit policy
  url: https://entendre.ai/docs/get-started/versioning
paths:
  /v1/reports/treasury-balances:
    get:
      tags:
        - Treasury Balances
      summary: Get treasury balances
      description: >-
        Return treasury balances for now or an `as_of` date, grouped by source
        with each source’s tokens. For now, wallet and bank balances come from
        the last stored refresh: this operation never calls a provider. Start a
        refresh with `POST /v1/reports/treasury-balances/refresh` and read
        `context.refresh` for its progress. Every connected source has a row,
        and a source that holds nothing has `total_fiat` `"0.00"`. A source that
        cannot be read or valued has `availability` `unavailable`, a null
        `total_fiat`, and row `warnings`. Read `context.total_fiat_status`
        before you treat `context.total_fiat` as complete. Historical coverage
        varies by source; read `context.warnings` for data that no single source
        explains. The only supported basis is `live`. For posted ledger
        balances, use the balance sheet or trial balance report. If some sources
        fail, the response returns HTTP 200 and identifies those sources in
        `context.warnings`.
      operationId: get_treasury_balances
      parameters:
        - name: currency
          in: query
          required: false
          description: >-
            Ignored. All figures are in USD, and `context.currency` is always
            `USD`.
          schema:
            type: string
            example: USD
        - name: include_zero
          in: query
          required: false
          description: >-
            Set to `true` to include zero balances. By default, zero and very
            small balances are hidden.
          schema:
            type: boolean
            default: false
        - name: as_of
          in: query
          required: false
          description: >-
            Date of a past position (YYYY-MM-DD). Omit for the live position.
            Bank balances are not included for a past date. Future dates return
            HTTP 400.
          schema:
            type: string
            format: date
            example: '2026-08-31'
        - name: basis
          in: query
          required: true
          description: Only `live` is supported.
          schema:
            type: string
            enum:
              - live
        - name: legal_entity_ids
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
              description: Legal entity ID (`le_…`).
            minItems: 1
            maxItems: 100
          description: Legal entities to include.
          style: form
          explode: true
        - name: financial_account_ids
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
              description: Source ID (`fac_…`).
            minItems: 1
            maxItems: 100
          description: >-
            Wallet and Plaid source IDs. For exchanges, use
            `exchange_source_ids`.
          style: form
          explode: true
        - name: exchange_source_ids
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
              description: Exchange source ID (`exs_…`).
            minItems: 1
            maxItems: 100
          description: Legal entities to include.
          style: form
          explode: true
        - name: addresses
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
            minItems: 1
            maxItems: 100
          description: On-chain filter. It does not filter bank or exchange balances.
          style: form
          explode: true
        - name: chains
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
            minItems: 1
            maxItems: 100
          description: On-chain filter. It does not filter bank or exchange balances.
          style: form
          explode: true
      responses:
        '200':
          description: >-
            The request succeeded. Sources that could not be read are listed in
            `context.warnings`.
          headers:
            X-Request-Id:
              description: Support correlation ID.
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/TreasuryBalance'
                    description: The records.
                  context:
                    type: object
                    properties:
                      requested_at:
                        type: string
                        format: date-time
                        description: Time of the request.
                      as_of:
                        type:
                          - string
                          - 'null'
                        description: >-
                          Echo of the requested `as_of`, or null for a live
                          position.
                      data_as_of:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        description: >-
                          Oldest provider update time across the returned rows;
                          null when unknown or empty.
                      currency:
                        type: string
                        example: USD
                        description: Currency of the values.
                      basis:
                        type: string
                        enum:
                          - live
                        description: Balance basis of the report.
                      total_fiat:
                        type:
                          - string
                          - 'null'
                        example: '790280.42'
                        description: >-
                          Total value of the available rows in `currency`
                          (decimal string). Null when `total_fiat_status` is
                          `unavailable`.
                      refresh:
                        type:
                          - object
                          - 'null'
                        description: >-
                          Progress of the stored read; null for an `as_of` read.
                          A refresh covers every request numbered at or below
                          `completed_seq` (success) or `failed_seq` (failure).
                        properties:
                          requested_seq:
                            type: integer
                            description: Refresh requests accepted so far.
                          completed_seq:
                            type: integer
                            description: Highest request covered by a successful refresh.
                          failed_seq:
                            type: integer
                            description: Highest request covered by a failed refresh.
                          refreshing:
                            type: boolean
                            description: >-
                              A request is not yet covered by a finished
                              refresh.
                          refreshing_since:
                            type:
                              - string
                              - 'null'
                            format: date-time
                            description: >-
                              Start of the running refresh, or the time of the
                              oldest request that no refresh has picked up.
                          pending_since:
                            type:
                              - string
                              - 'null'
                            format: date-time
                            description: >-
                              Time of the oldest request that no refresh has
                              picked up.
                          running_since:
                            type:
                              - string
                              - 'null'
                            format: date-time
                            description: >-
                              Start of the refresh that runs now. Null when no
                              refresh runs.
                          last_succeeded_at:
                            type:
                              - string
                              - 'null'
                            format: date-time
                            description: End of the last successful refresh.
                        required:
                          - requested_seq
                          - completed_seq
                          - failed_seq
                          - refreshing
                          - refreshing_since
                          - pending_since
                          - running_since
                          - last_succeeded_at
                      total_fiat_status:
                        type: string
                        enum:
                          - complete
                          - partial
                          - unavailable
                        description: >-
                          `complete` when no source failed. `partial` when some
                          sources failed and others have a value. `unavailable`
                          when no source has a value and at least one failed.
                      total_fiat_change:
                        type:
                          - object
                          - 'null'
                        description: >-
                          Change of the total since the oldest daily snapshot of
                          the last 30 days (today excluded) that covers today's
                          total. A compared source is available now and was
                          available on that day; with `legalEntityIds`, it is in
                          a selected legal entity on both days. A day qualifies
                          only when its compared sources hold at least 90% of
                          the absolute value of today's available total. Null
                          when no day qualifies, for an `as_of` request, with
                          `chains` or `addresses` (a daily snapshot holds whole
                          sources), or when the history cannot be read. A daily
                          snapshot holds the figures of the last successful
                          refresh run that started on that UTC day.
                        properties:
                          previous_as_of:
                            type: string
                            format: date-time
                            description: Start of the UTC day of the compared snapshot.
                          previous_total_fiat:
                            type: string
                            description: >-
                              Total of the compared sources on that day (decimal
                              string).
                          current_total_fiat:
                            type: string
                            description: >-
                              Total of the same sources now (decimal string). It
                              can differ from `total_fiat`, which also counts
                              the sources that are not compared.
                          change_percentage:
                            type:
                              - string
                              - 'null'
                            example: '4.21'
                            description: >-
                              Change from `previous_total_fiat` to
                              `current_total_fiat`, in percent of the absolute
                              previous total, to 2 decimal places. Null when
                              `previous_total_fiat` is zero.
                          source_count:
                            type: integer
                            description: Number of compared sources.
                        required:
                          - previous_as_of
                          - previous_total_fiat
                          - current_total_fiat
                          - change_percentage
                          - source_count
                      warnings:
                        type: array
                        items:
                          $ref: '#/components/schemas/TreasuryBalancesWarning'
                        description: Sources that could not be read.
                    required:
                      - requested_at
                      - as_of
                      - data_as_of
                      - currency
                      - basis
                      - total_fiat
                      - total_fiat_status
                      - total_fiat_change
                      - warnings
                      - refresh
                    description: Report context.
                  bank_balances:
                    type: array
                    items:
                      $ref: '#/components/schemas/BankCashBalance'
                    description: Bank balances.
                required:
                  - data
                  - context
                  - bank_balances
                additionalProperties: false
              example:
                data:
                  - source_id: fac_507f1f77bcf86cd799439011
                    source_class: crypto
                    chain: eth
                    provider: null
                    alias: Entendre Finance Safe
                    entity_name: Entendre Finance Inc.
                    legal_entity_id: le_507f1f77bcf86cd799439011
                    total_fiat: '100.00'
                    tokens:
                      - symbol: ETH
                        balance: '0.05'
                        fiat_value: '100.00'
                        is_native: true
                    as_of: '2026-08-31T12:00:00Z'
                    basis: live
                    availability: available
                    warnings: []
                context:
                  requested_at: '2026-08-31T12:00:05Z'
                  as_of: null
                  data_as_of: '2026-08-31T12:00:00Z'
                  currency: USD
                  basis: live
                  total_fiat: '100.00'
                  total_fiat_status: complete
                  total_fiat_change: null
                  warnings: []
                  refresh:
                    requested_seq: 3
                    completed_seq: 3
                    failed_seq: 0
                    refreshing: false
                    refreshing_since: null
                    pending_since: null
                    running_since: null
                    last_succeeded_at: '2026-08-31T12:00:00Z'
                bank_balances: []
        '400':
          description: >-
            The request is invalid. `error.fields` lists the fields to correct.
            Nothing was changed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: VALIDATION_ERROR
                  message: Invalid path, query or request body.
                  request_id: req_example
        '401':
          description: The API key is missing, invalid or expired.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: UNAUTHORIZED
                  message: Invalid or expired API Key
                  request_id: req_example
                  suggested_action: >-
                    Send an API key in X-API-Key, or an OAuth access token as
                    Authorization: Bearer. Refresh an expired access token.
                  documentation_url: https://entendre.ai/docs/get-started/authentication
          headers:
            WWW-Authenticate:
              $ref: '#/components/headers/WWW-Authenticate'
        '403':
          description: >-
            The API key does not have the required scope or is not associated
            with a user, or the action needs a review in the dashboard.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: FORBIDDEN
                  message: Insufficient access to organization
                  request_id: req_example
        '404':
          description: The resource does not exist, or your organization cannot access it.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: RESOURCE_NOT_FOUND
                  message: Resource not found
                  request_id: req_example
        '429':
          description: >-
            Too many requests. If the response has a `Retry-After` header, wait
            that many seconds before you retry. Otherwise, read `error.message`.
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
                minimum: 1
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: RATE_LIMITED
                  message: Rate limit exceeded. Retry after 30s.
                  request_id: req_example
        '500':
          description: >-
            An unexpected error occurred. A write can still have taken effect;
            check the resource before you retry. Give the `request_id` to
            support.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: INTERNAL_ERROR
                  message: Internal server error
                  request_id: req_example
        '503':
          description: >-
            A service that this operation needs is unavailable. If the response
            has a `Retry-After` header, wait that many seconds. Check for
            earlier accepted work before you send the request again.
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
                minimum: 1
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: SERVICE_UNAVAILABLE
                  message: Service unavailable.
                  request_id: req_example
components:
  schemas:
    TreasuryBalance:
      type: object
      description: >-
        One source group: a wallet, an exchange account, or a bank account, with
        its tokens nested.
      properties:
        source_id:
          type:
            - string
            - 'null'
          description: >-
            Source ID (`fac_…`) of the wallet, exchange account or bank account.
            `null` when the source has no stored ID.
        source_class:
          type: string
          enum:
            - crypto
            - exchange
            - bank
          description: '`crypto`, `exchange` or `bank`.'
        chain:
          type:
            - string
            - 'null'
          description: Blockchain network, for a wallet.
        provider:
          type:
            - string
            - 'null'
          description: Bank institution name or exchange type; null for a crypto wallet.
        alias:
          type:
            - string
            - 'null'
          description: Display name of the source.
        entity_name:
          type:
            - string
            - 'null'
          description: Legal entity name.
        legal_entity_id:
          type:
            - string
            - 'null'
          description: Legal entity ID (`le_…`).
        total_fiat:
          type:
            - string
            - 'null'
          description: >-
            Sum of this source's token fiat values. `"0.00"` for a source that
            holds nothing. Null when `availability` is `unavailable`.
        tokens:
          type: array
          items:
            $ref: '#/components/schemas/TreasuryBalanceToken'
          description: Balances by token.
        as_of:
          type:
            - string
            - 'null'
          description: >-
            When this source's figures were read: for a wallet, the start of the
            refresh that read it; for a bank, the time the bank last updated the
            balance; for an exchange, the snapshot time. Null when unknown or
            unavailable.
          format: date-time
          example: '2026-08-31T12:00:00Z'
        basis:
          type: string
          enum:
            - live
          description: Always `live`.
        availability:
          type: string
          description: >-
            `unavailable` when the source could not be read or valued. Its
            `total_fiat` is null and its `tokens` is empty.
          enum:
            - available
            - unavailable
        warnings:
          type: array
          items:
            $ref: '#/components/schemas/TreasuryBalanceRowWarning'
          description: Why the source is unavailable. Empty for an available source.
      required:
        - source_class
        - chain
        - total_fiat
        - tokens
        - availability
        - warnings
    TreasuryBalancesWarning:
      type: object
      properties:
        source:
          type: string
          enum:
            - on_chain_tokens
            - exchanges
            - bank_accounts
          description: Which balances are affected.
        reason:
          type: string
          enum:
            - upstream_error
            - not_supported_yet
            - no_snapshot
            - refresh_failed
          description: >-
            Why the balances are missing or incomplete. `refresh_failed`: the
            last refresh could not read them, so they show an earlier read.
        message:
          type: string
          description: Explanation of the warning.
        fallback_hint:
          type: string
          description: What to do instead.
      required:
        - source
        - reason
        - message
        - fallback_hint
    BankCashBalance:
      type: object
      properties:
        accountId:
          type: string
          description: Bank account ID.
        current:
          type:
            - string
            - 'null'
          description: Current balance (decimal string).
        available:
          type:
            - string
            - 'null'
          description: Available balance (decimal string).
        currency:
          type:
            - string
            - 'null'
          description: Account currency.
        usdValue:
          type:
            - string
            - 'null'
          description: Current balance in USD (decimal string).
        providerUpdatedAt:
          type:
            - string
            - 'null'
          format: date-time
          description: Time the bank last updated the balance.
        retrievedAt:
          type:
            - string
            - 'null'
          format: date-time
          description: Time Entendre read the balance.
        connectionStatus:
          type:
            - string
            - 'null'
          description: Status of the bank connection.
        valuationGap:
          type:
            - string
            - 'null'
          enum:
            - balance_unavailable
            - currency_unavailable
            - fx_unavailable
            - connection_unavailable
            - null
          description: Why the USD value is missing, or `null`.
      required:
        - accountId
        - current
        - available
        - currency
        - usdValue
        - providerUpdatedAt
        - retrievedAt
        - connectionStatus
        - valuationGap
      additionalProperties: false
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
            - request_id
          properties:
            code:
              type: string
              description: Machine-readable error code.
            message:
              type: string
              description: Technical description for developers.
            fields:
              type: object
              additionalProperties:
                type: string
              description: >-
                Present only on VALIDATION_ERROR. Maps failing field paths to
                reason strings.
            details:
              type: object
              additionalProperties: true
              description: >-
                Optional redacted diagnostic details. Request validation uses
                fields or field_errors.
            suggested_action:
              type: string
              description: A suggested next step.
            documentation_url:
              type: string
              format: uri
              description: Link to documentation about this error.
            request_id:
              type: string
              description: Unique request ID for support escalation.
          description: Error details.
    TreasuryBalanceToken:
      type: object
      properties:
        symbol:
          type: string
          description: Token symbol.
        balance:
          type: string
          description: Quantity held (decimal string).
        fiat_value:
          type: string
          description: Value in USD (decimal string).
        is_native:
          type: boolean
          description: '`true` for the native token of the chain.'
      required:
        - symbol
        - balance
        - fiat_value
        - is_native
    TreasuryBalanceRowWarning:
      type: object
      properties:
        reason:
          type: string
          enum:
            - upstream_error
            - valuation_gap
            - missing_from_fetch
          description: Why the source is unavailable.
        message:
          type: string
          description: Explanation of the warning.
        fallback_hint:
          type: string
          description: What to do instead.
      required:
        - reason
        - message
        - fallback_hint
  headers:
    WWW-Authenticate:
      description: >-
        Bearer challenge with `realm="entendre"` and `resource_metadata`, the
        URL of the protected-resource metadata (RFC 9728).
        `error="invalid_token"` is added when the credential that was sent is
        invalid or expired.
      schema:
        type: string
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        Your organization API key. See
        [Authentication](/get-started/authentication).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.