eth_getBlockByNumber

Returns information about a block by block number.

Ethereum.org API Reference

Parameters

  1. QUANTITY|TAG - integer of a block number, or the string "earliest", "latest" or "pending", as in the default block parameter. REQUIRED

  2. Boolean - If true it returns the full transaction objects, if false only the hashes of the transactions. REQUIRED

Returns

See eth_getBlockByHash

Example

Request

curl --request POST \
     --url https://endpoints.omniatech.io/v1/RPC_ENDPOINT \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "eth_getBlockByNumber",
  "params": [
    "0x1b4",
    true
  ]
}
'

Response

Last updated