get Program Accounts
Returns every account owned by a program, optionally narrowed by size and byte-content filters.
getProgramAccounts scans every account owned by a program and returns the ones matching the given filters, enumerating a protocol's state without knowing individual addresses ahead of time.
An unfiltered scan walks the program's entire account set — tens of millions of accounts for a program like SPL Token — so constant-k requires at least one filter on every call and meters it separately from the rest of the Accounts category.
Parameters
params is a JSON array, with values in this order: programId, config.
Address of the program whose owned accounts to scan, base-58 encoded.
Configuration. On constant-k this is effectively required, not optional: at least one entry in filters must narrow the scan.
Show propertiesProperties
Bank state to scan.
finalizedconfirmedprocessedHow to encode each account's data. base58 fails for accounts over 129 bytes.
base58base64base64+zstdjsonParsedReturns only a byte range of each account's data. Not valid with jsonParsed.
Show propertiesProperties
Accounts must match every filter in this array (logical AND). Required on constant-k — a call with no filters, or with filters too loose to bound the scan, is rejected.
Show one ofOne of
Match accounts whose data is exactly this many bytes.
Show propertiesProperties
Required account data length, in bytes.
Match accounts whose data contains these bytes at the given offset.
Show propertiesProperties
Show propertiesProperties
Byte offset into the account's data to compare at.
Bytes to match, encoded per encoding below.
Encoding of the bytes field itself (independent of the account-data encoding in the outer config).
base58base64Minimum slot the node must have processed before answering.
When true, wraps the array result in the usual {context, value} envelope instead of returning it bare.
Result
By default, a bare array of matching accounts. With withContext: true, the same array wrapped in {context, value}.
Show one ofOne of
Show each itemEach item
Account address, base-58 encoded.
Show propertiesProperties
Same shape as getAccountInfo.
Show propertiesProperties
Show propertiesProperties
Notes
- Available on Blade Runner at 25 requests per second and on Nexus at 75 per second. Free and Operator keys get HTTP
403withgetProgramAccounts requires higher tier. - A typical filter combines
dataSizewith one or morememcmpclauses; constant-k rejects an unfiltered scan outright rather than throttling it. - The example's byte offsets (
mintat 32,ownerat 64) match the classic SPL Token account struct; Token-2022 accounts share this base layout but can be longer with extensions, so a baredataSize: 165filter misses them. getProgramAccountsV2(paginated, up to 10,000 accounts per page, Blade Runner and Nexus) pages through a large account set instead of filtering a single call.- Twelve hot programs are answered from a purpose-built in-memory index rather than a live disk scan: a fraction of a second, no scan thread, and no filter required. The validator's scan-results cap does not apply to them; the index bounds the answer to 100,000 accounts, and broader results page through getProgramAccountsV2. Every other program is scanned on disk, where a selective filter is required and the validator's scan-results cap bounds the answer.
| Program | Program ID |
|---|---|
| Address Lookup Table | AddressLookupTab1e1111111111111111111111111 |
| Raydium AMM V4 | 675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8 |
| Raydium CPMM | CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C |
| Raydium CLMM | CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK |
| Orca Whirlpool | whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc |
| Meteora DLMM | LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo |
| Meteora DAMM V2 | cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG |
| Meteora DBC | dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN |
| Pump.fun | 6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P |
| PumpSwap | pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA |
| Serum V3 | 9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin |
| Drift V2 | dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH |