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 freeClosest block height and timestamp on a chain for a given Unix timestamp.
Parameters
| name | in | type | description | |
|---|---|---|---|---|
chain | path | str | required | Lowercase DefiLlama coin-chain slug (ethereum, arbitrum, polygon, bsc, …) example: ethereum |
timestamp | path | int | required | Unix 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"