getMultipleAccounts - Solana

getMultipleAccounts. Retrieves detailed information for multiple specified accounts in a single request

getMultipleAccounts - solana [Value: 11CU]
Retrieves detailed information for multiple specified accounts in a single request
Use cases

Use cases

  • Retrieve data for multiple Solana accounts simultaneously
  • Analyze the status of various accounts efficiently
  • Monitor multiple accounts for security and performance
Constraints

Constraints

  • Limited to the specified accounts in the request
  • Dependent on API rate limits and quotas
  • Potential delays with large data sets
Get started
Unlock Access to 50+ chains
Boost your app's speed and reliability with dRPC - get your access API key

Language

Request
Examples
curl https://solana.drpc.org \
  -X POST \
  -H "Content-Type: application/json" \
  --data '{"jsonrpc": "2.0","id": 1,"method": "getMultipleAccounts","params": [["vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg","4fYNw3dojWmQ4dXtSGE9epjRGy9pFSx62YypT7avPYvA"],{"dataSlice": {"offset": 0,"length": 0}}]}'
Copy
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
}
Copy

Request params

idinteger
jsonrpcstring
methodstring
Parametersarray
array
accountPublicKeystring
The public key of the account to query.
encodingstring
Specifies the data encoding for the returned account information
dataSliceobject
Limits the returned account data based on the specified offset and length fields. Available only for "base58", "base64", or "base64+zstd" encodings.
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 accounts

Response 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.