# First API Call

## Getting Started: [**`Get Balances`**](/api-endpoints/accounts.md#get-account-balances)

This endpoint allows customers to quickly obtain real-time information about the current state of their accounts, including the available balance and any pending transactions that might affect this balance.

This API endpoint is a GET request, which makes it a great endpoint for inital testing as it's configuration is relatively simple and straightforward. [Remember to configure your request's header with both `Authorization` and `otp` fields.](/getting-started/authentication-and-authorization.md#authorization)

***

## Get Account Balances

Fetches a list of the user’s asset accounts along with the current balances, including total, available, and pending balances. This endpoint is essential for users to obtain a clear overview of their financial status within the system.

* **Endpoint:** `/api/v1/customer/accounts/balances`
* **Method:** `GET`

{% openapi src="/files/jJ7E6wWPcyFuZH6ofuNu" path="/api/v1/customer/accounts/balances" method="get" expanded="false" fullWidth="true" %}
[Customer API - Customer v5.0.7.json](https://1042261367-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxYGT6bxbvntyOdsHjmeN%2Fuploads%2Fgit-blob-1018aaf3121ec8a24cd8dd89c9a572d034369d99%2FCustomer%20API%20-%20Customer%20v5.0.7.json?alt=media)
{% endopenapi %}

**Query Parameters:**

* `pageNumber` (Integer, Optional): The page of results to return.
* `pageSize` (Integer, Optional): The maximum number of results to return.

If `pageNumber` and `pageSize` are not supplied, then an unpaginated list will be returned.

**Request Example:**

To request the first page with ten results:

```json
GET /api/v1/customer/accounts/balances?pageNumber=1&pageSize=10
```

**Response Body Parameters:**

* `id` (Integer): Not used in the example.
* `details` (Array of Objects): Each object contains the details of an asset account balance.
  * `id` (Integer): The ID of the asset account.
  * `asset` (String): The type of asset the account holds.
  * `totalBalance` (Decimal): The total balance in the account.
  * `availableBalance` (Decimal): The available balance that is ready for use.
  * `pendingBalance` (Decimal): The balance that is currently in pending transactions and not yet cleared.
  * `bSuppressed` (Boolean): Indicates whether the use of this account is currently disabled.

**Success Response Example:**

```json
{
  "id": 0,
  "details": [
    {
      "id": 1000,
      "asset": "USDC",
      "totalBalance": 100.00,
      "availableBalance": 98.00,
      "pendingBalance": 2.00,
      "bSuppressed": false
    }
  ],
  "pageSize": 10,
  "pageNumber": 1,
  "status": "1",
  "errors": []
}
```

###


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://customer-api-docs.ibanera.com/getting-started/first-api-call.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
