getblockheaders - Dash
Example code for the getblockheaders json-rpc method. Сomplete guide on how to use getblockheaders json-rpc in GetBlock.io Web3 documentation.
Parameters
header hash - string (hex)
The hash of the block header to get, encoded as hex in RPC byte order
count - number
Optional.
The number of block headers to get
verbose - boolean
Optional.
Set to false to get the block headers in serialized block format; set to true (the default) to get the decoded block headers as a JSON object
Request
curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{"jsonrpc": "2.0",
"method": "getblockheaders",
"params": ["00000000000000093711aeacfe1a827cb43c6d626230cdd2e41ad6f43c1e79d3", 2, true],
"id": "getblock.io"}'Response
Last updated
Was this helpful?