gateway_balances - XRPL

Example code for the gateway_balances JSON RPC method. Complete guide to using gateway_balances JSON-RPC in the GetBlock Web3 documentation.

Returns gateway balances on XRP Ledger.

Parameters

Parameter
Type
Required
Description

account

string

Yes

Gateway account

strict

boolean

No

Fail if not valid address

hotwallet

string/array

No

Operational wallets

ledger_hash

string

No

Ledger hash

ledger_index

string/number

No

Ledger index

Request Example

Request (cURL)
curl --location --request POST 'https://xrp.getblock.io/mainnet/' \
--header 'x-api-key: YOUR-API-KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "gateway_balances",
    "params": [{
        "account": "rN7n7otQDd6FczFgLdSqtcsAUxDkw6fzRH",
        "strict": true
    }],
    "id": "getblock.io"
}'

Response Example

Response Parameters

Field
Type
Description

account

string

Gateway account

obligations

object

Total obligations

balances

object

Hotwallet balances

assets

object

Assets held

Use Cases

  • Gateway accounting

  • Track issued currencies

  • Monitor obligations

Error Handling

chevron-rightactNotFoundhashtag

Account not found

chevron-rightinvalidParamshashtag

Invalid parameters

SDK Integration

Last updated

Was this helpful?