XRP Ledger news · Upgrades and amendments

Calculating Balance Changes for a Transaction

In plain words

This 2015 post explains how to read a transaction's meta data to find who gained or lost what, and introduces the ripple-lib-transactionparser module.

Written by zerps in plain words, from the source linked below.
Published
2015

The problem

rippled reports how ledger entries changed in the AffectedNodes of a transaction's meta. It does not state balance changes directly, so they have to be worked out from those entries.

The solution

The ripple-lib-transactionparser module, available on npm, turns the meta into a list of balance changes per account, each with a value, a currency and a counterparty. The post gives the call parseBalanceChanges and a worked example with USD and XRP.

Source: xrpl.org. Read 6 December 2026.

Zerpedia states what the source says, in plain words, and gives no opinion. How Zerpedia is made

zerps Trading tokens on the XRP Ledger carries risk, including total loss. zerps is a self-custodial interface; it does not hold funds, give advice, or execute trades on your behalf.