DeFi API

Get latest block

Changed on

/v4/data/defi/blocks/latest

10 credit per API call

Get information about latest added block 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
  • Robinhood - robinhood-mainnet / robinhood-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, you can just provide a chain.

get/v4/data/defi/blocks/latest

Request

  • Base URL
    https://api.tatum.io
  • URL
    https://api.tatum.io/v4/data/defi/blocks/latest
  • Auth
    API key in header x-api-key

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' | 'robinhood-mainnet' | 'robinhood-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.

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",
  "txHashes": [
    "0x19eaae1f7bdd28605f4175d7e87c9de68431bf76e85a262e268252a84bfc3984"
  ]
}

Changes

    • info

      added the new enum value robinhood-mainnet to the query request parameter chain

    • info

      added the new enum value robinhood-testnet to the query request parameter chain