Skip to main content

gateway_balances RPC Method

Retrieves the total balances issued by a specified account, with the option to exclude amounts held by operational addresses

Updated on
Oct 4, 2023

gateway_balances RPC Method

Parameters

account
string
REQUIRED
The account for which balances are to be retrieved
hotwallet
string
An operational address or an array of operational addresses to be excluded from the issued balances
ledger_index
string
The index of the ledger to retrieve the balances from
ledger_hash
string
A 20-byte hex string for identifying the ledger version
strict
boolean
A boolean flag indicating whether strict validation should be applied

Returns

result
object
An object which contains the following fields:
account
string
The account for which balances were retrieved
obligations
array
(Omitted if empty) The total amounts issued to addresses not excluded are returned as a map of currencies to the total value issued
balances
array
(Omitted if empty) The amounts issued to the hot wallet addresses specified in the request are returned as a separate field
assets
array
(Omitted if empty) Total amounts held that are issued by others
ledger_index
integer
The index of the ledger from which balances were retrieved
ledger_hash
string
The hash of the ledger containing the balances
ledger_current_index
string
Omitted if ledger_current_index is provided) The ledger index of the current in-progress ledger version used to retrieve this information
validated
boolean
Indicates if the information is from a validated ledger
status
string
The status of the request
warnings
array
An object of warning which contain the following fields:
id
integer
The ID of the warning
message
string
The warning message
Request
1
curl https://docs-demo.xrp-mainnet.quiknode.pro/ \
2
-X POST \
3
-H "Content-Type: application/json" \
4
--data '{
5
"method": "gateway_balances",
6
"params": [{
7
"account": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn",
8
"ledger_index": "validated",
9
"strict": true
10
}],"id":1,"jsonrpc":"2.0"}'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free