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

# Prepare an accounting statement

> Returns a period report and complete journal lines using the same point-in-time data. Limited to 10,000 lines, 3 MiB and 15 seconds.

Prepare a period report and its accounting activity. Inspect completeness and status fields before treating the response as an exact, complete statement.

The example holds one investment throughout the period. NAV growth appears in
the report; no journal movements were posted during that period.


## OpenAPI

````yaml swagger/v3.yaml GET /v3/accounting/statement
openapi: 3.0.0
info:
  title: Ground API
  description: API for Portfolio Wallets, gtokens, MicroVaults, and webhooks.
  version: 3.0.0
servers:
  - url: https://sandbox.groundtech.co
  - url: https://production.groundtech.co
security:
  - bearerAuth: []
tags:
  - name: System
    description: System health and utility endpoints.
  - name: Sandbox Faucets
    description: Sandbox-only test token faucets.
  - name: Portfolio Wallets
    description: >-
      Portfolio wallets with strategy allocation, deposits, withdrawals, and
      yield positions.
  - name: gVaults
    description: >-
      Direct access to gtokens with deposit access controls and optional fee
      wrappers.
  - name: MicroVaults
    description: >-
      Customer-owned onchain vaults with externally held ERC-20 shares. Private
      preview.
  - name: Webhook Endpoints
    description: Webhook endpoint management for portfolio wallet notifications.
paths:
  /v3/accounting/statement:
    get:
      tags:
        - Accounting
      summary: Prepare an accounting statement
      description: >-
        Returns a period report and complete journal lines using the same
        point-in-time data. Limited to 10,000 lines, 3 MiB and 15 seconds.
      operationId: getAccountingStatement
      parameters:
        - name: walletId
          in: query
          required: false
          schema:
            type: string
            format: uuid
          description: >-
            Wallet ID for a wallet-scoped report. Provide exactly one of
            `walletId` or `scope=organization`.
        - name: scope
          in: query
          required: false
          schema:
            type: string
            enum:
              - organization
          description: >-
            Use `organization` for an organization-wide report. Provide exactly
            one of `walletId` or `scope=organization`.
        - name: start
          in: query
          required: true
          schema:
            type: string
            format: date-time
          description: Inclusive ISO-8601 UTC period start.
        - name: end
          in: query
          required: true
          schema:
            type: string
            format: date-time
          description: Exclusive ISO-8601 UTC period end.
        - name: costBasisMethod
          in: query
          required: false
          schema:
            type: string
            default: fifo
            enum:
              - fifo
              - average_cost
          description: Cost basis method used for realized performance calculations.
      responses:
        '200':
          description: Consistent accounting statement bundle
          content:
            application/json:
              schema:
                type: object
                required:
                  - schemaVersion
                  - snapshotAt
                  - generatedAt
                  - report
                  - activity
                  - activityComplete
                properties:
                  schemaVersion:
                    type: integer
                    enum:
                      - 1
                  snapshotAt:
                    type: string
                    format: date-time
                    description: >-
                      Time the statement data was read. The report and journal
                      lines use the same point-in-time data.
                  generatedAt:
                    type: string
                    format: date-time
                  report:
                    type: object
                    properties:
                      periodStart:
                        type: string
                        format: date-time
                      periodEnd:
                        type: string
                        format: date-time
                      scope:
                        type: string
                        enum:
                          - wallet
                          - all
                      portfolioWalletId:
                        type: string
                        format: uuid
                        nullable: true
                      costBasisMethod:
                        type: string
                        enum:
                          - fifo
                          - average_cost
                      status:
                        type: string
                        enum:
                          - exact
                          - incomplete
                      reason:
                        type: string
                        nullable: true
                      summary:
                        type: object
                        properties:
                          startingValueUsd:
                            type: string
                            nullable: true
                          endingValueUsd:
                            type: string
                            nullable: true
                          externalDepositsUsd:
                            type: string
                          externalPayoutsUsd:
                            type: string
                          explicitFeesUsd:
                            type: string
                          protocolSlippageUsd:
                            type: string
                          protocolSettlementVarianceUsd:
                            type: string
                            description: >-
                              Signed USD decimal string for protocol settlement
                              differences, separate from fees and slippage.
                              Negative values indicate a shortfall; positive
                              values indicate a surplus.
                          realizedPerformanceUsd:
                            type: string
                            nullable: true
                          unrealizedPerformanceUsd:
                            type: string
                            nullable: true
                            description: >-
                              Change in unrealized performance between the
                              opening and closing marks, excluding appreciation
                              already present before the period.
                          investmentPerformanceUsd:
                            type: string
                            nullable: true
                          grossYieldGeneratedUsd:
                            type: string
                            nullable: true
                          netYieldEarnedUsd:
                            type: string
                            nullable: true
                            description: >-
                              Net yield performance during the period, including
                              realized gains and the change in unrealized gains;
                              null when the report is incomplete.
                          reconciliationStatus:
                            type: string
                            enum:
                              - exact
                              - incomplete
                      assets:
                        type: array
                        items:
                          type: object
                          properties:
                            assetId:
                              $ref: '#/components/schemas/AssetId'
                            assetLabel:
                              type: string
                              nullable: true
                            walletId:
                              type: string
                              format: uuid
                            walletLabel:
                              type: string
                              nullable: true
                            costBasisMethod:
                              type: string
                              enum:
                                - fifo
                                - average_cost
                            startingNativeUnits:
                              type: string
                              nullable: true
                            endingNativeUnits:
                              type: string
                              nullable: true
                            startingValuationUsd:
                              type: string
                              nullable: true
                            endingValuationUsd:
                              type: string
                              nullable: true
                            startingValuedAt:
                              type: string
                              format: date-time
                              nullable: true
                            endingValuedAt:
                              type: string
                              format: date-time
                              nullable: true
                            startingPriceUsd:
                              type: string
                              nullable: true
                            endingPriceUsd:
                              type: string
                              nullable: true
                            startingPriceSource:
                              type: string
                              nullable: true
                            endingPriceSource:
                              type: string
                              nullable: true
                            startingValueUsd:
                              type: string
                            endingValueUsd:
                              type: string
                            entryValueUsd:
                              type: string
                              nullable: true
                            exitValueUsd:
                              type: string
                              nullable: true
                            realizedPerformanceUsd:
                              type: string
                              nullable: true
                            unrealizedPerformanceUsd:
                              type: string
                              nullable: true
                              description: >-
                                Change in unrealized performance between the
                                opening and closing marks, excluding
                                appreciation already present before the period.
                            explicitFeesUsd:
                              type: string
                              nullable: true
                            protocolSlippageUsd:
                              type: string
                              nullable: true
                            protocolSettlementVarianceUsd:
                              type: string
                              description: >-
                                Signed USD decimal string for protocol
                                settlement differences, separate from fees and
                                slippage. Negative values indicate a shortfall;
                                positive values indicate a surplus.
                            grossYieldGeneratedUsd:
                              type: string
                              nullable: true
                            netYieldEarnedUsd:
                              type: string
                              nullable: true
                              description: >-
                                Net yield performance for this source during the
                                period; null when its valuation is incomplete.
                            timeWeightedCapitalUsd:
                              type: string
                              nullable: true
                              description: >-
                                Modified Dietz-style capital exposure for the
                                source over the report period.
                            netPeriodPerformancePct:
                              type: string
                              nullable: true
                              description: >-
                                Net period performance in percent over the
                                report period, not annualized.
                            netPeriodPerformanceApyPct:
                              type: string
                              nullable: true
                              description: Net period performance annualized into percent.
                            grossPeriodPerformanceApyPct:
                              type: string
                              nullable: true
                              description: >-
                                Gross period performance annualized into
                                percent.
                            status:
                              type: string
                              nullable: true
                            reason:
                              type: string
                              nullable: true
                  activity:
                    type: array
                    maxItems: 10000
                    items:
                      $ref: '#/components/schemas/AccountingActivityItem'
                  activityComplete:
                    type: boolean
                    enum:
                      - true
              example:
                schemaVersion: 1
                snapshotAt: '2026-06-01T12:00:00.000Z'
                generatedAt: '2026-06-01T12:00:00.100Z'
                report:
                  periodStart: '2026-05-01T00:00:00.000Z'
                  periodEnd: '2026-06-01T00:00:00.000Z'
                  scope: wallet
                  portfolioWalletId: b1c2d3e4-0000-4000-8000-000000000001
                  costBasisMethod: fifo
                  status: exact
                  reason: null
                  summary:
                    startingValueUsd: '1000.000000'
                    endingValueUsd: '1010.000000'
                    externalDepositsUsd: '0.000000'
                    externalPayoutsUsd: '0.000000'
                    explicitFeesUsd: '0.000000'
                    protocolSlippageUsd: '0.000000'
                    protocolSettlementVarianceUsd: '0.000000'
                    realizedPerformanceUsd: '0.000000'
                    unrealizedPerformanceUsd: '10.000000'
                    investmentPerformanceUsd: '10.000000'
                    grossYieldGeneratedUsd: '10.000000'
                    netYieldEarnedUsd: '10.000000'
                    reconciliationStatus: exact
                  assets:
                    - assetId: 80f900d0-a4b8-4c97-bdc2-8e2ab5228e19
                      assetLabel: Morpho Gauntlet USDC Prime
                      walletId: b1c2d3e4-0000-4000-8000-000000000001
                      walletLabel: Corporate Treasury
                      costBasisMethod: fifo
                      startingNativeUnits: '1000000000000000000000'
                      endingNativeUnits: '1000000000000000000000'
                      startingValuationUsd: '1000.000000'
                      endingValuationUsd: '1010.000000'
                      startingValuedAt: '2026-05-01T00:00:00.000Z'
                      endingValuedAt: '2026-06-01T00:00:00.000Z'
                      startingPriceUsd: '1.000000'
                      endingPriceUsd: '1.010000'
                      startingPriceSource: reference_price
                      endingPriceSource: reference_price
                      startingValueUsd: '1000.000000'
                      endingValueUsd: '1010.000000'
                      entryValueUsd: '0.000000'
                      exitValueUsd: '0.000000'
                      realizedPerformanceUsd: '0.000000'
                      unrealizedPerformanceUsd: '10.000000'
                      explicitFeesUsd: '0.000000'
                      protocolSlippageUsd: '0.000000'
                      protocolSettlementVarianceUsd: '0.000000'
                      grossYieldGeneratedUsd: '10.000000'
                      netYieldEarnedUsd: '10.000000'
                      timeWeightedCapitalUsd: '1000.000000'
                      netPeriodPerformancePct: '1.00000000'
                      netPeriodPerformanceApyPct: '11.77419355'
                      grossPeriodPerformanceApyPct: '11.77419355'
                      status: exact
                      reason: null
                activity: []
                activityComplete: true
        '400':
          description: Invalid scope, dates or cost-basis method
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: Invalid scope, dates or cost-basis method
                code: validation_error
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: >-
            wallet_not_found: wallet is not reportable in the authorized
            organization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: wallet_not_found
                code: wallet_not_found
        '413':
          description: 'statement_too_large: choose a smaller scope or shorter period'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: statement_too_large
                code: statement_too_large
        '422':
          description: 'no_reportable_wallets: organization has no reportable wallets'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: no_reportable_wallets
                code: no_reportable_wallets
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
        '504':
          description: 'report_timeout: report could not finish before the deadline'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: report_timeout
                code: report_timeout
components:
  schemas:
    AssetId:
      type: string
      format: uuid
      description: >-
        Immutable catalog asset UUID, shared by every wallet in this
        environment. Cash, funds, and stocks use the same identity. Read IDs
        from GET /v3/assets; do not derive them from names, symbols, or wallet
        account IDs.
    AccountingActivityItem:
      type: object
      description: >-
        One customer-facing accounting journal line. Rows sharing a
        journalEntryId belong to the same journal entry.
      required:
        - journalEntryId
        - lineNumber
        - walletId
        - walletLabel
        - eventType
        - accountKind
        - chain
        - token
        - assetId
        - assetLabel
        - bridgeId
        - nativeUnits
        - amountUsd
        - settlementValuedAt
        - timestamp
        - txHash
      properties:
        journalEntryId:
          type: string
          format: uuid
          description: >-
            Stable identifier shared by all lines posted for the same journal
            entry.
        lineNumber:
          type: integer
          nullable: true
          description: One-based line order within the journal entry.
        eventType:
          type: string
          description: >-
            Accounting event that produced this journal entry (e.g.
            `yield_source_deposit`, `yield_source_redeem`, `bridge_send`,
            `bridge_receive`, `external_payout_transfer`).
        accountKind:
          type: string
          description: >-
            Ledger account kind (e.g. `cash`, `yield_position`, `bridge`,
            `external_deposit`, `external_payout`).
        walletId:
          type: string
          format: uuid
        walletLabel:
          type: string
          nullable: true
        nativeUnits:
          type: string
          nullable: true
          description: >-
            Signed movement amount in the account's native base units, as a
            string.
        amountUsd:
          type: string
          nullable: true
          description: Signed USD value of the journal line, as a fixed-precision string.
        settlementValuedAt:
          type: string
          format: date-time
          nullable: true
        timestamp:
          type: string
          format: date-time
          nullable: true
          description: >-
            Customer-facing timestamp for the journal line, using
            settlementValuedAt when available.
        chain:
          type: string
          nullable: true
        token:
          type: string
          nullable: true
        assetId:
          allOf:
            - $ref: '#/components/schemas/AssetId'
          nullable: true
          description: >-
            Shared catalog UUID for the asset on this journal line, including
            cash. Null only for lines without an associated catalog asset.
        assetLabel:
          type: string
          nullable: true
          description: >-
            Display label of the catalog asset associated with this journal
            line.
        bridgeId:
          type: string
          nullable: true
        txHash:
          type: string
          nullable: true
    ErrorResponse:
      type: object
      required:
        - error
        - code
      properties:
        error:
          type: string
          description: >-
            Human-readable error message. May change without notice; do not
            parse programmatically.
        code:
          type: string
          description: >-
            Machine-readable error code. Use it for programmatic handling rather
            than parsing the error message.
          enum:
            - validation_error
            - unknown_parameters
            - payload_too_large
            - unsupported_media_type
            - submission_id_conflict
            - feedback_unavailable
            - unsupported_chain
            - unsupported_token
            - invalid_destination_address
            - stellar_destination_account_not_active
            - stellar_destination_usdc_not_enabled
            - precision_overflow
            - invalid_cursor
            - unauthenticated
            - forbidden
            - wallet_not_found
            - wallet_limit_reached
            - withdrawal_not_found
            - deposit_not_found
            - yield_source_not_found
            - wallet_projection_unavailable
            - insufficient_funds
            - duplicate_request_id
            - request_id_conflict
            - invalid_position_weight
            - invalid_withdrawal_plan
            - payout_not_found
            - webhook_not_found
            - webhook_duplicate_url
            - withdrawal_not_cancellable
            - withdrawal_already_cancelled
            - withdrawal_payout_in_progress
            - withdrawal_policy_required
            - workflow_conflict
            - stale_rebalance_plan
            - stale_wallet_strategy
            - payout_already_terminal
            - payout_in_progress
            - payout_not_retryable
            - address_book_entry_not_found
            - address_book_duplicate_entry
            - address_book_whitelist_violation
            - rate_limited
            - rate_limit_exceeded
            - internal_error
            - wallet_creation_failed
            - service_temporarily_unavailable
            - operation_not_supported
            - wallet_withdrawal_active
            - stellar_customer_approval_unavailable
            - withdrawal_signing_required
            - wallet_performance_unavailable
            - tempo_beta_transfer_limit_exceeded
            - product_not_enabled
            - gvault_not_found
            - allowlist_update_pending
            - fee_wrapper_not_found
            - fee_wrapper_fee_update_pending
            - statement_too_large
            - no_reportable_wallets
            - report_timeout
            - read_only_api_key
    AuthErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Authentication or authorization error message.
        message:
          type: string
          nullable: true
          description: Additional auth middleware detail, when present.
        code:
          type: string
          nullable: true
          description: >-
            Some auth and scope failures include a stable code; middleware
            errors may omit it.
  responses:
    Unauthorized:
      description: >-
        The request is missing a valid bearer token, or the token is invalid or
        expired.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AuthErrorResponse'
          example:
            error: Unauthenticated request
            message: Missing or invalid bearer token
    TooManyRequests:
      description: >-
        Rate limit exceeded. Limits are enforced by API key/customer identity
        and by endpoint class. Wait for the number of seconds in Retry-After,
        add a small random delay, then retry.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Rate limit exceeded
            code: rate_limited
    InternalServerError:
      description: >-
        An unexpected error occurred. Reconcile the original operation before
        retrying a write; preserve its required idempotency key and payload.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Internal server error
            code: internal_error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

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