Parameters
- addressstring
The address of the program encoded as a base-58 string
- objectobject
The configuration object with the following fields:
- commitmentstring
The level of commitment required for the query. The options include:
- finalizedstring
The node will query the most recent block the cluster has recognized as finalized
- confirmedstring
The node will query the most recent block that has been voted on by the supermajority of the cluster
- processedstring
The node will query its most recent block. Note that the block may not be complete
- minContextSlotinteger
The minimum slot at which the request can be evaluated
- withContextboolean
Wraps the result in a RpcResponse JSON object
- filtersarray
Filter results using up to 4 filter objects. See Filtering
- memcmpobject
Compares a slice of account data at the given offset to the provided bytes
- offsetinteger
Byte offset into account data to start comparing
- bytesstring
Base-58 encoded bytes to match
- dataSizeinteger
Matches accounts whose data length equals this value in bytes
- dataSliceobject
Request a slice of each account's data. Only available for base58, base64, or base64+zstd encodings.
- When using base58, binary, or no encoding (defaults to base58), length must be ≤ 128 bytes. Requests exceeding 128 bytes with these encodings will be rejected with error code -32671. To return more than 128 bytes, use base64, base64+zstd, or jsonParsed encoding.
- offsetinteger
Byte offset from which to start reading account data
- lengthinteger
Number of bytes to return
- encodingstring
(Default: binary) Encoding format for the returned account data. Explicitly setting this field is recommended to avoid size or performance issues. Valid options include 'base58', 'base64', 'binary', 'base64+zstd', and 'jsonParsed' (valid for certain native programs).
Returns
- resultarray
Array of program accounts. When
withContextis true, the RPC returns an RpcResponse object withcontextandvalue(this array) instead of the array at the top level.- pubkeystring
The account public key encoded as base-58 string
- accountobject
Account state for the matching program-owned account
- datastring | array | object
Data associated with the account. Format depends on encoding parameter:
- If the encoding parameter is left as the deprecated default of
binary, this will be a string containing encoded binary data. - If
base58,base64, orbase64+zstdis specified, this will be an array, where the first element is the encoded data string and the second element is the encoding format. - If
jsonParsedis specified, this will be JSON format{<program>: <state>}.
- If the encoding parameter is left as the deprecated default of
- executableboolean
A boolean indicating if the account contains a program (and is strictly read-only)
- lamportsinteger
The number of lamports assigned to this account as u64 (64-bit unsigned integer)
- ownerstring
The base-58 encoded address of the program this account has been assigned to
- rentEpochinteger
The epoch at which this account will next owe rent, as u64 (64-bit unsigned integer)
- spaceinteger
The amount of storage space required to store the account data in bytes
1{2"jsonrpc": "2.0",3"result": [4{5"pubkey": "CxELquR1gPP8wHe33gZ4QxqGB3sZ9RSwsJ2KshVewkFY",6"account": {7"data": "2R9jLfiAQ9bgdcw6h8s44439",8"executable": false,9"lamports": 15298080,10"owner": "4Nd1mBQtrMJVYVfKf2PJy9NZUZdTAsp7D4xWLs4gDB4T",11"rentEpoch": 28,12"space": 4213}14}15],16"id": 117}
1{2"jsonrpc": "2.0",3"result": [4{5"pubkey": "CxELquR1gPP8wHe33gZ4QxqGB3sZ9RSwsJ2KshVewkFY",6"account": {7"data": "2R9jLfiAQ9bgdcw6h8s44439",8"executable": false,9"lamports": 15298080,10"owner": "4Nd1mBQtrMJVYVfKf2PJy9NZUZdTAsp7D4xWLs4gDB4T",11"rentEpoch": 28,12"space": 4213}14}15],16"id": 117}