For the complete documentation index, see llms.txt. This page is also available as Markdown.

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}'
URL: https://ethereum.api.watchdata.io/node/jsonrpc?api_key=your_api_key
RequestType: POST
Body: 
{
    "jsonrpc":"2.0",
    "method":"watch_getBlockNumberByTimestamp",
    "params":[1645170803],
    "id":0
}

Result

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

Last updated