0.01 credits per call
programSubscribe on Solana: Subscribes to changes to all accounts owned by a program.
Endpoint
programSubscribe is a WebSocket subscription method.
Authenticate with Authorization: Bearer <GOLDRUSH_API_KEY>. See authentication.
Parameters
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
programId | string | yes | Base-58 encoded program pubkey to watch. | "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" |
config | object | no | {commitment?, encoding?, filters?}. | {"encoding":"jsonParsed","filters":[{"dataSize":165}]} |
Returns
number: Subscription id (used with programUnsubscribe). Notifications arrive as programNotification messages.
Examples
Errors
Standard JSON-RPC errors:-32600 invalid request, -32601 method not found, -32602 invalid params.