curl --request POST \
--url 'https://rpc-mainnet.solanatracker.io/?api_key=' \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": 1,
"method": "getTokenHolderCounts",
"params": [
[
"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB",
"So11111111111111111111111111111111111111112"
]
]
}
'{
"jsonrpc": "2.0",
"id": 1,
"result": {
"context": {
"apiVersion": "3.0.0",
"slot": 372910193
},
"value": [
{
"holderCount": 5734410,
"mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
},
{
"holderCount": 2410388,
"mint": "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB"
},
{
"holderCount": 13102557,
"mint": "So11111111111111111111111111111111111111112"
}
]
}
}Custom queries
getTokenHolderCounts RPC Method
Get holder counts for up to 5,000 Solana tokens in one call, all read at the same slot. getTokenHolderCounts 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": "getTokenHolderCounts",
"params": [
[
"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB",
"So11111111111111111111111111111111111111112"
]
]
}
'{
"jsonrpc": "2.0",
"id": 1,
"result": {
"context": {
"apiVersion": "3.0.0",
"slot": 372910193
},
"value": [
{
"holderCount": 5734410,
"mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
},
{
"holderCount": 2410388,
"mint": "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB"
},
{
"holderCount": 13102557,
"mint": "So11111111111111111111111111111111111111112"
}
]
}
}Get holder counts for many tokens in one call with getTokenHolderCounts. Powered by Ridge DB. Even USDC, USDT and wSOL together answer in well under a millisecond.
- Pass 1 to 5,000 mint addresses. Results come back in request order.
- A holder is a token account with a balance above zero, SPL Token and Token-2022 together. Counts are token accounts, not unique owners.
- Every count in a reply is read at the same slot (
context.slot), so tokens compare fairly. - Use
commitmentandminContextSlotto choose the view and refuse stale data.
Body
application/json
The list of mints, then an optional configuration object.
- string[]
- object
Token mint addresses, as base-58 encoded strings. 1 to 5,000 mints per request.
Required array length:
1 - 5000 elementsExample:
[
"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB",
"So11111111111111111111111111111111111111112"
]
Was this page helpful?