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"
Was this page helpful?