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

# gateway_balances

Calculates the total balances of trust line tokens issued by a given account, optionally excluding amounts held by operational addresses. This method doesn't support MPTs.

This method will use `40` [Compute Units](/nodeapi/about/billing).

***

## Reference: [Here](https://xrpl.org/docs/references/http-websocket-apis/public-api-methods/account-methods/gateway_balances)

## **Parameters**

* `account` (string, required) The address to check. This should be the issuing address.
* `strict` (boolean, optional) If `true`, only accept an address or public key for the account parameter. Defaults to `false`.
* `hotwallet` (string or array, optional) An operational address to exclude from the balances issued, or an array of such addresses.
* `ledger_hash` (string, optional) The unique hash of the ledger version to use.
* `ledger_index` (number or string, optional) The ledger index of the ledger to use, or a shortcut string such as `validated`, `closed` or `current`.

## Returns

* `account` (string) The address of the account that issued the balances.
* `obligations` (object) Omitted if empty. Total amounts issued to addresses not excluded, as a map of currencies to the total value issued.
* `balances` (object) Omitted if empty. Amounts issued to the `hotwallet` addresses from the request.
* `assets` (object) Omitted if empty. Total amounts held that are issued by others.
* `frozen_balances` (object) Omitted if empty. Amounts issued to other addresses that this account has frozen.
* `locked` (object) Omitted if empty. Amounts issued by this account that are currently locked in Escrow entries.
* `ledger_hash` (string) The identifying hash of the ledger version used.
* `ledger_index` (number) The ledger index of the ledger version used.
* `ledger_current_index` (number) The ledger index of the current in-progress ledger, if used.

```json theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
// Result
{
  "result": {
    "obligations": {
      "Cub": "3100780448447400e-4"
    },
    "account": "rN5yEd16jvqcVW1UA4kZxZ3jUA9Es85QgD",
    "ledger_index": 107293060,
    "ledger_hash": "CD041BD1CF2B5032543453C8D2AA210E6E5224ED33324F070E09C08DF7D707BA",
    "status": "success"
  }
}
```

<CodeGroup>
  ```bash title="mainnet" theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
  curl https://mainnet.xrpl.validationcloud.io/v1/<YOUR_API_KEY_HERE> \
      -X POST \
      -H "Content-Type: application/json" \
      -d '{"method":"gateway_balances","params":[{"account":"rN5yEd16jvqcVW1UA4kZxZ3jUA9Es85QgD","ledger_index":"validated"}]}'
  ```
</CodeGroup>

Over WebSocket, send `{"id":1,"command":"gateway_balances","account":"rN5yEd16jvqcVW1UA4kZxZ3jUA9Es85QgD","ledger_index":"validated"}` to `wss://mainnet.xrpl.validationcloud.io/v1/<YOUR_API_KEY_HERE>`.

> Issuers with a very large number of trust lines (for example major stablecoin issuers) can take a long time to evaluate and may time out.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.