curl --request POST \
--url https://nd-326-444-187.p2pify.com/9de47db917d4f69168e3fed02217d15b \
--header 'Content-Type: application/json' \
--data '{
"id": 1,
"jsonrpc": "2.0",
"method": "getProgramAccounts",
"params": [
"FsJ3A3u2vn5cTVofAjvy6y5kwABJAqYWpe4975bi2epH",
{
"encoding": "jsonParsed",
"filters": []
}
]
}'
{
"jsonrpc": "<string>",
"id": 123,
"result": [
{}
]
}
curl --request POST \
--url https://nd-326-444-187.p2pify.com/9de47db917d4f69168e3fed02217d15b \
--header 'Content-Type: application/json' \
--data '{
"id": 1,
"jsonrpc": "2.0",
"method": "getProgramAccounts",
"params": [
"FsJ3A3u2vn5cTVofAjvy6y5kwABJAqYWpe4975bi2epH",
{
"encoding": "jsonParsed",
"filters": []
}
]
}'
{
"jsonrpc": "<string>",
"id": 123,
"result": [
{}
]
}
getProgramAccounts
methodgetProgramAccounts
method returns all accounts owned by the provided program.
This method provides detailed information about each account owned by a specific program, including the account’s current balance and data. It is useful for retrieving the state of all accounts associated with a specific program.
programId
— the public key of the program to retrieve accounts for.commitment
— (optional) the level of commitment desired:
processed
— the node has processed the block and the block may be on a fork.confirmed
— the block is confirmed by the cluster as not being on a fork.finalized
— the block is finalized by the cluster.value
— an array of account information objects, each containing:
pubkey
— the public key of the account.account
— the account information:
lamports
— the account’s current balance.owner
— the public key of the program that owns the account.executable
— whether the account is marked as executable.rentEpoch
— the epoch at which this account will next owe rent.data
— the account’s data, represented as a base64 string.getProgramAccounts
is to retrieve the current state of all accounts associated with a specific Solana program. This can be useful for wallets or other applications that need to display or make use of this information.Program accounts details
The response is of type object
.
Was this page helpful?