Skip to main content

getblocktemplate

Overview

The 'getblocktemplate' method method returns data needed to construct a block to work on.

Request

wget --no-check-certificate --quiet \
--method POST \
--timeout=0 \
--header 'Content-Type: application/json' \
--header 'accept: application/json' \
--header 'X-CoinAPI-Key: 4303fb63-adec-42dc-b571-74bc2f2a5167' \
--body-data '{"jsonrpc":"2.0","id":1,"method":"getblocktemplate","params": [ ]}' \
'https://bitcoin-mainnet.node.coinapi.io'

Request Parameters

  • template_request (json object, optional, default=)

Response

{
"result": null,
"error": {
"code": -8,
"message": "getblocktemplate must be called with the segwit rule set (call with {\"rules\": [\"segwit\"]})"
},
"id": 1
}