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

# List global accounts

> List all Balance Accounts and their balances for the merchant associated with the current API Key, including system default and merchant-defined accounts. No merchant_id is required. Pagination and business filters are not supported.

The list uses `object: list` and a `data` array, without a `global_accounts` wrapper. The current version does not return an account-level `pending_amount`.

Authentication follows the [common authentication specification](/en/api/getting-started). Do not pass `merchant_id` or `X-Merchant-Id`; the server only queries data for the merchant associated with the current API Key. No request body is required. Amount examples are fictional and use the smallest ledger unit.



## OpenAPI

````yaml /en/api/global-accounts.openapi.json get /api/v1/global_accounts
openapi: 3.1.0
info:
  title: StablePay Global Accounts API
  version: '2026-09-29'
  summary: >-
    List global accounts, retrieve an individual account, and query merchant
    pending settlement balances.
  description: >-
    Read-only queries for global accounts and pending settlement balances.
    Authentication follows the common StablePay authentication specification.
    This specification describes the current production implementation; examples
    use fictional data.
servers:
  - url: https://api.stablepay.co
    description: Production
security:
  - bearerAuth: []
    stablepayTimestamp: []
    stablepayNonce: []
    stablepaySignature: []
tags:
  - name: Global Accounts
    description: Read-only account and balance queries. No fund operations are provided.
paths:
  /api/v1/global_accounts:
    get:
      tags:
        - Global Accounts
      summary: List global accounts
      description: >-
        List all Balance Accounts and their balances for the merchant associated
        with the current API Key, including system default and merchant-defined
        accounts. No merchant_id is required. Pagination and business filters
        are not supported.


        The list uses `object: list` and a `data` array, without a
        `global_accounts` wrapper. The current version does not return an
        account-level `pending_amount`.


        Authentication follows the [common authentication
        specification](/en/api/getting-started). Do not pass `merchant_id` or
        `X-Merchant-Id`; the server only queries data for the merchant
        associated with the current API Key. No request body is required. Amount
        examples are fictional and use the smallest ledger unit.
      operationId: listGlobalAccounts
      parameters:
        - $ref: '#/components/parameters/XStablePayTimestamp'
        - $ref: '#/components/parameters/XStablePayNonce'
        - $ref: '#/components/parameters/XStablePaySignature'
      responses:
        '200':
          description: Query successful.
          headers:
            Cache-Control:
              schema:
                type: string
                enum:
                  - no-store
              description: Balance responses must not be cached.
            X-Request-ID:
              schema:
                type: string
              description: Provide this trace ID when troubleshooting.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GlobalAccountList'
              example:
                object: list
                data:
                  - account_no: '00000001'
                    account_name: Default Account
                    currency: USDT
                    status: active
                    is_system_default: true
                    editable: false
                    available_amount: 10000
                    frozen_amount: 2000
                    total_amount: 12000
                    created: 1788998400
                as_of: 1789084800
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: internal_error
                  message: Internal server error.
                request_id: example-request-id
                timestamp: 1789084800
        '503':
          description: >-
            The balance query service is temporarily unavailable. Retry later
            with a new timestamp, nonce, and signature.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: service_unavailable
                  message: >-
                    The balance query service is temporarily unavailable. Retry
                    later with a new timestamp, nonce, and signature.
                request_id: example-request-id
                timestamp: 1789084800
components:
  parameters:
    XStablePayTimestamp:
      name: X-StablePay-Timestamp
      in: header
      required: true
      description: Unix timestamp in seconds. Must be within 5 minutes of the server time.
      schema:
        type: string
      example: '1791878400'
    XStablePayNonce:
      name: X-StablePay-Nonce
      in: header
      required: true
      description: >-
        Random string for replay protection, 16–64 characters. A new UUID is
        recommended for each request.
      schema:
        type: string
        minLength: 16
        maxLength: 64
      example: 550e8400-e29b-41d4-a716-446655440000
    XStablePaySignature:
      name: X-StablePay-Signature
      in: header
      required: true
      description: >-
        Compute HMAC-SHA256 over `{timestamp}.{nonce}.{requestBody}` using the
        merchant API Secret and encode the result as lowercase hex. For GET
        requests, `requestBody` is an empty string.
      schema:
        type: string
      example: a1b2c3d4e5f6...
  schemas:
    GlobalAccountList:
      type: object
      required:
        - object
        - data
        - as_of
      properties:
        object:
          type: string
          description: List object identifier.
          enum:
            - list
        data:
          type: array
          description: >-
            Accounts belonging to the current merchant. Returns an empty array
            if there are no accounts.
          items:
            $ref: '#/components/schemas/GlobalAccount'
        as_of:
          type: integer
          format: int64
          description: >-
            Database observation time for this query, in Unix seconds. This is
            not a data version and does not guarantee that multiple requests
            share the same snapshot.
      example:
        object: list
        data:
          - account_no: '00000001'
            account_name: Default Account
            currency: USDT
            status: active
            is_system_default: true
            editable: false
            available_amount: 10000
            frozen_amount: 2000
            total_amount: 12000
            created: 1788998400
        as_of: 1789084800
    ErrorResponse:
      type: object
      required:
        - error
        - request_id
        - timestamp
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: Stable business error code.
            message:
              type: string
              description: Human-readable error description.
        request_id:
          type: string
          description: Request trace ID. Not restricted to digits.
        timestamp:
          type: integer
          format: int64
          description: Error response time in Unix seconds.
    GlobalAccount:
      type: object
      required:
        - account_no
        - account_name
        - currency
        - status
        - is_system_default
        - editable
        - available_amount
        - frozen_amount
        - total_amount
        - created
      properties:
        account_no:
          type: string
          description: Account number as an 8-digit string. Preserve leading zeros.
          pattern: ^[0-9]{8}$
          example: '00000001'
        account_name:
          type: string
          description: Account display name.
          example: Default Account
        currency:
          type: string
          description: Uppercase ledger currency or asset code, such as USD, USDT, or USDC.
          example: USDT
        status:
          type: string
          description: >-
            Account availability status. Restricted accounts can still be
            queried; the relevant business endpoint determines whether fund
            operations are allowed.
          enum:
            - active
            - restricted
        is_system_default:
          type: boolean
          description: Whether this is a system default account.
        editable:
          type: boolean
          description: >-
            Whether the merchant may edit the account display name. This
            endpoint does not support editing.
        available_amount:
          type: integer
          format: int64
          description: >-
            Available balance, expressed as an integer in the smallest unit of
            the ledger currency.
        frozen_amount:
          type: integer
          format: int64
          description: >-
            Frozen or reserved balance, expressed as an integer in the smallest
            unit of the ledger currency.
        total_amount:
          type: integer
          format: int64
          description: >-
            Total account balance. In the current version, this equals
            available_amount + frozen_amount.
        created:
          type: integer
          format: int64
          description: Account creation time in Unix seconds.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: Bearer API Key, for example `Bearer sk_live_xxx`.
    stablepayTimestamp:
      type: apiKey
      in: header
      name: X-StablePay-Timestamp
      description: Unix timestamp in seconds. Must be within 5 minutes of the server time.
    stablepayNonce:
      type: apiKey
      in: header
      name: X-StablePay-Nonce
      description: Random string for replay protection, 16–64 characters.
    stablepaySignature:
      type: apiKey
      in: header
      name: X-StablePay-Signature
      description: >-
        HMAC-SHA256 signature computed using the merchant API Secret, encoded as
        lowercase hex.

````

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