Skip to main content

getblock

Example Request and Result for getblock method

In this section, we provide an illustrative example of a request made to retrieve details contents using the getblock method. Additionally, we present the resulting response containing information about the information of the block.

Parameters

FieldTypeDescription

blockhash*

stringThe hash of the block
verbositynumeric

default = 1, 0 for hex-encoded data, 1 for a JSON object, and 2 for JSON object with transaction data

info

The example in this section uses a non-existing project id.

Make sure you replace it with your Bitcoin mainnet or Bitcoin Testnet endpoint when issuing the API calls.

Don't have a project id? Here's a straightforward guide on how to obtain one!

Curl Request example

curl https://bitcoin-mainnet.blastapi.io/<project-id> \
-X POST \
-H "Content-Type: application/json" \
--data '{"jsonrpc":"1.0", "id":"bware", "method": "getblock", "params": ["00000000000000000003681b75ee5f8b981be5a670fbdabadb958db34144c75e"]}'