getMultipleAccounts RPC Method
Returns the account information for a list of Pubkeys.
params
arrayrequiredAn array of Pubkeys to query, as base-58 encoded strings (up to a maximum of 100)
objectoptionalConfiguration object containing the following fields:commitment
The commitment describes how finalized a block is at that point in time. See Configuring State Commitment.
minContextSlot
The minimum slot that the request can be evaluated at
dataSlice
Request a slice of the account's data.
length: <usize>- number of bytes to returnoffset: <usize>- byte offset from which to start reading
encoding
Values:
base58jsonParsedbase64base64+zstdDefault:base64Encoding format for the returned Account data
base58is slow and limited to less than 129 bytes of Account data.base64will return base64 encoded data for Account data of any size.base64+zstdcompresses the Account data using Zstandard and base64-encodes the result.jsonParsedencoding attempts to use program-specific state parsers to return more human-readable and explicit account state data.- If
jsonParsedis requested but a parser cannot be found, the field falls back tobase64encoding, detectable when the data field is type<string>.
result
arrayThe result will be an array containing either:
null- if the account at that Pubkey doesn't exist, or- Account objects with the following fields:
lamports
Number of lamports assigned to this account
owner
Base-58 encoded Pubkey of the program this account has been assigned to
data
Data associated with the account, either as encoded binary data or JSON format
{<program>: <state>}- depending on encoding parameter
executable
Boolean indicating if the account contains a program (and is strictly read-only)
rentEpoch
The epoch at which this account will next owe rent
space
The data size of the account
cURL
curl https://api.mainnet.openverse.network/ -s -X \
POST -H "Content-Type: application/json" -d '
{
"jsonrpc": "2.0",
"id": 1,
"method": "getMultipleAccounts",
"params": [
[
"vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg",
"4fYNw3dojWmQ4dXtSGE9epjRGy9pFSx62YypT7avPYvA"
],
{
"encoding": "base58"
}
]
}
'
Response
{
"jsonrpc": "2.0",
"result": {
"context": { "apiVersion": "1.17.28", "slot": 92369488 },
"value": [
null,
null
]
},
"id": 1
}