Balances

TableDescription

solana.assets.balances

solana.assets.sol_balances , solana.assets.spl_balances,

Transaction-level balances from genesis.
solana.assets.balances_latest , solana.assets.spl_token_balances_latest, solana.assets.sol_balances_latestLatest balances of all Solana addresses, updated on an hourly cadence.

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.

Both sol_balances and spl_token_balances are huge tables. It is advised that you query time ranges and specific addresses

  • spl_token_balances ~ 15bil rows

  • sol_balances ~ 330bil rows

Sample Usage

A common use case is to calculate daily balances of a solana address. Refer to this sample query.

Column Name

ColumnDescriptionTypeExample
token_typeType of token (SOL or SPL-TOKEN)varcharSOL
addressAddress of the token holdervarchar4CKFRwj6YzVygMptmFtZgBNNn7zyCsVibM8Aq5pG252v
token_accountToken account associated with the token holdervarchar
decimalsNumber of decimal placesnumber9
mintMint address of the tokenvarchar
program_idProgram id associated with the tokenvarchar
raw_balance_strRaw balance of the token as a string for precision.varchar842899177
raw_balanceRaw balance of the tokenfloat842899177
balance_strBalance of the token in string format for precision.varchar0.842899177
balanceBalance of the token.float0.842899177
usd_balanceUSD balance at the block timestamp.float124.327628608
usd_exchange_rateUSD value of the balance at the block timestamp.float147.5
signerTransaction Signer.varchar4CKFRwj6YzVygMptmFtZgBNNn7zyCsVibM8Aq5pG252v
successBoolean indicator whether this transaction suceeded.booleanTRUE
is_votingBoolean indicator whether this is a voting transaction.booleanTRUE
block_slotBlock slot of the transaction that resulted in the balance change.number274980322
block_heightBlock height of the transaction that resulted in the balance change.number254414017
block_hashBlock hash of the transaction that resulted in the balance change.varchar4S4V2zoGKpMLxDmwz5PKamiKcwAy2euwEbdsypkkjNLt
block_timestampBlock timestamp of the transaction that resulted in the balance change.timestamp_ntz2024-07-01 01:55:58.000
txn_idTransaction ID that resulted in the balance change.varchar5oP9oJ2JLYDhTpLi4QyxbNYQooLzmSfTq4auY1Dmm8XkG1bf9R1jNNSmFVDqpB8ByQ1Ta3aqWA6A4kYTyuPeJTp1
txn_indexTransaction index of the transaction id.number685
unique_idUnique id assigned to the balances entry.varchartxn_id-5oP9oJ2JLYDhTpLi4QyxbNYQooLzmSfTq4auY1Dmm8XkG1bf9R1jNNSmFVDqpB8ByQ1Ta3aqWA6A4kYTyuPeJTp1_address-4CKFRwj6YzVygMptmFtZgBNNn7zyCsVibM8Aq5pG252v
_updated_atupdated timestamptimestamp_ntz2024-07-01 07:11:07.696

Solana Balances Latest

The solana.assets.balances_latest table provides a snapshot of SPL and SOL tokens’ most recent balance information.

Table Columns

Column NameDescriptionTypeExample
token_typeType of tokenvarcharSPL-TOKEN
addressAddress of the token holdervarcharAuZ9H13nRXQzQNEeR7ovmPxb1EbFpWiie2fx8rRa8zxC
token_accountToken account associated with the token holdervarchar8TfpcEJYwJrSx9XNHqLZCBhYuJkbcF3K1z5TySq52pjh
decimalsNumber of decimal places the token can be divided intonumber6
mintMint address of the tokenvarchar3RYgndhvJtpRNAYhc1pmJ8NuEdgCp9H2DUurA1Vvpump
program_idProgram ID associated with the tokenvarcharTokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA
symbolSymbol of the tokenvarchar$ICE
raw_balanceRaw balance of the tokenfloat62388106652
raw_balance_strRaw balance of the token as a stringvarchar62388106652
balance_strBalance of the token in a string formatvarchar62388.10665
balanceBalance of the tokenfloat62388.10665
usd_balance_currentCurrent USD value of the balancefloat0.8110453865
usd_balance_at_block_timestampUSD value of the balance at the block timestampfloat5.614929599
usd_exchange_rate_currentCurrent USD exchange rate of the tokenfloat1.27E-05
usd_exchange_rate_at_block_timestampUSD exchange rate of the token at the block timestampfloat8.96E-05
last_activity_block_timestampTimestamp of the last activity involving the tokentimestamp_ntz2024-06-24 21:17:13
last_activity_block_slotSlot number of the last activity involving the tokennumber273800058
last_activity_block_hashHash of the block containing the last activity involving the tokenvarcharBgaWmyUz3Ns1LJpD9vxTMCg5S21jXSBLrQxbjpcVbziH
last_activity_txn_indexTransaction index of the last activity involving the tokennumber244
last_activity_txn_idTransaction ID of the last activity involving the tokenvarchar3FutYunZXCK76pjpPQS2xMajs6sTmk5WkyAGVVGxK38LndMuX52U4FppoR8qUqhc4DzVwejpi8kJUrvhjpRwo3o8
_updated_at__usd_exchange_rate_currentTimestamp of when the current USD exchange rate was last updatedtimestamp_ntz2024-06-26 08:00:00
_updated_at__unhydratedTimestamp of when the data was last updated but not fully hydratedtimestamp_ntz2024-06-25 02:33:24
_created_atTimestamp of when the entry was createdtimestamp_ntz2024-06-26 08:43:39.613 +0000
_updated_atTimestamp of when the entry was last updatedtimestamp_ntz2024-06-26 08:43:39.613 +0000
_changed_since_full_refreshBoolean indicating if the entry has changed since the last full refreshbooleanTRUE