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