> For the complete documentation index, see [llms.txt](https://docs.neox.vn/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.neox.vn/docs/global/global-collections/integration/accounts/get-account-balance.md).

# Get Account Balance

#### Endpoint: GET /v2/gc/accounts/query

#### Description: Query the balance and available balance of a merchant account for a given currency.

{% hint style="info" %}
**Endpoint Selection:**

* Use **this endpoint** to query a single account balance for a specific currency (the `currency` parameter is required).
* Use the [Query Sub-Merchant Balance API](/docs/global/global-collections/integration/accounts/query-submerchant-balance.md) when you need to retrieve balances across **all currencies and account types** for a sub-merchant in a single request — no `currency` filter required.
  {% endhint %}

## Request

#### Request Params Field Descriptions

| Field Name          | Type   | Required | Description                                                                                          |
| ------------------- | ------ | -------- | ---------------------------------------------------------------------------------------------------- |
| currency            | string | Yes      | ISO 4217 currency code of the account to query (e.g. `USD`, `EUR`, `HKD`).                           |
| accountType         | string | No       | Account category. Enum: `FUND_ACCOUNT \| VCC_ACCOUNT \| REFUND_ACCOUNT`.                             |
| subMerchantId       | string | No       | Sub-merchant ID. Required when querying the balance of a specific sub-merchant.                      |
| accountBusinessType | string | No       | Further filters the account by its business type when multiple accounts exist for the same currency. |

### Response

#### Response Field Descriptions

| Field Name    | Type   | Description                      |
| ------------- | ------ | -------------------------------- |
| code          | number | Response code.                   |
| state         | number | State of the response.           |
| data          | object | Account balance details.         |
| message       | string | Response message.                |
| neoResponseId | string | Unique NeoX response identifier. |

#### `data` object fields:

| Field Name       | Type        | Description                                                           |
| ---------------- | ----------- | --------------------------------------------------------------------- |
| accountNo        | string      | Account number associated with the queried currency and account type. |
| accountType      | string      | Account category returned (e.g. `FUND_ACCOUNT`).                      |
| currency         | string      | ISO 4217 currency code of the account.                                |
| balance          | number      | Total account balance, including frozen amounts.                      |
| availableBalance | number      | Balance available for immediate use.                                  |
| frozenAmount     | number      | Amount currently frozen (e.g. pending transactions).                  |
| time             | date string | Timestamp of the balance snapshot (ISO 8601 format).                  |

#### Response sample

```json
{
  "code": 1,
  "state": 2,
  "data": {
    "accountNo": "GC-10094326060-USD",
    "accountType": "FUND_ACCOUNT",
    "currency": "USD",
    "balance": 50000.00,
    "availableBalance": 47500.00,
    "frozenAmount": 2500.00,
    "time": "2024-08-15T09:30:00Z"
  },
  "message": "Successful",
  "neoResponseId": "de7750c5-772e-4136-ac78-62c57a106cce"
}
```

## Example cURL

```bash
curl -X GET "https://{base_url_openapi}/v2/gc/accounts/balance?currency=USD&accountType=FUND_ACCOUNT" \
  -H "Authorization: Bearer <YOUR_TOKEN>" \
  -H "Content-Type: application/json" \
  -H "Accept-Language: en"
```

### Notes

* Requires Bearer token in the Authorization header.
* The Accept-Language header can be used to specify the response language (Support: "vi", "en").
* The `currency` parameter is required; all other query parameters are optional filters.
* Use `accountType` to differentiate between fund, virtual credit card, and refund account balances when the merchant holds multiple account types in the same currency.
* `balance` includes frozen funds; use `availableBalance` for the spendable amount.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.neox.vn/docs/global/global-collections/integration/accounts/get-account-balance.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
