Skip to main content

gateway_balances

POST

Aggregates the total amount of tokens issued by an issuing account.Specifying operational addresses as hotwallet lets you separate out the amounts they hold.
param[0]
parametersobjectrequired
accountstringrequired
The issuing account to aggregate.
hotwalletoneOf
The operational addresses to separate out. Pass a single address or an array of addresses.An operational address.
strictboolean
Whether to accept only an address or public key as the account value.
ledger_hashstring
The hash of the ledger version to use. Pass a 32-byte hex string.
ledger_indexoneOf
Specifies the ledger version to use. Pass a ledger index as an integer, or use one of the shortcut strings below.
  • validated: Uses the most recent ledger version validated by the network.
  • closed: Uses the most recent ledger version the server has closed. It may not be validated.
  • current: Uses the in-progress ledger version the server is currently building.
The ledger index of the version to use.
Responses
accountstring
The address of the account that issued the balances.
obligationsobject
The total amounts issued to addresses that were not excluded, as an object keyed by currency code with amount strings as values.
balancesobject
The amounts held by the operational addresses specified as hotwallet, as an object keyed by address with amount lists as values.
assetsobject
The amounts this account holds that were issued by others, as an object keyed by issuer address with amount lists as values.
ledger_hashstring
The hash of the ledger version used. Returned when a validated ledger version was queried.
ledger_indexinteger
The ledger index of the version used. Returned when a validated ledger version was queried.
ledger_current_indexinteger
The ledger index of the in-progress ledger. Returned when the current ledger was queried.
validatedboolean
Whether the response was derived from a validated ledger version.
codestringrequired
Code identifying the cause of the failed request.
messagestringrequired
Detailed message including the name and value of the invalid parameter.
{
"code": "ERROR_CODE",
"message": "Unauthorized"
}
cURL
curl -X POST 'https://xrpl-mainnet.nodit.io' \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: nodit-demo' \
-d '{
"method": "gateway_balances",
"params": [
{
"account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"strict": false
}
]
}'