programSubscribe

programSubscribe WebSocket Method

post
/

Subscribe to a program to receive notifications when the lamports or data for an account owned by the given program changes. This method establishes a persistent WebSocket connection that will send real-time notifications whenever accounts owned by the specified program are created, modified, or deleted. You can filter results by data size, account owner, or custom criteria to only receive notifications for accounts that match your requirements.

Authorizations
AuthorizationstringOptional

Authorization header for API key authentication.

Example:

Authorization: your-api-key-here
Body

Request object for subscribing to program account changes via WebSocket

jsonrpcstring · enumRequired

JSON-RPC protocol version

Example: 2.0Possible values:
idone ofRequired

Request identifier that will be returned in the response

Example: 1
stringOptional
or
numberOptional
methodstring · enumRequired

The WebSocket method name

Example: programSubscribePossible values:
Responses
chevron-right
101

WebSocket notification for program account changes

application/json

WebSocket notification sent when a program account changes

jsonrpcstring · enumRequired

JSON-RPC protocol version

Example: 2.0Possible values:
methodstring · enumRequired

Notification method name indicating this is a program notification

Example: programNotificationPossible values:
post
/

Last updated