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

# List all balances

> This endpoint returns a list of balances for opened currency.

### Header

<ParamField header="x-client-id" type="string" required>
  `x-client-id`.
</ParamField>

<ParamField header="x-auth-token" type="string" required>
  Bearer `YOUR_TOKEN_HERE`.
</ParamField>

### Parameters

<ParamField query="page_num" type="number" required>
  Page number, starts from 1.
</ParamField>

<ParamField query="page_size" type="number" required>
  Number of results per page.<br />
  `Maximum 100`
</ParamField>

<ParamField query="currency" type="string">
  Filter on currency of the balance.<br />
  Three-letter [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.
</ParamField>

<ParamField query="status" type="string">
  Filter on status of the balance.<br />
  One of `all`, `active`, `closed`
</ParamField>

<ParamField query="name" type="string">
  Fuzzy search by name of the balance.<br />
</ParamField>

### Response

<ResponseField name="code" type="number">
  Indicates whether the call was successful. 200 if successful, 400 if not.
</ResponseField>

<ResponseField name="message" type="string">
  Response Message. "Success" if successful, others not.
</ResponseField>

<ResponseField name="data" type="object">
  <Expandable title="details" defaultOpen>
    <ResponseField name="total_item" type="number">
      Total items.
    </ResponseField>

    <ResponseField name="total_page" type="number">
      Total pages.
    </ResponseField>

    <ResponseField name="item_list" type="array">
      <Expandable title="details" defaultOpen>
        <ResponseField name="balance_id" type="string">
          ID of the balance.
        </ResponseField>

        <ResponseField name="balance_name" type="string">
          Name of the balance.
        </ResponseField>

        <ResponseField name="balance_currency" type="string">
          Three-letter [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.
        </ResponseField>

        <ResponseField name="available_balance" type="string">
          Current Available Balance - Funds, etc., that have been cleared and liquidated and can be used for settlement to the client's bank account.
        </ResponseField>

        <ResponseField name="pending_balance" type="string">
          Balance in Process - Primarily funds pending settlement by AC (after clearing) / PAYOUT, CONVERT.
        </ResponseField>

        <ResponseField name="reserved_balance" type="string">
          Reserve balances - mainly for refunds, rejections and other operating cost expenditures.
        </ResponseField>

        <ResponseField name="margin_balance" type="string">
          Margin Balance - for revolving margins common in VM or fixed margins in card issuance operations.
        </ResponseField>

        <ResponseField name="frozen_balance" type="string">
          Freezing of funds - mainly in dealing with disputes and other risk freezes.
        </ResponseField>

        <ResponseField name="create_time" type="string">
          Time on which the conversion will be created.
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL Example Request theme={null}
  curl 'https://api.sandbox.uqpay.org/api/v1/balances?page_num=1&page_size=100' \
  -H 'x-auth-token: Bearer 0e043e2ec6898b3220a0921466d7c203' \
  -H 'x-client-id: Up1HIsjiETPXLy7gON9PMG'
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
      "code": 200,
      "message": "Success",
      "data": {
          "total_item": 2,
          "total_page": 1,
          "item_list": [
              {
                  "balance_id": "b8241d83-b849-49c5-ac20-c2c311953577",
                  "balance_name": "1",
                  "balance_currency": "SGD",
                  "available_balance": "742",
                  "pending_balance": "0",
                  "reserved_balance": "0",
                  "margin_balance": "0",
                  "frozen_balance": "0",
                  "create_time": "2023-09-07T13:57:32+08:00"
              },
              {
                  "balance_id": "4cf219c6-e023-4222-a123-8e3dd1643274",
                  "balance_name": "1",
                  "balance_currency": "USD",
                  "available_balance": "0",
                  "pending_balance": "0",
                  "reserved_balance": "0",
                  "margin_balance": "0",
                  "frozen_balance": "0",
                  "create_time": "2023-09-06T10:21:41+08:00"
              }
          ]
      }
  }
  ```
</ResponseExample>
