v1
latestOpenAPI 3.1.02026-07-243035381.4 MBDeFi API
Get block by time
/v4/data/block/time
20 credits per API call
Get block number by time on the following blockchains:
- Ethereum - ethereum-mainnet / ethereum-sepolia
- Bitcoin - bitcoin-mainnet
- Base - base-mainnet / base-sepolia
- Arbitrum - arb-one-mainnet / arb-testnet
- BNB (Binance) Smart Chain - bsc-mainnet / bsc-testnet
- Polygon - polygon-mainnet
- Optimism - optimism-mainnet / optimism-testnet
- Berachain - berachain-mainnet
- Unichain - unichain-mainnet / unichain-sepolia
- Monad - monad-testnet
- Celo - celo-mainnet / celo-testnet
- Avalanche - avax-mainnet / avax-testnet
- Gnosis - gno-mainnet / gno-testnet
- zkSync - zksync-mainnet / zksync-testnet
- Rootstock - rsk-mainnet / rsk-testnet
- Ethereum Classic - ethereum-classic-mainnet / ethereum-classic-testnet
- Lisk - lisk-mainnet / lisk-testnet
- XDC - xdc-mainnet / xdc-testnet
- Sonic - sonic-mainnet / sonic-blaze
To get started, provide a chain name and specify one of the filters listed below (combination of the filters is not allowed):
- time
- unix
If you pass a time or Unix timestamp that is in the future, the system will return the number for the latest block.
If you pass a time or Unix timestamp in the past (dating back to or earlier than the blockchain's genesis block), the system will return 0.
get/v4/data/block/time
Query parameters
chain'ethereum-mainnet' | 'ethereum-sepolia' | 'bitcoin-mainnet' | 'base-mainnet' | 'base-sepolia' | 'arb-one-mainnet' | 'arb-testnet' | 'bsc-mainnet' | 'bsc-testnet' | 'polygon-mainnet' | 'optimism-mainnet' | 'optimism-testnet' | 'berachain-mainnet' | 'unichain-mainnet' | 'unichain-sepolia' | 'monad-testnet' | 'celo-mainnet' | 'celo-testnet' | 'avax-mainnet' | 'avax-testnet' | 'gno-mainnet' | 'gno-testnet' | 'zksync-mainnet' | 'zksync-testnet' | 'rsk-mainnet' | 'rsk-testnet' | 'ethereum-classic-mainnet' | 'ethereum-classic-testnet' | 'lisk-mainnet' | 'lisk-testnet' | 'xdc-mainnet' | 'xdc-testnet' | 'sonic-mainnet' | 'sonic-blaze' required
Example:ethereum-mainnet
The blockchain to work with.
timestring
Example:2022-12-24T00:20
Time when block is processed.
unixnumber
Example:1587390414
Unix timestamp when block is processed.
Response
OK
number required
Example response
22838895