curl --request POST \
--url 'https://rpc-mainnet.solanatracker.io/?api_key=' \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": 1,
"method": "getTokenAccountsWithCursor",
"params": [
"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
{
"limit": 50
}
]
}
'{
"jsonrpc": "2.0",
"id": 1,
"result": {
"context": {
"apiVersion": "3.0.0",
"slot": 372910193
},
"value": {
"accounts": [
{
"address": "3emsAVdmGKERbHjmGfQ6oZ1e35dkf5iYcS6U4CPKFVaa",
"amount": "1250000000000000",
"decimals": 6,
"owner": "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM",
"uiAmount": 1250000000,
"uiAmountString": "1250000000"
},
{
"address": "BGocb4GEpbTFm8UFV2VsDSaBXHELPfAXrvd4vtt8QWrA",
"amount": "642813004178230",
"decimals": 6,
"owner": "5Q544fKrFoe6tsEbD7S8EmxGTJYAKtTVhAW5Q5pge4j1",
"uiAmount": 642813004.17823,
"uiAmountString": "642813004.17823"
}
],
"hasMore": true,
"nextCursor": "BGocb4GEpbTFm8UFV2VsDSaBXHELPfAXrvd4vtt8QWrA"
}
}
}Custom queries
getTokenAccountsWithCursor RPC Method
Walk every token account of a Solana mint, largest balance first, page by page with a cursor. getTokenAccountsWithCursor 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": "getTokenAccountsWithCursor",
"params": [
"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
{
"limit": 50
}
]
}
'{
"jsonrpc": "2.0",
"id": 1,
"result": {
"context": {
"apiVersion": "3.0.0",
"slot": 372910193
},
"value": {
"accounts": [
{
"address": "3emsAVdmGKERbHjmGfQ6oZ1e35dkf5iYcS6U4CPKFVaa",
"amount": "1250000000000000",
"decimals": 6,
"owner": "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM",
"uiAmount": 1250000000,
"uiAmountString": "1250000000"
},
{
"address": "BGocb4GEpbTFm8UFV2VsDSaBXHELPfAXrvd4vtt8QWrA",
"amount": "642813004178230",
"decimals": 6,
"owner": "5Q544fKrFoe6tsEbD7S8EmxGTJYAKtTVhAW5Q5pge4j1",
"uiAmount": 642813004.17823,
"uiAmountString": "642813004.17823"
}
],
"hasMore": true,
"nextCursor": "BGocb4GEpbTFm8UFV2VsDSaBXHELPfAXrvd4vtt8QWrA"
}
}
}Walk every token account of a mint, largest balance first, with getTokenAccountsWithCursor. Powered by Ridge DB. The first page is the top holders, so a top-50 table is one call; keep paging for a full holder export.
- Each row has the token account
address, itsownerwallet, the rawamount,decimals,uiAmountanduiAmountString. limitdefaults to 100 per page. Values above 1,000 are capped at 1,000.- Pass
nextCursorback ascursorfor the next page. Stop whenhasMoreis false. A full page setshasMoreto true, so the last page can come back empty. - Zero-balance accounts are included and come last. Skip
amount“0” if you only want holders. changedSincereturns only accounts changed after that slot.
Body
application/json
Was this page helpful?