Skip to main content
getProgramAccountsV2 returns accounts owned by programId in ascending pubkey order, one page at a time. Use it instead of getProgramAccounts when a program can have more than 10,000 accounts, or when you only want accounts that changed after a known slot. Send it to the complete ThorEdge RPC URL like any other method.

Parameters

string
required
Program pubkey as a base-58 string.
object
Options for the query. All fields are optional.

Response

The result is a top-level object; there is no context wrapper.
array
Matching accounts for this page, ordered by pubkey.
integer
Number of accounts in this page. It is not the total across pages.
string | null
Cursor for the next page. null when this page was shorter than limit. A page that exactly fills limit still returns a key; the following request then returns an empty accounts array and null.

Paginate

Repeat the same request with paginationKey set to the value you received, keeping filters, encoding, and limit unchanged, until paginationKey is null. Each page reflects the indexed state at the time it is served; accounts that change between pages can appear in a later page.

Errors