dl_get_block_by_timestamp
Find the block number closest to a given Unix timestamp on a specified blockchain, enabling historical on-chain analysis via DefiLlama.
Instructions
Get block number closest to a timestamp (via DefiLlama)
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": {
"chain": "<chain>",
"timestamp": "<timestamp>"
},
"name": "dl_get_block_by_timestamp"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain | Yes | Chain name (e.g., 'ethereum', 'bsc', 'polygon') | |
| timestamp | Yes | Unix timestamp (seconds) |