Skip to main content
Balance changes on accounts can be tracked by using our changes RPC endpoint. You can test this out by sending tokens to an account using NEAR-CLI and then viewing the changes made.
For continuous monitoring, use an indexer to process finalized receipts and outcomes across shards and store the movements affecting your accounts.

View Balance Changes

For an incoming deposit, identify the successful finalized receiving receipt and use its outcome’s block_hash; the transaction-inclusion block may be different. Query changes for the exchange receiver, not the original signer. For general reconciliation, select one finalized block hash and query all relevant accounts and token contracts at that checkpoint. Inspect change causes; fees, outgoing transfers, and refunds also change balances. The example below queries the receiving receipt of this finalized testnet transaction from influencer.testnet. It transfers 2 NEAR to linkdrop.primitives.testnet. The returned amount is the receiver’s total balance after the transfer, in yoctoNEAR. The receipt_hash identifies the receipt that caused the update. Example Query using HTTPie:

Balance Snapshot

Alternatively, query view_account for a balance snapshot. Use the same finalized block hash for reconciliation.
Balances like this do not include Fungible Tokens; FT balances require ft_balance_of on the token contract
Example HTTPie Request:
Example Response:

Frequently Asked Questions

We have an RPC method for viewing account.The JS implementation is here. Note that in this RPC interface you can specify the finality requirement (whether to query the latest state or finalized state).For custody purposes, query finalized state.