Documentation

Wallet transfers and SOL funding

Choose the right ClickHouse table for SOL top-ups, SOL funding and SPL token transfers. See what each row means and query a wallet's activity.

// updated 2026-11-18

  • SOL top-ups from zero. Use sol_top_ups to find when an address went from zero SOL to a positive balance.
  • Native SOL balance changes. Use indexer3_sol_fundings to find wallets that lost or gained more than 0.09 SOL in the same transaction.
  • Token transfers. Use token_transfers for top-level SPL and Token-2022 transfers, including USDC and wSOL. Check indexer3_token_transfers for transfers executed inside programs.

If a wallet has 0 SOL and receives 0.05 SOL, it appears in sol_top_ups. If it already holds SOL and receives the same amount, neither SOL table captures that payment. A later payment of 0.5 SOL can appear in indexer3_sol_fundings if the sender and receiver both pass the threshold.

See the full walkthrough with real transactions.

Find when a wallet was topped up

sol_top_ups compares SOL balances before and after a successful transaction. It captures a receiver when its balance goes from exactly zero to positive, with no minimum amount. Token accounts are excluded. Receivers can include program-controlled accounts, and a wallet can be topped up again after it returns to zero.

Replace WALLET_ADDRESS with the receiver's address in these examples.

SELECT
    toTimeZone(block_time, 'UTC') AS time_utc,
    signature,
    amount / 1e9 AS balance_sol,
    groupUniqArray(src_wallet) AS transaction_signers
FROM sol_top_ups
PREWHERE block_date_utc >= toDate(now(), 'UTC') - 7
WHERE dst_wallet = 'WALLET_ADDRESS'
GROUP BY time_utc, slot, tx_idx, signature, amount
ORDER BY slot DESC, tx_idx DESC
LIMIT 25

src_wallet is a signer, which can differ from the wallet that funded the receiver. amount is the receiver's post-transaction balance in lamports. Grouping the signers gives one row per top-up for this receiver and avoids counting the same balance multiple times. The oldest row in your query is the earliest top-up in that window.

Trace SOL balance changes

indexer3_sol_fundings compares pre- and post-transaction balances. It can capture SOL movement through a pool or an account closure even when there is no direct transfer instruction between the wallets. It excludes token accounts and program-derived addresses. A wallet qualifies only if its change is strictly greater than 90,000,000 lamports (0.09 SOL) in either direction. A transaction needs at least one qualifying loss and one qualifying gain.

For a first pass, start with transactions that have one qualifying sender and one qualifying receiver. Check table availability before running this query.

SELECT
    toTimeZone(block_time, 'UTC') AS time_utc,
    slot,
    tx_idx,
    src_wallet,
    src_decrease / 1e9 AS sol_lost,
    dst_increase / 1e9 AS sol_gained
FROM indexer3_sol_fundings
WHERE block_date_utc >= toDate(now(), 'UTC') - 7
  AND dst_wallet = 'WALLET_ADDRESS'
  AND n_src = 1 AND n_dst = 1
ORDER BY slot DESC, tx_idx DESC
LIMIT 25
WARNING

Two qualifying senders and three qualifying receivers produce six rows. Each sender's full loss repeats for every receiver, and each receiver's full gain repeats for every sender. Summing the pairs inflates the totals. Even with a single qualifying pair, inspect the transaction before attributing a direct payment. The table has no signature column. Use (slot, tx_idx) to identify the transaction or join to a table that recorded its signature.

Look up token transfers

token_transfers covers top-level SPL and Token-2022 instructions. src_wallet and dst_wallet are the token-account owners. amount is in the mint's smallest unit. For example, divide by 1e6 for USDC.

SELECT
    toTimeZone(block_time, 'UTC') AS time_utc,
    signature,
    src_wallet AS source_owner,
    amount / 1e6 AS usdc
FROM token_transfers
PREWHERE block_date_utc >= toDate(now(), 'UTC') - 1
WHERE dst_wallet = 'WALLET_ADDRESS'
  AND mint = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v'
  AND src_wallet != dst_wallet
  AND flavour IN (0, 1, 2, 16, 17, 18)
  AND failed = 0
ORDER BY slot DESC, tx_idx DESC, ix_idx DESC
LIMIT 25

The flavour filter keeps transfers and skips account owner changes (3 and 19). For longer history or token instructions executed inside a program, check indexer3_token_transfers. It includes src_pre_amount and dst_pre_amount, keeps transfers between ordinary wallet owners, and identifies transactions by (slot, tx_idx).

Wrapped SOL. A transfer of wSOL between token-account owners uses the mint So11111111111111111111111111111111111111112. Unwrapping releases native SOL into an account. Look for a SOL top-up or funding row if the balance change meets that table's rules.

Check table availability and history

sol_top_ups and token_transfers have 31-day retention. Check which extended tables your ClickHouse connection exposes before relying on them.

SHOW TABLES LIKE 'indexer3%';
SHOW TABLES LIKE 'sol_first_top_ups';
  • indexer3_sol_top_ups extends top-up history with a documented 180-day retention window.
  • indexer3_sol_fundings and indexer3_token_transfers have deeper coverage. Query min(block_date_utc) on the table you plan to use to confirm where its data starts.
  • sol_first_top_ups, if available, contains first-funding resolution records with a status and source. Check the resolution status before using a row as evidence of first funding.

Apply date filters before joining an indexer3_ table to a main-server table. In a distributed query, use GLOBAL IN (SELECT ...) when the right-hand list comes from a main-server table. If a table you need is missing from your connection, ask Supanode support about access and coverage.

See the Table reference for column types and Query examples for more SQL patterns.