Parameters
chainId
string
default:"solana-devnet"
required
Unique identifier for a blockchain network.
Request identifier used to match responses.
jsonrpc
string
default:"2.0"
required
JSON-RPC version.
method
string
default:"getTokenAccountsByOwner"
required
JSON-RPC method name.
Parameters for method getTokenAccountsByOwner: [ownerAddress, filter, config]Positional parameters for getTokenAccountsByOwner:params[0]: Pubkey of the token account owner (base-58 encoded).params[1]: Filter object - must specify either mint or programId.params[2]: Optional configuration object.
Returns
Array of token accounts owned by the provided address.
Token account object.
Account Pubkey (base-58 encoded).
Account data object.
Number of lamports assigned to this account.
Pubkey of the Token Program this account belongs to.
Encoded data as [data, encoding] tuple.
Encoded data as [data, encoding] tuple.
Token state data if jsonParsed encoding is used.
True if this account is executable (program account).
Epoch at which this account will next owe rent.
Data size of the account in bytes.
curl --request POST \
--url https://api.uniblock.dev/uni/v1/json-rpc?chainId=solana-devnet \
--header 'content-type: application/json' \
--data '{
"id": 1,
"jsonrpc": "2.0",
"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": {
"__truncated": true
}
}
]
}
}