⚡ We welcome businesses to test our enterprise-grade service

sol
Solana (SOL)

Method: POST programSubscribe

dropdown

方法 RPC programSubscribe 例如 Solana (SOL)

POST programSubscribe

Method not allowed

订阅程序时,当程序拥有的给定帐户更改时,灯或数据时,请接收通知

Parameters

id - 细绳

program_id pubkey,作为基本58编码字符串

config - 目的

选修的

包含以下可选字段的配置对象: - 承诺(可选) - 编码:字符串 - 为帐户数据进行编码,要么“ base58”(slow),“ base64”,“ base64+ZSTD”或“ JSONPARSED”。 “ JSONPARSED”编码尝试使用特定于程序的状态解析器来返回更多可读和明确的帐户状态数据。 如果请求“ JSONPARSED”,但找不到解析器,则该字段落后于Base64编码,当数据字段是类型字符串时可检测到。 - 过滤器:数组(可选) - 使用各种滤镜对象过滤结果; 帐户必须符合所有过滤标准要包含在结果中

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"
}