Skip to content
Ethereum-Compatible Interface

eth_getBlockByNumberTry API

POST eth_getBlockByNumber (eth_getBlockByNumber)

Returns the block with the specified number in metaspace 0

Parameters

QUANTITY|TAG - integerblocknumber, orstring"earliest", "latest" or"pending"

Boolean - is true when returncompletetransactionobject, whetherotherwiseonlyreturntransactionhash

Return Values

Result:

Example Code
Request
{
"jsonrpc": "2.0",
"method": "eth_getBlockByNumber",
"params": [
  "0x1b4",
  true
],
"id": "1"
}
Response
See Block Transaction Query

On this page