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

# Get ledger dashboard metrics

> Returns, for the window, the total number of transactions, the count of each status the ledger knows, and the settled volume per asset. Volume sums transaction.amount over SETTLED transactions only — status APPROVED, the only status whose transactions moved money — and is reported PER ASSET with no cross-asset total, because adding two assets together does not produce money. Amounts are exact decimal strings whose scale is not normative; format them with the asset's own exponent and never parse them as a binary float. volumeByAsset is the GROSS settled amount: every settled leg inside the window, reversal legs included. reversalsByAsset is the part of it made of reversal legs, same window and same settled filter. A true net is NOT derivable from the two alone, because it depends on whether each reversed original also falls inside the window; a consumer that needs net reads the transactions.



## OpenAPI

````yaml /es/openapi/v3-current/ledger.yaml get /v1/organizations/{organization_id}/ledgers/{ledger_id}/dashboard/metrics
openapi: 3.1.0
info:
  title: Midaz Ledger API
  version: 4.0.0
servers:
  - url: /
security: []
tags:
  - name: Account Block Exceptions (v2)
  - name: Account Types (v1)
  - name: Account Types (v2)
  - name: Accounts (v1)
  - name: Accounts (v2)
  - name: Asset Rates (v1)
  - name: Assets (v1)
  - name: Assets (v2)
  - name: Balances (v1)
  - name: Balances (v2)
  - name: Billing Calculate (v2)
  - name: Billing Packages (v2)
  - name: Composition (v2)
  - name: Dashboard (v1)
  - name: Dashboard (v2)
  - name: Encryption (v2)
  - name: Fees (v2)
  - name: Holders (v2)
  - name: Instruments (v2)
  - name: Ledgers (v1)
  - name: Ledgers (v2)
  - name: Metadata Indexes (v1)
  - name: Metadata Indexes (v2)
  - name: Operation Routes (v1)
  - name: Operation Routes (v2)
  - name: Operations (v1)
  - name: Operations (v2)
  - name: Organizations (v1)
  - name: Organizations (v2)
  - name: Packages (v2)
  - name: Portfolios (v1)
  - name: Portfolios (v2)
  - name: Protection (v2)
  - name: Segments (v1)
  - name: Segments (v2)
  - name: Transaction Routes (v1)
  - name: Transaction Routes (v2)
  - name: Transactions (v1)
  - name: Transactions (v2)
paths:
  /v1/organizations/{organization_id}/ledgers/{ledger_id}/dashboard/metrics:
    get:
      tags:
        - Dashboard (v1)
      summary: Get ledger dashboard metrics
      description: >-
        Returns, for the window, the total number of transactions, the count of
        each status the ledger knows, and the settled volume per asset. Volume
        sums transaction.amount over SETTLED transactions only — status
        APPROVED, the only status whose transactions moved money — and is
        reported PER ASSET with no cross-asset total, because adding two assets
        together does not produce money. Amounts are exact decimal strings whose
        scale is not normative; format them with the asset's own exponent and
        never parse them as a binary float. volumeByAsset is the GROSS settled
        amount: every settled leg inside the window, reversal legs included.
        reversalsByAsset is the part of it made of reversal legs, same window
        and same settled filter. A true net is NOT derivable from the two alone,
        because it depends on whether each reversed original also falls inside
        the window; a consumer that needs net reads the transactions.
      operationId: getLedgerDashboardMetrics
      parameters:
        - description: Organization ID (UUID)
          in: path
          name: organization_id
          required: true
          schema:
            description: Organization ID (UUID)
            type: string
        - description: Ledger ID (UUID)
          in: path
          name: ledger_id
          required: true
          schema:
            description: Ledger ID (UUID)
            type: string
        - description: >-
            Relative window: 7d, 30d or 90d (default: 30d). Mutually exclusive
            with start_date/end_date.
          explode: false
          in: query
          name: period
          schema:
            description: >-
              Relative window: 7d, 30d or 90d (default: 30d). Mutually exclusive
              with start_date/end_date.
            type: string
        - description: >-
            Window start (RFC3339, inclusive). Requires end_date. Mutually
            exclusive with period.
          explode: false
          in: query
          name: start_date
          schema:
            description: >-
              Window start (RFC3339, inclusive). Requires end_date. Mutually
              exclusive with period.
            type: string
        - description: >-
            Window end (RFC3339, exclusive). Requires start_date. The window may
            not exceed 90 days.
          explode: false
          in: query
          name: end_date
          schema:
            description: >-
              Window end (RFC3339, exclusive). Requires start_date. The window
              may not exceed 90 days.
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LedgerDashboardMetrics'
          description: OK
          headers:
            Cache-Control:
              schema:
                type: string
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LegacyError'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LegacyError'
          description: Internal Server Error
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LegacyError'
          description: Error
      deprecated: true
      security:
        - BearerAuth: []
components:
  schemas:
    LedgerDashboardMetrics:
      additionalProperties: false
      properties:
        byStatus:
          additionalProperties:
            format: int64
            type: integer
          type: object
        reversalsByAsset:
          description: >-
            The part of the gross volume made of reversal legs: settled
            transactions inside the window whose parent_transaction_id is set,
            per asset. A true net is not derivable from volume and reversals
            alone, because it depends on whether each reversed original also
            falls inside the window.
          items:
            $ref: '#/components/schemas/LedgerDashboardAssetVolume'
          type:
            - array
            - 'null'
        total:
          examples:
            - 1420
          format: int64
          type: integer
        updatedAt:
          format: date-time
          type: string
        volumeByAsset:
          items:
            $ref: '#/components/schemas/LedgerDashboardAssetVolume'
          type:
            - array
            - 'null'
        windowEnd:
          format: date-time
          type: string
        windowStart:
          format: date-time
          type: string
      required:
        - total
        - byStatus
        - volumeByAsset
        - reversalsByAsset
        - windowStart
        - windowEnd
        - updatedAt
      type: object
    LegacyError:
      additionalProperties: false
      properties:
        code:
          description: >-
            Stable, machine-readable midaz error code. Identical to the code /v2
            returns for the same condition.
          examples:
            - '0065'
          type: string
        entityType:
          description: >-
            The domain entity the error concerns. Present only on
            field-validation errors.
          examples:
            - Account
          type: string
        fields:
          additionalProperties: {}
          description: >-
            Per-field validation detail, keyed by field name. The value is the
            violation message for a known field and the offending value for an
            unexpected one, so it is not always a string. The /v2 contract
            carries these as the 'errors' array.
          type: object
        message:
          description: >-
            Human-readable explanation of this occurrence. The /v2 contract
            carries this as 'detail'.
          type: string
        title:
          description: Short, human-readable summary of the error.
          examples:
            - Invalid Path Parameter
          type: string
      required:
        - title
        - message
        - code
      type: object
    LedgerDashboardAssetVolume:
      additionalProperties: false
      properties:
        amount:
          examples:
            - '41000.00'
          type: string
        asset:
          examples:
            - BRL
          type: string
        transactions:
          examples:
            - 128
          format: int64
          type: integer
      required:
        - asset
        - amount
        - transactions
      type: object
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      description: JWT bearer token issued by the identity provider.
      scheme: bearer
      type: http

````