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

# Get ClearLoop Balances



## OpenAPI

````yaml /copper-open-api-public.json get /clearloop/balances
openapi: 3.1.0
info:
  description: >-
    Copper API is based on the REST API interface provided for data exchange
    between a client and a server with the use of HTTPS requests and responses.

    By default, the request should include a Content-Type header set as
    application/json. Some requests require different header fields, as well as
    other Content-Type values. In this case, a proper header will be stated in
    an example.

    When interacting with the API, please note that all numerical values, such
    as order amounts or timestamps, should be transmitted as strings. This
    ensures consistent data representation and prevents potential issues with
    floating-point precision
  title: Copper Platform API
  version: latest
servers:
  - description: platform.copper.co
    url: https://api.copper.co/platform
  - description: demo.copper.co
    url: https://api.stage.copper.co/platform
  - description: testnet.copper.co
    url: https://api.testnet.copper.co/platform
security: []
tags:
  - name: reports
  - name: deposit-targets
  - name: lending
  - name: portfolios
  - name: wallets
  - name: network
  - name: stake
  - name: blockchain
  - name: organizations
  - name: files
  - name: orders
  - name: address-book
  - name: clearloop
  - name: currencies
paths:
  /clearloop/balances:
    get:
      tags:
        - clearloop
      summary: Get ClearLoop Balances
      parameters:
        - description: Unique Copper account identifier for which records can be retrieved
          in: query
          name: portfolioId
          required: false
          schema:
            type: string
        - description: If `true`, only balances with non-zero values will be returned
          in: query
          name: nonEmpty
          required: false
          schema:
            default: 'true'
            type: boolean
        - description: >-
            If `true`, includes `totalAvailableBalanceToUndelegate` across both
            the main account and subaccounts
          in: query
          name: fetchSubaccounts
          required: false
          schema:
            default: 'false'
            type: boolean
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClearLoopBalances'
          description: OK
        '400':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: The machine-readable error code
                    examples:
                      - bad-request
                    type: string
                  message:
                    description: >-
                      A human-readable message providing more details about the
                      error
                    type: string
                type: object
          description: Bad Request
        '403':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: The machine-readable error code
                    examples:
                      - forbidden
                    type: string
                  message:
                    description: >-
                      A human-readable message providing more details about the
                      error
                    type: string
                type: object
          description: Forbidden
        '409':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: The machine-readable error code
                    examples:
                      - conflict
                    type: string
                  message:
                    description: >-
                      A human-readable message providing more details about the
                      error
                    type: string
                type: object
          description: Conflict
components:
  schemas:
    ClearLoopBalances:
      properties:
        balances:
          description: Array of balance records per wallet
          items:
            $ref: '#/components/schemas/ManagedFund'
          type: array
      required:
        - balances
      type: object
    ManagedFund:
      properties:
        amount:
          description: >-
            Delegated available balance: full delegated amount minus reserved
            balance
          type: string
        available:
          description: >-
            Available balance to undelegate: minimum between exchange funds and
            delegated balance
          type: string
        balance:
          description: Total balance value held in the account
          type: string
        clientAccountId:
          description: Unique identifier for the client's exchange account
          type: string
        currency:
          description: Currency associated with the balance
          type: string
        delegatedOrganizationId:
          description: >-
            Identifier of the organisation on the exchange to which the balance
            is delegated
          type: string
        exchangeId:
          description: Identifier of the exchange where the balance is held
          type: string
        mainCurrency:
          description: Network or main currency associated with the wallet
          type: string
        organizationId:
          description: Identifier of the client organisation owning the account
          type: string
        portfolioId:
          description: Unique Copper portfolio identifier
          type: string
        reserve:
          description: Reserved balance allocated for open orders
          type: string
        totalAvailableToUndelegate:
          description: >-
            Total available balance to undelegate: minimum across all exchange
            funds (main and subaccounts) and Copper delegated balance
          type: string
      required:
        - currency
        - balance
        - amount
        - clientAccountId
        - portfolioId
      type: object

````