watch_getBlockNumberByTimestamp

Parameters

  • QUANTITY - the unix timestamp

To convert the unix timestamp you can use https://www.epochconverter.com/

params: [
    1644419586,
]

Returns

QUANTITY - number of block

Request example

curl https://ethereum.api.watchdata.io/node/jsonrpc?api_key=your_api_key
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"watch_getBlockNumberByTimestamp","params":[1644419586"],"id":0}'

Result

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

Last updated