Skip to main content
POST
getTokenAccountsByDelegate
curl --request POST \
  --url 'https://mainnet.helius-rpc.com/?api-key=' \
  --header 'Content-Type: application/json' \
  --data '
{
  "jsonrpc": "2.0",
  "id": "1",
  "method": "getTokenAccountsByDelegate",
  "params": [
    "4Nd1mBQtrMJVYVfKf2PJy9NZUZdTAsp7D4xWLs4gDB4T",
    {
      "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
    },
    {
      "encoding": "jsonParsed"
    }
  ]
}
'
{
  "jsonrpc": "2.0",
  "id": "1",
  "result": {
    "context": {
      "slot": 1114
    },
    "value": [
      {
        "pubkey": "28YTZEwqtMHWrhWcvv34se7pjS7wctgqzCPB3gReCFKp",
        "account": {
          "lamports": 1726080,
          "owner": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
          "data": {
            "program": "spl-token",
            "parsed": {
              "info": {
                "tokenAmount": {
                  "amount": "1",
                  "decimals": 1,
                  "uiAmount": 0.1,
                  "uiAmountString": "0.1"
                },
                "delegate": "4Nd1mBQtrMJVYVfKf2PJy9NZUZdTAsp7D4xWLs4gDB4T",
                "delegatedAmount": {
                  "amount": "1",
                  "decimals": 1,
                  "uiAmount": 0.1,
                  "uiAmountString": "0.1"
                },
                "state": "initialized",
                "isNative": false,
                "mint": "3wyAj7Rt1TWVPZVteFJPLa26JmLvdb1CAKEFZm3NY75E",
                "owner": "CnPoSPKXu7wJqxe59Fs72tkBeALovhsCxYeFwPCQH9TD"
              },
              "type": "account"
            },
            "space": 165
          },
          "executable": false,
          "rentEpoch": 4,
          "space": 165
        }
      }
    ]
  }
}

Request Parameters

address
string
required
Solana address (public key) of the delegate that has been authorized to manage token accounts.
mint
string
Specific token mint address to filter delegated accounts by a particular token type.
programId
string
Specific token program ID (typically SPL Token program) to filter delegated accounts.
commitment
string
The commitment level for the request.
  • confirmed
  • finalized
  • processed
minContextSlot
number
The minimum slot that the request can be evaluated at.
dataSlice
object
Request a slice of the account’s data.
dataSlice.length
number
Number of bytes to return.
dataSlice.offset
number
Byte offset from which to start reading.
encoding
string
Encoding format for Account data.
  • base58
  • base64
  • base64+zstd
  • jsonParsed

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>
default:2.0

The JSON-RPC protocol version.

Available options:
2.0
Example:

"2.0"

id
string
default:1

A unique identifier for the request.

Example:

"1"

method
enum<string>
default:getTokenAccountsByDelegate

The name of the RPC method to invoke.

Available options:
getTokenAccountsByDelegate
Example:

"getTokenAccountsByDelegate"

params
string · object · object[]

Parameters for querying token accounts by delegate.

Solana address (public key) of the delegate that has been authorized to manage token accounts.

Example:

"4Nd1mBQtrMJVYVfKf2PJy9NZUZdTAsp7D4xWLs4gDB4T"

Response

Successfully retrieved token accounts by delegate.

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.