Skip to content

Latest commit

 

History

History
57 lines (43 loc) · 1.21 KB

eth_blocknumber.md

File metadata and controls

57 lines (43 loc) · 1.21 KB
description
Returns the number of the most recent block.

eth_blockNumber

Parameters

none

Returns

QUANTITY - integer of the current block number the client is on.

Try out an example request using the Alchemy Composer tool!

Or check out the example below:

Request

{% tabs %} {% tab title="Curl" %}

curl https://eth-mainnet.alchemyapi.io/v2/your-api-key \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":0}'

{% endtab %}

{% tab title="Postman" %}

URL: https://eth-mainnet.alchemyapi.io/v2/your-api-key
RequestType: POST
Body: 
{
    "jsonrpc":"2.0",
    "method":"eth_blockNumber",
    "params":[],
    "id":0
}

{% endtab %} {% endtabs %}

Result

{
  "jsonrpc": "2.0",
  "id": 0,
  "result": "0xa1c054"
}