Get Latest Token Balance for an Address
Historical data This query uses the realtime dataset (the default), which holds only a recent window - hours to days depending on the cube. For older data add a dataset to the top-level element: EVM(network: base, dataset: combined) archive full history combined archive + realtime in one result A
What it returns
- block time
- block number
- currency symbol
- currency name
- smart contract
- decimals
- post balance
- post balance in USD
- token balance address
- total supply
- total supply in USD
- transaction hash
Filters
- token balance address is 0xc940…Cd7E
- currency smart contract is 0x8335…2913
The query
# Historical data
# This query uses the realtime dataset (the default), which holds only a
# recent window - hours to days depending on the cube.
#
# For older data add a dataset to the top-level element:
#
# EVM(network: base, dataset: combined)
#
# archive full history
# combined archive + realtime in one result
#
# Archive and combined need the historical data add-on:
# https://bitquery.io/pricing
#
# Datasets: https://docs.bitquery.io/docs/graphql/dataset/archive/
# Retention: https://docs.bitquery.io/docs/graphql/data-coverage-retention/
#
# For more info on the endpoint visit -
# https://docs.bitquery.io/docs/blockchain/Base/
# For faster results try using indexed feilds in where and orderBy clause -
# https://docs.bitquery.io/docs/graphql/indexed-fields-reference/
{
EVM(network: base) {
TransactionBalances(
limit: {count: 1}
orderBy: {descending: Block_Time}
where: {TokenBalance: {Address: {is:"0xc9403be90446323Cf5f5251f1Ff761A04b03Cd7E"}, Currency: {SmartContract: {is:"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}, Fungible: true}}}
) {
Block {
Time
Number
}
TokenBalance {
Currency {
Symbol
Name
SmartContract
Decimals
}
PostBalance
PostBalanceInUSD
Address
TotalSupply
TotalSupplyInUSD
}
Transaction {
Hash
}
}
}
}
Similar queries
- Get Token Total Supply and Market Cap · Base · TransactionBalances
- latest liquidity of a Base pool · Base · TransactionBalances
- latest token supply of all active tokens on base chain · Base · TransactionBalances
- native WETH transfer not tracked · Base · TransactionBalances
- tx swap v2 uniswap · Base · TransactionBalances