curl --request POST \
--url 'https://rpc-mainnet.solanatracker.io/?api_key=' \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": 1,
"method": "getTokenAccountsByOwners",
"params": [
[
"Bs88sAYgQehsK2fkzn6fxB6FgSJJPbxzAmcfQ3Eb6TWC",
"BMLE4H5XLDS8WwCjEXCL9tmF4ZSNFnd5jmw2Xm9uG4To"
],
"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
]
}
'{
"jsonrpc": "2.0",
"id": 1,
"result": {
"context": {
"apiVersion": "3.0.0",
"slot": 378770899
},
"value": [
{
"account": "424L75FrM5LTbNrbrqyCfrR4gWBn5rtzzaEhiSiNLC1h",
"amount": "146120000068",
"decimals": 6,
"owner": "BMLE4H5XLDS8WwCjEXCL9tmF4ZSNFnd5jmw2Xm9uG4To",
"slot": 356527310,
"uiAmount": 146120.000068,
"uiAmountString": "146120.000068"
},
{
"account": "EzewvqfZPbroCmuRiKFj3KoHQ1XkuDc8qJ9MYCTzcJUY",
"amount": "540966303",
"decimals": 6,
"owner": "Bs88sAYgQehsK2fkzn6fxB6FgSJJPbxzAmcfQ3Eb6TWC",
"slot": 370336402,
"uiAmount": 540.966303,
"uiAmountString": "540.966303"
}
]
}
}Returns token account balances for multiple wallets for a specific mint. Efficiently queries up to 250 wallets in a single request. Returns all token accounts per owner (if they have multiple) or zero balance if no account exists.
curl --request POST \
--url 'https://rpc-mainnet.solanatracker.io/?api_key=' \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": 1,
"method": "getTokenAccountsByOwners",
"params": [
[
"Bs88sAYgQehsK2fkzn6fxB6FgSJJPbxzAmcfQ3Eb6TWC",
"BMLE4H5XLDS8WwCjEXCL9tmF4ZSNFnd5jmw2Xm9uG4To"
],
"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
]
}
'{
"jsonrpc": "2.0",
"id": 1,
"result": {
"context": {
"apiVersion": "3.0.0",
"slot": 378770899
},
"value": [
{
"account": "424L75FrM5LTbNrbrqyCfrR4gWBn5rtzzaEhiSiNLC1h",
"amount": "146120000068",
"decimals": 6,
"owner": "BMLE4H5XLDS8WwCjEXCL9tmF4ZSNFnd5jmw2Xm9uG4To",
"slot": 356527310,
"uiAmount": 146120.000068,
"uiAmountString": "146120.000068"
},
{
"account": "EzewvqfZPbroCmuRiKFj3KoHQ1XkuDc8qJ9MYCTzcJUY",
"amount": "540966303",
"decimals": 6,
"owner": "Bs88sAYgQehsK2fkzn6fxB6FgSJJPbxzAmcfQ3Eb6TWC",
"slot": 370336402,
"uiAmount": 540.966303,
"uiAmountString": "540.966303"
}
]
}
}The JSON-RPC protocol version.
2.0 "2.0"
A unique identifier for the request.
"1"
The name of the RPC method to invoke.
getTokenAccountsByOwners "getTokenAccountsByOwners"
Parameters for the batch token balance query.
Array of owner wallet public keys to query (1-250 wallets). All pubkeys must be valid base-58 encoded Solana addresses.
1 - 250 elementsOwner wallet public key as a base-58 encoded string.
Successfully retrieved token account balances for all requested owners.
The JSON-RPC protocol version.
2.0 "2.0"
Identifier matching the request.
"1"
Token account balances with context information.
Show child attributes
Array of token account information for each owner. Owners with multiple accounts will have multiple entries. Owners without accounts will have one entry with null account and zero balance.
Show child attributes
The owner wallet public key as a base-58 encoded string.
"Bs88sAYgQehsK2fkzn6fxB6FgSJJPbxzAmcfQ3Eb6TWC"
The token account public key as a base-58 encoded string. Null if the owner has no token account for this mint.
"EzewvqfZPbroCmuRiKFj3KoHQ1XkuDc8qJ9MYCTzcJUY"
The raw token amount as a string (without decimal adjustment).
"540966303"
The number of decimals configured for the token mint.
6
The token amount adjusted for decimals (human-readable format).
540.966303
The token amount as a string, adjusted for decimals.
"540.966303"
The slot at which this token account balance was last updated. Returns 0 if owner has no account.
370336402
Was this page helpful?