⚡ Heavy Workload? We Offer Higher Rate Limits to Accelerate Your dApp Performance

bg pattern bg pattern xs
sol

Solana (SOL)

Method: POST programSubscribe

dropdown
POST

programSubscribe

Method not allowed

Subscribe to a program to receive notifications when the lamports or data for a given account owned by the program changes

Parameters

id - string

program_id Pubkey, as base-58 encoded string

config - object

Optional

Configuration object containing the following optional fields: - commitment (optional) - encoding: string - encoding for Account data, either "base58" (slow), "base64", "base64+zstd" or "jsonParsed". "jsonParsed" encoding attempts to use program-specific state parsers to return more human-readable and explicit account state data. If "jsonParsed" is requested but a parser cannot be found, the field falls back to base64 encoding, detectable when the data field is type string. - filters: array (optional) - filter results using various filter objects; account must meet all filter criteria to be included in results

Request

curl --location --request POST 'https://sol.getblock.io/mainnet' \
--header 'x-api-key: YOUR-API-KEY' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "programSubscribe",
"params": [null, null],
"id": "getblock.io"}'


Response

{
    "result": "null",
    "id": "getblock.io",
    "status_code": 405,
    "message": "Method not allowed"
}