v1

latestOpenAPI 3.1.02026-07-243035381.4 MB
DeFi API

Get specified blocks

/v4/data/defi/blocks

10 credits per API call

Get information about blocks (when they were added, block hashes and list of transaction hashes that were processed within them) on the following blockchains:

  • Ethereum - ethereum-mainnet / ethereum-sepolia
  • 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-mainnet / monad-testnet
  • Celo - celo-mainnet / celo-testnet
  • Chiliz - chiliz-mainnet
  • 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 and specify one of the filters listed below (combination of these filters is not allowed):

  • List of block numbers separated by comma
  • Range of block numbers
  • Date range when blocks were processed
  • When you are filtering data using blockFrom and not using blockTo, blockTo is automatically added as blockFrom + 1000. The same applies when blockTo is present and blockFrom is not. In that case blockFrom is automatically added as blockTo - 1000.
get/v4/data/defi/blocks

Query parameters

chain'ethereum-mainnet' | 'ethereum-sepolia' | '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-mainnet' | 'monad-testnet' | 'celo-mainnet' | 'celo-testnet' | 'chiliz-mainnet' | '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.

blockIdsinteger[]

List of block numbers, separated by comma.

blockFromnumber
Example:16499510

Range of block numbers. Both blockFrom and blockTo need to be specified.

blockTonumber
Example:16499510

Range of block numbers. Both blockFrom and blockTo need to be specified.

timeFromstring
Example:2022-12-24T00:10

Date range when blocks were processed. Both timeFrom and timeTo need to be specified.

timeTostring
Example:2022-12-24T00:20

Date range when blocks were processed. Both timeFrom and timeTo need to be specified.

pageSizenumber
Example:10

The number of items per page (default is 50).

offsetnumber

The offset to obtain next page of the data.

Response

OK

blockNumberinteger

The block number in the blockchain.

blockTimestampinteger

The timestamp when the block was created, in milliseconds since Unix epoch.

hashstring

The hash of the block.

txHashesstring[]

The array of transaction hashes included in the block.

Example response

[
  {
    "blockNumber": 10,
    "blockTimestamp": 1598671520000,
    "hash": "0xec1a2d906f34e1981b2b1a15dbe5e10cf640e8b4b27dc056ebb65c0409b5a9af"
  },
  {
    "blockNumber": 11,
    "blockTimestamp": 1598671540000,
    "hash": "0xa78e7a9c6910fea66a981389735e0c652f1625905c6e0dca08d3f5c1694b7cc4",
    "txHashes": [
      "0x19eaae1f7bdd28605f4175d7e87c9de68431bf76e85a262e268252a84bfc3984"
    ]
  }
]