Skip to main content
The Solana.assets.balances table contains the full-history of SOL and SPL-TOKEN balances for all Solana addresses. A row is added only when a balance change occurs due to a transaction performed by the user or to the user.

Table Details

Solana Balances

The solana.assets.balances table provides transaction-level SOL and SPL token balances of all Solana accounts. Each row corresponds to a change in the balance of SOL / SPL tokens caused by the transaction. Note that 0 balance changes are not present in this table.
Why some addresses appear in transfers but not in balances: Balance records are extracted at the transaction level from RPC-reported balance changes. If an address’s SOL movements within a transaction are transient (e.g. SOL passed through to fund a token account) and the net balance change is zero, the RPC does not report a balance change — so no row appears in this table.These movements still appear in solana.assets.transfers because transfers capture individual instruction-level activity, including token account funding.
Both sol_balances and spl_token_balances are huge tables. It is advised that you query time ranges and specific addresses
  • spl_token_balances: about 300 billion rows
  • sol_balances: more than 230 billion rows (non-voting transactions alone)

Querying balances

What a row is

  • Each row is the balance of one account for one token after a transaction changed it. A transaction that changes several accounts adds one row per account and token.
  • SOL and SPL tokens are in the same table. Filter on token_type: SOL or SPL-TOKEN.
  • SOL rows have no token_account, and mint is the wrapped SOL mint So11111111111111111111111111111111111111112.
  • SPL token balances belong to a token account. address is the owner of that token account, and one wallet can own several token accounts for the same mint.
  • A balance that drops to zero gets a row with balance = 0. A transaction that leaves a balance unchanged adds no row.
  • Block rewards paid to a slot’s leader don’t come from a transaction. Their rows have a null txn_id and txn_index, and a unique_id such as block_slot-471327982_reward_index-0.

Order rows and find a balance at a point in time

Several rows can share a block_timestamp. Order by block_slot, then txn_index. Block rewards are credited after the slot’s transactions, so their null txn_index sorts last within the slot. To get a wallet’s balance as of a slot, take the latest row per token account at or before that slot. Keep the block_timestamp filter so the query only scans the range you need. The range must include the account’s last change before the slot.
Sum balance across the returned rows to get the wallet’s total for that mint.

Daily and latest balances

Balances or transfers?

This table gives the balance after each change. It doesn’t say who sent or received the tokens. For flows and counterparties, use solana.assets.transfers or solana.assets.credit_debit. See Choosing a transfers table.

Sample Query

This query generates daily end-of-day balances from txn-level balances data.
  • Replace the address with the desired wallet address.
Note: the final output will contain all tokens held by the wallet, including undesirable spam tokens. One approach to counter this would be to filter the output of the query with the desired token mints or balances above a certain USD value.

Table Columns