curl --request POST \
--url 'https://rpc-mainnet.solanatracker.io/?api_key=' \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": 1,
"method": "getAccountInfo",
"params": [
"7xK1a6Ut1pCrH9CiMwdEqx7RyhqgUZRux692Sg4m1TTw",
{
"encoding": "base64",
"slot": 411108200
}
]
}
'{
"jsonrpc": "2.0",
"result": {
"context": {
"apiVersion": "4.2.1",
"slot": 411108200
},
"value": {
"data": [
"",
"base64"
],
"executable": false,
"lamports": 1523847120,
"owner": "11111111111111111111111111111111",
"rentEpoch": 18446744073709552000,
"space": 0
}
},
"id": 1
}Historical balances
Historical getAccountInfo RPC Method
Read a Solana account as it was at any past slot, or step through its updates one at a time. Historical getAccountInfo parameters, limitations 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": "getAccountInfo",
"params": [
"7xK1a6Ut1pCrH9CiMwdEqx7RyhqgUZRux692Sg4m1TTw",
{
"encoding": "base64",
"slot": 411108200
}
]
}
'{
"jsonrpc": "2.0",
"result": {
"context": {
"apiVersion": "4.2.1",
"slot": 411108200
},
"value": {
"data": [
"",
"base64"
],
"executable": false,
"lamports": 1523847120,
"owner": "11111111111111111111111111111111",
"rentEpoch": 18446744073709552000,
"space": 0
}
},
"id": 1
}Read an account as it was in the past with the standard getAccountInfo method. Add one of these to the config object:
slot: the account as of the end of that slot.lastUpdateBeforeSlot: the account as of its last update strictly before that slot.firstUpdateAfterSlot: the account as of its first update strictly after that slot.
getAccountInfo returns the account as it is now: see getAccountInfo.
Walk an account’s history
WithlastUpdateBeforeSlot and firstUpdateAfterSlot, context.slot is the slot of the update returned. Pass it back to step through the account’s history one update at a time.
Add changes (1 to 20) to also get that many earlier versions in result.changes, newest first, each with its slot, blockTime and txnSignature.
Limitations
- Historical reads return finalized data.
commitmentis ignored, andminContextSlotcannot be combined with these options. valueisnullwhen the account did not exist or was closed at that point, or when no data is known for it.- SPL Token and Token-2022 mint accounts cannot be read historically: they return error
-32033withdata.reason: "splTokenMint". Stake, vote, config and sysvar accounts also return-32033. - Token accounts are rebuilt from their balance history. Balance, mint, owner and rent lamports are returned; Token-2022 extensions, delegate, frozen state, close authority and exact
spaceare not. - A slot after the latest available slot returns
-32030, one before the earliest returns-32031, and a slot with no data available returns-32034. AlastUpdateBeforeSlotorfirstUpdateAfterSlotwalk past the first or last known update returns-32020. dataSliceis not allowed withjsonParsedorjsonParsedEnhanced.
Body
application/json
Was this page helpful?