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

Example

Request
Curl
Postman
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
}
Copy link