For the complete documentation index, see llms.txt. This page is also available as Markdown.

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.


Reference: Here

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.

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.

Last updated

Was this helpful?