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

> ## Agent Instructions
> Money amounts are always major-unit decimal strings (e.g. "1000.00"), never floats and never minor units, in every request, response, and webhook payload.
> Authentication is OAuth 2.0 client credentials: exchange the Client ID and Client Secret at the Token URL for a 24-hour JWT and cache it; do not request a token per call.
> Set a unique clientRef on every money-moving request; it is the idempotency key, and retries return the original resource.
> Quotes are single-use, intent-locked, and expire fast: always read expiresAt, consume the quote with the executor matching its intent, and re-quote on expiry instead of retrying.
> Prefer webhooks over polling for payout, order, and deposit status tracking.
> Use the sandbox (api.sandbox.zuba.com) with its deterministic magic values before touching production.

# Get closing balances across all currencies for a past date

> Returns the end-of-day closing balance for each of your accounts as of the given UTC calendar date. The date must be in the past (yesterday or earlier); today and future dates are rejected because today is not yet closed. Backed by daily balance snapshots with transaction-replay fallback for dates without a snapshot.



## OpenAPI

````yaml /openapi.json get /v1/ledger/closing-balances
openapi: 3.0.0
info:
  contact: {}
  description: >-
    Comprehensive payment platform API supporting fiat and crypto payments,
    currency conversion, and compliance management
  title: Zuba Payment Platform API
  version: '1.0'
servers: []
security: []
tags:
  - description: Manage M2M API keys and credentials
    name: API Keys
  - description: Internal ledger accounts and transactions
    name: Ledger
  - description: Handle incoming payments and deposits
    name: Pay-ins
  - description: Manage payouts, beneficiaries, and SEPA transfers
    name: Payouts
  - description: Manage outbound webhook endpoints and deliveries
    name: Webhooks
paths:
  /v1/ledger/closing-balances:
    get:
      tags:
        - Ledger
      summary: Get closing balances across all currencies for a past date
      description: >-
        Returns the end-of-day closing balance for each of your accounts as of
        the given UTC calendar date. The date must be in the past (yesterday or
        earlier); today and future dates are rejected because today is not yet
        closed. Backed by daily balance snapshots with transaction-replay
        fallback for dates without a snapshot.
      operationId: LedgerController_getClosingBalances
      parameters:
        - description: >-
            Optional. Names an owned sub-account (UUID) to act on. Omit to act
            at the master (tenant) level. Naming an account this key does not
            own returns 403 not_account_owner.
          in: header
          name: Zuba-Account-Id
          required: false
          schema:
            format: uuid
            type: string
        - description: UTC calendar date in YYYY-MM-DD format. Must be in the past.
          in: query
          name: date
          required: true
          schema:
            example: '2026-05-13'
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/ClosingBalanceDto'
                type: array
          description: Closing balances retrieved successfully.
        '400':
          description: Invalid or non-past date.
        '401':
          description: Unauthorized - missing or invalid JWT token
        '403':
          description: >-
            not_account_owner: the requested account is not accessible with this
            key.
        '500':
          description: Internal Server Error
      security:
        - bearer: []
components:
  schemas:
    ClosingBalanceDto:
      properties:
        accountId:
          description: Account UUID
          example: 123e4567-e89b-12d3-a456-426614174000
          type: string
        closingBalance:
          description: Closing balance for the requested date (decimal string)
          example: '1500.50'
          type: string
        currency:
          description: ISO 4217 currency code
          example: EUR
          type: string
        date:
          description: Echo of the requested date (YYYY-MM-DD, UTC)
          example: '2026-05-13'
          type: string
      required:
        - accountId
        - currency
        - closingBalance
        - date
      type: object
  securitySchemes:
    bearer:
      bearerFormat: JWT
      description: Enter Auth0 JWT token
      scheme: bearer
      type: http

````