GET /coins/block/{chain}/{timestamp}

Auth X-Hub-Key from API_HUB_KEYExecute GET /run/defillama/coins/block/{chain}/{timestamp}Cache cached 1s, never served stale past that windowCost free · weight 0 · standard rate classSource billing free

Closest block height and timestamp on a chain for a given Unix timestamp.

Parameters

nameintypedescription
chainpathstrrequiredLowercase DefiLlama coin-chain slug (ethereum, arbitrum, polygon, bsc, …)
example: ethereum
timestamppathintrequiredUnix timestamp in seconds
example: 1731628800

Response

type: object
pagination: none
sample: {
  "height": "int",
  "timestamp": "int"
}

Safe request

Reads the credential from API_HUB_KEY; it never appears in the URL.

curl -sH "X-Hub-Key: $API_HUB_KEY" "https://openapihub.dev/run/defillama/coins/block/ethereum/1731628800"