Get Block By Timestamp
get_block_by_timestampGet the block number closest to a given Unix timestamp (seconds).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"timestamp": "<timestamp>"
},
"name": "get_block_by_timestamp"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chainid | No | Numeric chain id (e.g. 1=Ethereum, 56=BNB, 137=Polygon). If omitted, defaults to Ethereum Mainnet (1). | |
| closest | No | Return closest block before or after. Default before. | |
| timestamp | Yes | Unix timestamp in seconds. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | The JSON result returned by the Etherscan data tool. |