GetBlockByNumber

post

Returns information about a block by block number.

Parameters

BLOCKNUMBER [required] - a hex code of an integer representing the BLOCKNUMBER or one of the following special params:

  • latest: get block data of the latest block

  • pending: get block data of pending block

  • earliest: get the genesis block

FULLTX [required] - a boolean value specified whether you want to get transactions list or not

params: [ '0x0', true ]

Returns

  • RETURN VALUE - block data of the given BLOCKNUMBER

See eth_getBlockByHash

Body
jsonrpcstringRequired
methodstringRequired
paramsstring[]Required
idinteger · int32Required
Responses
200
Successful Operation
post
POST //getBlockByNumber HTTP/1.1
Host: tomo.nownodes.io
Content-Type: application/json
Accept: */*
Content-Length: 78

{
  "jsonrpc": "2.0",
  "method": "eth_getBlockByNumber",
  "params": [
    "0x0",
    true
  ],
  "id": 1
}

No content