Get block hash by block number
POST
Authorizations
ApiKeyAuthApiKeyAuthapi-key string
NOWNodes API key passed in the api-key header.
Get the hash of a specific block by its block number.
The chain_getBlockHash method returns the hash of the block header for the specified block number. If no block number is provided, it returns the hash of the latest finalized block.
This method is essential for:
- Navigating the blockchain by block height
- Verifying block existence and integrity
- Building block explorers
- Cross-referencing blocks across different queries
Body
application/json
jsonrpcstring2.0requiredJSON-RPC version identifier
methodstringchain_getBlockHashrequiredThe method to be invoked
idinteger | stringrequiredRequest identifier for matching responses
paramsArray<integer | string>requiredArray containing optional block number
Response
200OK
Block hash retrieved successfully
400Bad Request
Invalid block number or request
500Internal Server Error
Internal server error