POSTgateway_balances

XRP Ledger Mainnethttps://xrpl-mainnet.nodit.io/

Aggregates the total amount of tokens issued by an issuing account. Specifying operational addresses as hotwallet lets you separate out the amounts they hold.

Request Body
methodstringrequired
accountstringrequired

The issuing account to aggregate.

hotwalletstring

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_indexinteger

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.

X-API-KEY
RequestCU500
cURL
curl -X POST "https://xrpl-mainnet.nodit.io/" \
  -H "X-API-KEY: {YOUR_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
  "method": "gateway_balances",
  "params": [
    {
      "account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
      "ledger_index": "validated",
      "strict": false
    }
  ]
}'
Response
Example · 200
{
  "result": {
    "account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
    "assets": {
      "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q": [
        {
          "currency": "EUR",
          "value": "5000"
        }
      ]
    },
    "balances": {
      "rPzwM2JfCSDjhbesdThqWzMBGKAzHnAdCH": [
        {
          "currency": "USD",
          "value": "1200"
        }
      ]
    },
    "obligations": {
      "USD": "38000"
    },
    "ledger_hash": "17ACB57A0F73B5160713E81FE72B2AC9F6064541004E272BD09F257D57C30C02",
    "ledger_index": 98765432,
    "validated": true
  }
}