curl --request POST \
--url 'https://rpc-mainnet.solanatracker.io/?api_key=' \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": 1,
"method": "getHistoricalTokenAccountsByOwner",
"params": [
{
"owner": "7xK1a6Ut1pCrH9CiMwdEqx7RyhqgUZRux692Sg4m1TTw",
"slot": 411108200,
"excludeZeroBalance": true,
"limit": 100
}
]
}
'{
"jsonrpc": "2.0",
"id": 1,
"result": {
"accounts": [
{
"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"
}
}
}
],
"count": 1
}
}Historical balances
getHistoricalTokenAccountsByOwner RPC Method
List every token account a wallet held at a past slot or timestamp, with balances, paged up to 500 at a time. getHistoricalTokenAccountsByOwner 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": "getHistoricalTokenAccountsByOwner",
"params": [
{
"owner": "7xK1a6Ut1pCrH9CiMwdEqx7RyhqgUZRux692Sg4m1TTw",
"slot": 411108200,
"excludeZeroBalance": true,
"limit": 100
}
]
}
'{
"jsonrpc": "2.0",
"id": 1,
"result": {
"accounts": [
{
"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"
}
}
}
],
"count": 1
}
}Get a wallet’s token holdings as they were at a past slot or timestamp. Each token account comes back with its mint, amount and the change that set it. Leave out both
slot and timestamp to get current holdings.
- Set at most one of
slotortimestamp(Unix seconds). - Filter to one token with
mint, and skip empty accounts withexcludeZeroBalance: true. - Pages hold up to 500 accounts (
limit, default 100). Pass the returnedpaginationTokento get the next page, with the sameowner,mint, point in time andexcludeZeroBalance. The last page has nopaginationToken. - A token account that was closed long ago can be missing from this list. Read it directly with getHistoricalTokenAccountBalances.
- Amounts are token units only; rent lamports are not included.
Body
application/json
Was this page helpful?