curl --request POST \
--url 'https://rpc-mainnet.solanatracker.io/?api_key=' \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": 1,
"method": "getHistoricalTokenAccountBalances",
"params": [
{
"accounts": [
"CSBvQkExysKY55vCQbrrQYCTpdkeGbYNx3ir42SmdhyK",
"BGocb4GEpbTFm8UFV2VsDSaBXHELPfAXrvd4vtt8QWrA"
],
"slot": 411108200
}
]
}
'{
"jsonrpc": "2.0",
"id": 1,
"result": {
"balances": [
{
"account": "CSBvQkExysKY55vCQbrrQYCTpdkeGbYNx3ir42SmdhyK",
"owner": "7xK1a6Ut1pCrH9CiMwdEqx7RyhqgUZRux692Sg4m1TTw",
"mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"amount": {
"raw": "2500000000",
"decimals": 6,
"uiAmount": 2500,
"uiAmountString": "2500"
},
"lastBalanceChange": {
"slot": 411106512,
"timestamp": 1775358702,
"previousAmount": {
"raw": "1250000000",
"decimals": 6,
"uiAmount": 1250,
"uiAmountString": "1250"
},
"amount": {
"raw": "2500000000",
"decimals": 6,
"uiAmount": 2500,
"uiAmountString": "2500"
},
"delta": {
"raw": "1250000000",
"decimals": 6,
"uiAmount": 1250,
"uiAmountString": "1250"
}
}
},
null
],
"found": 1
}
}Historical balances
getHistoricalTokenAccountBalances RPC Method
Read the balance of up to 100 token accounts at any past slot or timestamp, with owner and mint. getHistoricalTokenAccountBalances RPC parameters and examples.
POST
/
curl --request POST \
--url 'https://rpc-mainnet.solanatracker.io/?api_key=' \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": 1,
"method": "getHistoricalTokenAccountBalances",
"params": [
{
"accounts": [
"CSBvQkExysKY55vCQbrrQYCTpdkeGbYNx3ir42SmdhyK",
"BGocb4GEpbTFm8UFV2VsDSaBXHELPfAXrvd4vtt8QWrA"
],
"slot": 411108200
}
]
}
'{
"jsonrpc": "2.0",
"id": 1,
"result": {
"balances": [
{
"account": "CSBvQkExysKY55vCQbrrQYCTpdkeGbYNx3ir42SmdhyK",
"owner": "7xK1a6Ut1pCrH9CiMwdEqx7RyhqgUZRux692Sg4m1TTw",
"mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"amount": {
"raw": "2500000000",
"decimals": 6,
"uiAmount": 2500,
"uiAmountString": "2500"
},
"lastBalanceChange": {
"slot": 411106512,
"timestamp": 1775358702,
"previousAmount": {
"raw": "1250000000",
"decimals": 6,
"uiAmount": 1250,
"uiAmountString": "1250"
},
"amount": {
"raw": "2500000000",
"decimals": 6,
"uiAmount": 2500,
"uiAmountString": "2500"
},
"delta": {
"raw": "1250000000",
"decimals": 6,
"uiAmount": 1250,
"uiAmountString": "1250"
}
}
},
null
],
"found": 1
}
}Get the balance of up to 100 token accounts at one point in the past. Each entry has the account’s owner, mint, amount and decimals, plus the change that set that balance. It also works for token accounts that have since been closed.
- Pass token account addresses, not wallets, and exactly one of
slotortimestamp(Unix seconds). - The balance is the last one at or before that point.
lastBalanceChange.slotandtimestampbelong to that change, not to the point you asked for. balanceskeeps the order ofaccounts; an account with no known balance at that point isnull.- Amounts are token units only. The account’s rent lamports are not included; use
getAccountInfowithslotfor the full account. - A zero balance does not mean the account was closed.
- 1 to 100 accounts per request.
Body
application/json
Was this page helpful?