Last updated 2 years ago
Parameters
QUANTITY - the unix timestamp
QUANTITY
To convert the unix timestamp you can use
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 }