Chains API

Look up one block by its number or hash

One EVM block named by height or hash: hash, parent, time, transaction count, gas, base fee and miner, or null when the chain has no such block.

GET/api/external/chain-analysis/block/{chain}

What it returns

One block of a chain, named by its height or its hash: number, hash, parent hash, time, transaction count, gas used and limit, base fee and the miner address, as latest-blocks lists them. Gas figures and the base fee are decimal strings (the base fee in wei). What miner names differs by chain: the validator on BNB, the fee recipient on Ethereum, a sequencer fee vault on Base, the fixed sequencer address on RHC. block is null when the chain has no such block: a height above the head, or a hash it does not know. Ethereum keeps blocks from 15,500,000, Base answers by hash from 50,000,000 and Stable keeps about the last two million blocks (some two weeks); an older block is a 400, naming the oldest one kept when the chain says. On Stable an older hash reads as unknown: null.

Chains

  • BNB Chain BNB
  • Ethereum ETH
  • Stable STABLE
  • Base BASE
  • Robinhood Chain RHC
  • Arc ARC

Request

Send your key in the x-dex-data-key header. Replace each <placeholder> with a real value.

curl -H "x-dex-data-key: $DEXDATA_API_KEY" \
  "https://api.dexdata.io/api/external/chain-analysis/block/BNB"
Parameters
ParameterDescription
blockNumber

query · integer · optional

The block height. Give this or blockHash, not both.
blockHash

query · string · optional

The block hash, 0x followed by 64 hexadecimal characters. Give this or blockNumber, not both.
chain

path · string · required

ETH, BNB, BASE, STABLE, ARC or RHC; every other chain returns 400.

Response fields

A JSON response. Every field is always present; null means the value could not be established, never zero.

Response fields of Look up one block by its number or hash
FieldTypeDescription
blockobject | nullThe block, or null when the chain has no block with this number or hash.
block.numberintegerThe block height.
block.hashstringThe block hash.
block.parentHashstring | nullThe hash of the block before this one, or null when not published.
block.timestampinteger | nullUnix seconds the block was produced at.
block.transactionCountinteger | nullTransactions in the block. 0 is a real empty block, different from null.
block.gasUsedstring | nullGas used by the block, as a decimal string.
block.gasLimitstring | nullThe block gas limit, as a decimal string. RHC reports a fixed 1125899906842624 (2^50) on every block — a real value, not a limit blocks approach.
block.baseFeePerGasWeistring | nullBase fee per gas in wei, as a decimal string. "0" is real (BNB); null means not published.
block.minerstring | nullThe address the block names as its miner — see the endpoint description for what it is per chain.

Start building with DexData today

Sign in, create a key and make your first call in a minute. Free credits every month, and you only pay for calls that succeed.

Get a free API key