Skip to main content
POST
getTokenAccountsByOwner
curl --request POST \
  --url 'https://mainnet.helius-rpc.com/?api-key=' \
  --header 'Content-Type: application/json' \
  --data '
{
  "jsonrpc": "2.0",
  "id": "1",
  "method": "getTokenAccountsByOwner",
  "params": [
    "A1TMhSGzQxMr1TboBKtgixKz1sS6REASMxPo1qsyTSJd",
    {
      "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
    },
    {
      "encoding": "jsonParsed"
    }
  ]
}
'
{
  "jsonrpc": "2.0",
  "id": "1",
  "result": {
    "context": {
      "apiVersion": "2.0.15",
      "slot": 341197933
    },
    "value": [
      {
        "pubkey": "BGocb4GEpbTFm8UFV2VsDSaBXHELPfAXrvd4vtt8QWrA",
        "account": {
          "lamports": 2039280,
          "owner": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
          "data": {
            "program": "spl-token",
            "parsed": {
              "info": {
                "isNative": false,
                "mint": "2cHr7QS3xfuSV8wdxo3ztuF4xbiarF6Nrgx3qpx3HzXR",
                "owner": "A1TMhSGzQxMr1TboBKtgixKz1sS6REASMxPo1qsyTSJd",
                "state": "initialized",
                "tokenAmount": {
                  "amount": "420000000000000",
                  "decimals": 6,
                  "uiAmount": 420000000,
                  "uiAmountString": "420000000"
                }
              }
            },
            "space": 165
          },
          "executable": false,
          "rentEpoch": 18446744073709552000,
          "space": 165
        }
      }
    ]
  }
}
New Feature: getTokenAccountsByOwner now supports the changedSinceSlot parameter for incremental updates. When specified, the method returns only token accounts that have been modified at or after the given slot number. This is ideal for tracking token balance changes and portfolio updates.

Authorizations

api-key
string
query
required

Your Helius API key. You can get one for free in the dashboard.

Body

application/json
jsonrpc
enum<string>

The JSON-RPC protocol version.

Available options:
2.0
Example:

"2.0"

id
string

A unique identifier for the request.

Example:

"1"

method
enum<string>
default:getTokenAccountsByOwner

The name of the RPC method to invoke.

Available options:
getTokenAccountsByOwner
Example:

"getTokenAccountsByOwner"

params
string · object · object[]

Parameters for querying token accounts owned by a specific public key.

Solana wallet address (pubkey) of the account owner to query token holdings for, as a base-58 encoded string.

Example:

"A1TMhSGzQxMr1TboBKtgixKz1sS6REASMxPo1qsyTSJd"

Response

Successfully retrieved token accounts by owner.

jsonrpc
enum<string>

The JSON-RPC protocol version.

Available options:
2.0
Example:

"2.0"

id
string

Identifier matching the request.

Example:

"1"

result
object

Context and account details.