getTokenAccountBalance
Return token balance information for one token account.
Available under Solana REST API (Beta). Use the chain-family pages for route switching and the method pages for exact request and response shapes.
Stage: Beta
Access patterns
| Pattern | Value | Notes |
|---|---|---|
| Bearer header (Recommended) | POST /rpc/solana | Recommended default. Keep the API key in `Authorization: Bearer <api_key>`. |
| URL compatibility | POST /v1/solana/<api_key> | Use only when the client can store one full RPC URL but cannot send custom headers. |
Examples
Bearer auth example
curl -X POST "https://gw-aql.tomo.services/rpc/solana" \ -H "Authorization: Bearer <api_key>" \ -H "Content-Type: application/json" \ -d '{ "jsonrpc": "2.0", "id": 1, "method": "getTokenAccountBalance", "params": [ "11111111111111111111111111111111"]}'Try send
Try getTokenAccountBalance
Send one direct browser request to the current hosted gateway base URL so the real network request is visible in devtools. The API key is only stored locally when you provide one.
Request fields
JSON-RPC request body
| Field | Type | Required | Notes |
|---|---|---|---|
jsonrpc | string | Required | JSON-RPC version. Use `2.0`. |
id | string | number | Required | Caller request id. |
method | string | Required | Allowlisted chain method. |
params | array | Required | Method arguments. |
Response fields
JSON-RPC response body
| Field | Type | Notes |
|---|---|---|
jsonrpc | string | JSON-RPC version. |
id | string | number | Echoed request id. |
result | unknown | Successful method result. |
error | object | Standard JSON-RPC error object when the request fails. |