wss://api.xrpl.to/ws/account/balance/{account}
Account XRP balance streaming
Request
wss://api.xrpl.to/ws/account/balance/rJqiMb94hyz41SBTNr2AyPNW8AzELa8nE| Path parameter | Value | Description |
|---|---|---|
| account | An XRPL account, its r-address |
wscat -c 'wss://api.xrpl.to/ws/account/balance/rJqiMb94hyz41SBTNr2AyPNW8AzELa8nE'
Response
initial adds inception/parent/domain/name; updates: { e: "balance", E, account, balance, total, balanceDrops, spendableDrops, reserve, ownerCount, sequence, flags, regularKey }. An account the ledger does not hold (never funded, or deleted) is { type: "initial", error: "Account not found" }, and one deleted while the socket is open { e: "balance", E, account, error: "Account not found" }. After watch: { e: "balances", snapshot: true, id, data[]: { account, balance (spendable after reserves), total, reserve, flags, regularKey (or null) } } (an account not on the ledger has no row), then one { e: "balances", data[], gone[] } per ledger with only the rows that changed (gone: accounts that left the ledger); a refused list is { e: "balances", id, error } and the socket stays openWhat it does
Account XRP balance streaming
watch { accounts: [up to 100 r-addresses], id? }: also follow these accounts on this socket (replaces the set before, [] ends it, one a second; send it after the first frame)