Query Account Balance
Use this API to query the merchant's account balances across currencies. It returns balances for all opened account currencies in one call, with optional currency filtering.
Request
- Method:
POST - Path:
/api/v1/account/merchant/balanceQuery - Content-Type:
application/json - Auth: Include the required auth headers and signature as described in Authentication
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
currency | string | No | Currency code (e.g. RUB). When provided, only that currency's balance is returned; otherwise all currencies are returned |
Request example
json
{
"currency": "RUB"
}Or query all currencies:
json
{}Response
Response body has a unified structure: result for request outcome, data for balance data.
result object
| Field | Type | Description |
|---|---|---|
code | string | Response code (success/failure) |
msg | string | Message |
data object
| Field | Type | Always returned | Description |
|---|---|---|---|
balances | array | Yes | List of per-currency balances, see table below. Empty array when no account exists or the filter matches nothing |
data.balances object
| Field | Type | Always returned | Description |
|---|---|---|---|
currency | string | Yes | Currency code |
availableBalance | string | Yes | Available balance (string, 2 decimal places, e.g. "1000.00") |
pendingBalance | string | Yes | Pending settlement balance (successful pay-in amount in the current settlement week) |
frozenBalance | string | Yes | Frozen balance (amount frozen for in-flight payouts) |
Response example
json
{
"result": {
"code": "S0000",
"msg": "Success"
},
"data": {
"balances": [
{
"currency": "RUB",
"availableBalance": "1000.00",
"pendingBalance": "500.00",
"frozenBalance": "200.00"
}
]
}
}Notes
- Only currencies with opened channel accounts are returned; a currency without any channel account will not appear in the list
- Amounts are returned as strings with 2 decimal places. Parse them with a high-precision decimal library to avoid floating-point issues
See also
- Authentication: Auth method, signature algorithm, and request format
- Response Codes: Unified response codes