getMultipleAccounts

Returns account information for a list of public keys. Missing accounts are returned as null.

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getMultipleAccounts",
  "params": [
    ["Pubkey1...", "Pubkey2...", "Pubkey3..."],
    {
      "encoding": "base64",
      "dataSlice": { "offset": 0, "length": 128 }
    }
  ]
}

Parameters

Parameter
Type
Required
Description

pubkeys

string[]

Yes

Array of base58-encoded public keys

encoding

string

No

"base64" (default), "base58", or "base64+zstd"

dataSlice

object

No

{ offset, length } — limit returned data bytes

Response

Accounts are returned in the same order as the input array. If an account does not exist, null is returned at that position.

Example

Last updated