curl --request POST \
--url 'https://rpc-mainnet.solanatracker.io/?api_key=' \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": 1,
"method": "getTokenAccountBalance",
"params": [
"121k79rjdDy4QRuSykdG1Dw7pYCZSzKYrvs7RDKZTf1h"
]
}
'{
"jsonrpc": "2.0",
"id": 1,
"result": {
"context": {
"slot": 1114
},
"value": {
"amount": "9864",
"decimals": 2,
"uiAmount": 98.64,
"uiAmountString": "98.64"
}
}
}Returns the token balance of an SPL Token account. This method provides detailed balance information including raw amount, decimals, and human-readable formatted values for any SPL Token account address.
curl --request POST \
--url 'https://rpc-mainnet.solanatracker.io/?api_key=' \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": 1,
"method": "getTokenAccountBalance",
"params": [
"121k79rjdDy4QRuSykdG1Dw7pYCZSzKYrvs7RDKZTf1h"
]
}
'{
"jsonrpc": "2.0",
"id": 1,
"result": {
"context": {
"slot": 1114
},
"value": {
"amount": "9864",
"decimals": 2,
"uiAmount": 98.64,
"uiAmountString": "98.64"
}
}
}The JSON-RPC protocol version.
2.0 "2.0"
A unique identifier for the request.
"1"
The name of the RPC method to invoke.
getTokenAccountBalance "getTokenAccountBalance"
Parameters for querying the token account balance.
Solana SPL token account address to query for balance information, as a base-58 encoded string.
"121k79rjdDy4QRuSykdG1Dw7pYCZSzKYrvs7RDKZTf1h"
Successfully retrieved the token account balance.
The JSON-RPC protocol version.
2.0 "2.0"
Identifier matching the request.
"1"
Context and token account balance details.
Show child attributes
Token account balance details.
Show child attributes
The raw Solana token balance as a string integer without decimal formatting.
"9864"
Number of decimal places defined by the token's mint for proper display formatting.
2
The human-readable Solana token balance with proper decimal formatting (deprecated).
98.64
The canonical string representation of the token balance with proper decimal places.
"98.64"
Was this page helpful?