New: Try Gatekeeper (Beta) for significantly lower latency. Learn More
New: Try Gatekeeper (Beta) for significantly lower latency. Learn More
Returns the token balance of an SPL Token account.
curl --request POST \
--url 'https://mainnet.helius-rpc.com/?api-key=' \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": "1",
"method": "getTokenAccountBalance",
"params": [
"3emsAVdmGKERbHjmGfQ6oZ1e35dkf5iYcS6U4CPKFVaa"
]
}
'{
"jsonrpc": "2.0",
"id": "1",
"result": {
"context": {
"slot": 1114
},
"value": {
"amount": "9864",
"decimals": 2,
"uiAmount": 98.64,
"uiAmountString": "98.64"
}
}
}Documentation Index
Fetch the complete documentation index at: https://www.helius.dev/docs/llms.txt
Use this file to discover all available pages before exploring further.
confirmedfinalizedprocessedThe 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.
"3emsAVdmGKERbHjmGfQ6oZ1e35dkf5iYcS6U4CPKFVaa"
Was this page helpful?
curl --request POST \
--url 'https://mainnet.helius-rpc.com/?api-key=' \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": "1",
"method": "getTokenAccountBalance",
"params": [
"3emsAVdmGKERbHjmGfQ6oZ1e35dkf5iYcS6U4CPKFVaa"
]
}
'{
"jsonrpc": "2.0",
"id": "1",
"result": {
"context": {
"slot": 1114
},
"value": {
"amount": "9864",
"decimals": 2,
"uiAmount": 98.64,
"uiAmountString": "98.64"
}
}
}