---
title: "Get block by time"
method: GET
path: "/v4/data/block/time"
tags: ["DeFi API"]
---

# Get block by time

`GET /v4/data/block/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.

## 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
- `time` string
- `unix` number

## Response `200`

OK

- number

## Other responses

- `400` — Bad Request
- `401` — Unauthorized. Not valid or inactive subscription key present in the HTTP Header.
- `403` — Forbidden. The request is authenticated, but it is not possible to perform the operation due to logical error or invalid permissions.
- `500` — Internal server error. There was an error on the server during the processing of the request.

---

[API](https://skmtc.net/tatum/apis/blockchain-data.md) · [All operations](https://skmtc.net/tatum/apis/blockchain-data/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tatum/blockchain-data/revisions/8622ee4b8fae/schema)
