getMultipleAccounts - Solana
getMultipleAccounts. Retrieves detailed information for multiple specified accounts in a single request
getMultipleAccounts - solana [Value: 20CU]
Retrieves detailed information for multiple specified accounts in a single request
Use cases
- Retrieve data for multiple Solana accounts simultaneously
- Analyze the status of various accounts efficiently
- Monitor multiple accounts for security and performance
Constraints
- Limited to the specified accounts in the request
- Dependent on API rate limits and quotas
- Potential delays with large data sets
Unlock Access to 100+ chains
Boost your app's speed and reliability with dRPC - get your access API key
Language
Request
Examples
curl https://lb.drpc.live/solana/{API-KEY} \
-X POST \
-H "Content-Type: application/json" \
--data '{"jsonrpc": "2.0","id": 1,"method": "getMultipleAccounts","params": [["vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg","4fYNw3dojWmQ4dXtSGE9epjRGy9pFSx62YypT7avPYvA"],{"dataSlice": {"offset": 0,"length": 0}}]}'
Response
200
{
"jsonrpc": "2.0",
"result": {
"context": {
"slot": 98123569
},
"value": [
{
"data": ["", "base64"],
"executable": false,
"lamports": 1000000000,
"owner": "11111111111111111111111111111111",
"rentEpoch": 250
},
{
"data": ["", "base64"],
"executable": false,
"lamports": 950000000,
"owner": "11111111111111111111111111111111",
"rentEpoch": 250
}
]
},
"id": 1
}
Request params
idinteger
jsonrpcstring
methodstring
array
accountPublicKeysarray
An array of account public keys to query, as base-58 encoded strings. Maximum of 100 addresses per request.
encodingstring
Specifies the data encoding for the returned account information
- base58 - Base-58 encoded binary data. Slow, intended for account data smaller than 129 bytes
- base64 - Base-64 encoded binary data
- base64+zstd - Base-64 encoded binary data, compressed with Zstandard
- jsonParsed - Account data parsed into a human-readable JSON format. If the node has no parser for the account's owner program, the response falls back to base64
dataSliceobject
Limits the returned account data based on the specified offset and length fields. Available only for "base58", "base64", or "base64+zstd" encodings.
minContextSlotnumber
The minimum slot that the request can be evaluated at. If the node's current slot is lower, the request fails with an error
commitmentstring
The level of commitment required for the query
- finalized - The node will query the most recent block confirmed by supermajority of the cluster as having reached maximum lockout, meaning the cluster has recognized this block as finalized
- confirmed - The node will query the most recent block that has been voted on by supermajority of the cluster
- processed - The node will query its most recent block. Note that the block may not be complete
Response
200
Contains detailed information about the accountsResponse params
object
idinteger
jsonrpcstring
resultstring
object
contextobject
Contains information about the current state of the program
object
slotinteger
The slot number used to retrieve the fee calculator.
apiVersionstring
The version of the Solana RPC API being used
valueobject
object
lamportsint64
The number of lamports (smallest unit of SOL) assigned to this account.
ownerstring
Base-58 encoded public key of the program assigned to this account
datastring
Data associated with the account, either as encoded binary data or in JSON format, depending on the specified encoding. Format: [data, encoding] or JSON object
executableboolean
dicates if the account contains a program and is read-only.
rentEpochinteger
The epoch at which this account will next owe rent.