0.05 credits per call
getProgramAccounts on Solana: Returns all accounts owned by a program.
Endpoint
Authorization: Bearer <GOLDRUSH_API_KEY>. See authentication.
Parameters
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
programId | string | yes | Base-58 encoded program pubkey. | "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" |
config | object | no | {commitment?, encoding?, dataSlice?, filters?: array, withContext?, minContextSlot?}. filters accepts {dataSize} and {memcmp: {offset, bytes}}. | {"encoding":"jsonParsed","filters":[{"dataSize":165}]} |
Returns
array<object> | object: Array of {pubkey, account} objects (or a {context, value} envelope when withContext is set).
Examples
Errors
| Code | Message |
|---|---|
-32602 | Filter parameters are invalid. |
-32600 invalid request, -32601 method not found, -32602 invalid params.