GET
/
v2
/
{chain_name}
/
blocks
/
by-timestamp
/
{timestamp}
Lookup Block By Timestamp
curl --request GET \
  --url https://api.data.ormilabs.com/v2/{chain_name}/blocks/by-timestamp/{timestamp}
{
"block": {
"base_fee_per_gas": "10000000000",
"difficulty": "0",
"extra_data": "0x...",
"gas_limit": "30000000",
"gas_used": "15000000",
"hash": 2.016917905879511e+76,
"logs_bloom": "0x000...",
"miner": 2.807754160281623e+47,
"nonce": "0x0000000000000000",
"number": 18000000,
"parent_hash": 2.016917905879511e+76,
"receipt_root": "0x...",
"sha3_uncles": 1.3478047122767187e+76,
"size": 100000,
"state_root": "0x...",
"timestamp": "2023-11-07T05:31:56Z",
"total_difficulty": "58750003716598352816469",
"transaction_count": 150,
"transactions_root": "0x...",
"withdrawals_root": "0x..."
}
}

Authorizations

Authorization
string
header
required

(Optional) Enter your API key in the format: Bearer <api_key>. Providing an API key may grant higher rate limits or access to additional features. The API will function without an API key for basic access.

Path Parameters

timestamp
string<date-time>
required

The Unix timestamp or ISO 8601 date string for block lookup.

Example:

"2023-11-07T05:31:56Z"

chain_name
enum<string>
required

The name or ID of the blockchain.

Available options:
ethereum
Example:

"ethereum"

Query Parameters

lookup_direction
enum<string>
default:before

Direction to look for the block relative to the timestamp.

Available options:
before,
after

Response

200
application/json

Successfully retrieved block details by timestamp.

The response is of type object.