Parameters
pubkeystring required Pubkey of account owner to query, as base-58 encoded string.
filterobject required Either { mint: "<pubkey>" } or { programId: "<pubkey>" }.
configobject optional Configuration object.
commitmentstringCommitment level.
encodingstringEncoding for account data.
dataSliceobjectLimit the returned account data.
minContextSlotnumberThe minimum slot.
Result
arrayArray of JSON objects with pubkey and account information.
Example
Request
JSONcurl "https://eu.fluxrpc.com?key=<your-API-key>" -s -X POST -H "Content-Type: application/json" -d '
{
"jsonrpc": "2.0",
"id": 1,
"method": "getTokenAccountsByOwner",
"params": [
"4Qkev8aNZcqFNSRhQzwyLMFSsi94jHqE8WNVTJzTP99F",
{ "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" },
{ "commitment": "finalized", "encoding": "jsonParsed" }
]
}'Response
JSON{
"jsonrpc": "2.0",
"result": {
"context": {
"slot": 1114
},
"value": [
{
"pubkey": "28YTZEwqtMHWrhWcvv34se7pjS7wctgqzCPB3gReCFKp",
"account": {
"data": {
"parsed": {
"info": {
"isNative": false,
"mint": "3wyAj7Rt1TWVPZVteFCPi2bMFn8recJ9eNhWZaBsKFYR"
}
}
},
"executable": false,
"lamports": 1726080,
"owner": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
}
}
]
},
"id": 1
}