getTokenAccountsByDelegate
The RPC method is disabled across all our endpoints due to the high overhead it causes on our RPC nodes and practically no user usage. Please reach out if this is something you would like to activate.
Returns all SPL Token accounts by approved delegate. This method is essential for finding token accounts where a specific address has been granted delegation permissions to spend tokens on behalf of the owner.
Authorizations
Body
jsonrpcstring · enumRequiredExample:
JSON-RPC protocol version
2.0
Possible values: idone ofRequiredExample:
Request identifier that will be returned in the response
1
stringOptional
numberOptional
methodstring · enumRequiredExample:
The RPC method name
getTokenAccountsByDelegate
Possible values: Responses
200
Successful Response
application/json
401
Unauthorized
text/plain
403
Forbidden
text/plain
429
Too Many Requests
text/plain
500
Internal Server Error
text/plain
post
curl -X POST https://public.rpc.solanavibestation.com \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "getTokenAccountsByDelegate",
"params": [
"4Nd1mBQtrMJVYVfKf2PJy9NZUZdTAsp7D4xWLs4gDB4T",
{
"programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
},
{
"encoding": "jsonParsed",
"commitment": "finalized"
}
]
}'
{
"jsonrpc": "2.0",
"result": {
"context": {
"apiVersion": "2.0.15",
"slot": 147823456
},
"value": [
{
"pubkey": "28YTZEwqtMHWrhWcvv34se7pjS7wctgqzCPB3gReCFKp",
"account": {
"data": {
"program": "spl-token",
"parsed": {
"info": {
"tokenAmount": {
"amount": "1000000",
"decimals": 6,
"uiAmount": 1,
"uiAmountString": "1"
},
"delegate": "4Nd1mBQtrMJVYVfKf2PJy9NZUZdTAsp7D4xWLs4gDB4T",
"delegatedAmount": {
"amount": "500000",
"decimals": 6,
"uiAmount": 0.5,
"uiAmountString": "0.5"
},
"state": "initialized",
"isNative": false,
"mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"owner": "CnPoSPKXu7wJqxe59Fs72tkBeALovhsCxYeFwPCQH9TD"
},
"type": "account"
},
"space": 165
},
"executable": false,
"lamports": 1726080,
"owner": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
"rentEpoch": 4,
"space": 165
}
}
]
},
"id": 1
}
Last updated