{"openapi":"3.1.0","info":{"title":"Block Time API","version":"1.0.0","description":"Convert a timestamp or date into the block number that was live at that moment on any of 100+ blockchains, keyless. On-chain analysts, indexers and dashboards constantly need \"what block was chain X at time T\" to query historical state, and \"which blocks cover this time window\" to scan a period. This API answers both — for a single moment and for a date range (returning the start and end block plus the block count and average block time). Live, nothing stored. The timestamp-to-block layer for EVM and non-EVM chains alike. Backed by the open DeFiLlama coins API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/blocktime-api","description":"oanor gateway"}],"tags":[{"name":"Blocks"},{"name":"Meta"}],"components":{"securitySchemes":{"oanorKey":{"type":"apiKey","in":"header","name":"x-oanor-key","description":"Get your key at https://www.oanor.com/developer/keys"}}},"security":[{"oanorKey":[]}],"paths":{"/v1/at":{"get":{"operationId":"get_v1_at","tags":["Blocks"],"summary":"Block height at a timestamp or date on a chain","description":"","parameters":[{"name":"chain","in":"query","required":true,"description":"Chain (ethereum, polygon, arbitrum, base, optimism, bsc, avax...)","schema":{"type":"string"},"example":"ethereum"},{"name":"timestamp","in":"query","required":true,"description":"Unix timestamp (seconds); or use date=YYYY-MM-DD","schema":{"type":"string"},"example":"1704067200"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"The block that was live at (or closest at/after) the requested time. drift_seconds is how far the block's timestamp is from the request.","chain":"ethereum","source":"DeFiLlama","block_height":18908895,"drift_seconds":11,"block_timestamp":1704067211,"requested_timestamp":1704067200},"meta":{"timestamp":"2026-06-14T08:04:14.260Z","request_id":"762c6837-b7e5-4f32-834c-adb9eade76d8"},"status":"ok","message":"Block at timestamp retrieved successfully","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/range":{"get":{"operationId":"get_v1_range","tags":["Blocks"],"summary":"Start/end block, block count and avg block time for a window","description":"","parameters":[{"name":"chain","in":"query","required":true,"description":"Chain","schema":{"type":"string"},"example":"ethereum"},{"name":"start","in":"query","required":true,"description":"Window start: unix timestamp or date (YYYY-MM-DD)","schema":{"type":"string"},"example":"2024-01-01"},{"name":"end","in":"query","required":true,"description":"Window end: unix timestamp or date","schema":{"type":"string"},"example":"2024-02-01"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"The first and last block covering the time window, the number of blocks in it, and the average block time across the window.","chain":"ethereum","source":"DeFiLlama","end_block":19129889,"block_count":220994,"start_block":18908895,"end_timestamp":1706745600,"start_timestamp":1704067200,"duration_seconds":2678400,"avg_block_time_seconds":12.12},"meta":{"timestamp":"2026-06-14T08:04:14.428Z","request_id":"6b10183e-b947-46c9-a849-701b8387813b"},"status":"ok","message":"Block range retrieved successfully","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/meta":{"get":{"operationId":"get_v1_meta","tags":["Meta"],"summary":"Service metadata & live sample","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"at takes chain (e.g. ethereum, polygon, arbitrum, base, optimism, bsc) and timestamp (unix seconds) or date (YYYY-MM-DD). range takes chain, start and end (each a timestamp or date).","sample":{"chain":"ethereum","block_height":18908895},"source":"DeFiLlama open coins API (coins.llama.fi/block), live","service":"blocktime-api","endpoints":{"GET /v1/at":"Block height at a timestamp/date on a chain (chain=ethereum, timestamp=1704067200).","GET /v1/meta":"This document.","GET /v1/range":"Start/end block, block count and avg block time for a window (chain, start, end)."},"description":"Convert a timestamp or date into the block number that was live at that moment on any of 100+ blockchains, keyless. Answers the two questions on-chain analysts ask constantly: what block was chain X at time T (to query historical state), and which blocks cover a time window (to scan a period — returning start and end block, block count and average block time). Live, nothing stored beyond a short cache. The timestamp-to-block layer for EVM and non-EVM chains alike. Backed by the open DeFiLlama coins API.","upstream_status":"ok"},"meta":{"timestamp":"2026-06-14T08:04:14.500Z","request_id":"55d8d174-d0e1-466d-a6c6-e45d4e847046"},"status":"ok","message":"Meta","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}}},"x-oanor-pricing":[{"slug":"free","name":"Free","price_cents_month":0,"monthly_call_quota":6000,"rps_limit":3,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":860,"monthly_call_quota":140000,"rps_limit":8,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":2950,"monthly_call_quota":900000,"rps_limit":20,"hard_limit":true},{"slug":"business","name":"Business","price_cents_month":8600,"monthly_call_quota":5500000,"rps_limit":50,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/blocktime-api"}