New: getTransactionsForAddress - Query transaction history with advanced filtering, sorting, and pagination. Learn More
New: getTransactionsForAddress - Query transaction history with advanced filtering, sorting, and pagination. Learn More
Returns all SPL Token accounts by approved Delegate.
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"
},
"space": 165
},
"executable": false,
"rentEpoch": 4,
"space": 165
}
}
]
}
}The JSON-RPC protocol version.
2.0 "2.0"
A unique identifier for the request.
"1"
The name of the RPC method to invoke.
getTokenAccountsByDelegate "getTokenAccountsByDelegate"
Parameters for querying token accounts by delegate.
Solana address (public key) of the delegate that has been authorized to manage token accounts.
"4Nd1mBQtrMJVYVfKf2PJy9NZUZdTAsp7D4xWLs4gDB4T"
Successfully retrieved token accounts by delegate.
The JSON-RPC protocol version.
2.0 "2.0"
Identifier matching the request.
"1"
Context and account details.
Show child attributes
List of token accounts.
Show child attributes
Account Pubkey as a base-58 encoded string.
"28YTZEwqtMHWrhWcvv34se7pjS7wctgqzCPB3gReCFKp"
Token account details.
Show child attributes
Number of lamports assigned to the account.
1726080
Pubkey of the program this account has been assigned to.
"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
Token state data associated with the account.
Show child attributes
Program name.
"spl-token"
Parsed token data.
Show child attributes
Token account information.
Show child attributes
Token amount details.
Show child attributes
Raw balance without decimals.
"1"
Number of decimals.
1
Balance in user-friendly format.
0.1
Balance as a string.
"0.1"
The Solana address that has been granted delegate authorization to spend or manage tokens.
"4Nd1mBQtrMJVYVfKf2PJy9NZUZdTAsp7D4xWLs4gDB4T"
The amount of tokens the delegate has been authorized to spend on behalf of the owner.
Show child attributes
Raw balance without decimals.
"1"
Number of decimals.
1
Balance in user-friendly format.
0.1
Balance as a string.
"0.1"
Token account state.
"initialized"
Indicates if the account holds native SOL.
false
Pubkey of the token mint.
"3wyAj7Rt1TWVPZVteFJPLa26JmLvdb1CAKEFZm3NY75E"
Pubkey of the account owner.
"CnPoSPKXu7wJqxe59Fs72tkBeALovhsCxYeFwPCQH9TD"
Space allocated for the account.
165
Indicates if the account contains a program.
false
Epoch at which the account will next owe rent.
4
Data size of the account.
165
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": "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"
},
"space": 165
},
"executable": false,
"rentEpoch": 4,
"space": 165
}
}
]
}
}