Home

Get block by hash

POST
https://moonbeam.nownodes.io/

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Get a block by its hash.

The chain_getBlock method returns the full block data including the block header and all contained extrinsics (transactions). If no block hash is provided, it returns the latest finalized block.

This method provides complete information about a block including:

  • Block header with metadata
  • All extrinsics (transactions) in the block
  • Block production details
  • Parent-child relationships

Body

application/json
jsonrpcstring2.0required

JSON-RPC version identifier

methodstringchain_getBlockrequired

The method to be invoked

idinteger | stringrequired

Request identifier for matching responses

paramsArray<string>required

Array containing optional block hash

Response

200OK

Block data retrieved successfully

400Bad Request

Invalid block hash or request

404Not Found

Block not found

500Internal Server Error

Internal server error