Skip to main content

Parameters

string
required
Program public key (base-58 encoded)
object

Response

array
Array of account information objects
string
Account public key (base-58 encoded)
object
array
Account data in the specified encoding
boolean
Whether the account is executable
number
Account balance in lamports
string
Account owner (base-58 encoded)
number
Epoch at which the account will next owe rent

Code Examples

Basic Request

Request with Filters

Using web3.js

Notes

  1. Returns all accounts owned by a specific program
  2. Filters can be applied to narrow down results
  3. Account data can be sliced to reduce response size
  4. The response is immediate as it reads from the current state
  5. Different encodings can be specified for account data

Best Practices

  1. Use filters to efficiently query specific accounts
  2. Consider using dataSlice to reduce response size
  3. Cache results when appropriate to reduce RPC load
  4. Handle large result sets with pagination
  5. Use appropriate encoding based on your needs

Common Errors

Use Cases

  1. Program Account Analysis
  2. Program Account Monitoring
  3. Program Account Pagination