📝 Share Your Feedback on Twitter and Claim 1M Free GetBlock Requests

btc
Bitcoin (BTC)

Method: POST getblocktemplatelight

dropdown

方法 RPC getblocktemplatelight 例如 Bitcoin (BTC)

POST getblocktemplatelight

方法不允许

如果请求参数包含“模式”键,则用于在默认“模板”请求或“提案”之间进行显式选择。

它返回构建要处理的块所需的数据。

有关完整规范,请参阅 doc 文件夹中的 getblocktemplatelight 规范和 BIP22/BIP23。

Parameters

template_request - json 对象,可选

以下规范中的 json 对象

additional_txs - json 数组,可选,默认=[]

要添加到区块的十六进制编码交易(每个交易必须唯一且有效)

Request

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


Response

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