Chains API

The newest blocks on a chain

The newest blocks one EVM chain has produced, head first, with hash, time, transaction count, gas, base fee and miner.

GET/api/external/chain-analysis/latest-blocks/{chain}

What it returns

The newest limit blocks one chain has produced, head first and one per height: number, hash, parent hash, time, transaction count, gas used and limit, base fee and the miner address. Gas figures and the base fee are decimal strings (the base fee in wei); "0" is a real value, as on BNB, and null means it was not published. What miner names differs by chain: the validator on BNB, the fee recipient on Ethereum (usually a block builder), a sequencer fee vault on Base, the fixed sequencer address on RHC. On the fastest chains the head moves several times a second, so two calls a second apart rarely agree on it.

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/latest-blocks/BNB"
Parameters
ParameterDescription
limit

query · integer · optional

How many blocks to return, head included: 1 to 20. Defaults to 10.
chain

path · string · required

Ethereum, BNB, Base, Stable, Arc or RHC. SOL returns 400: no wired source publishes its newest slots with hashes and times, only a bare slot number. CELO, ARB, OP and SCROLL return 400 here.

Response fields

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

Response fields of The newest blocks on a chain
FieldTypeDescription
blocksobject[]Head first, one block per height.
blocks[].numberintegerThe block height.
blocks[].hashstringThe block hash.
blocks[].parentHashstring | nullThe hash of the block before this one, or null when not published.
blocks[].timestampinteger | nullUnix seconds the block was produced at.
blocks[].transactionCountinteger | nullTransactions in the block. 0 is a real empty block, different from null.
blocks[].gasUsedstring | nullGas used by the block, as a decimal string.
blocks[].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.
blocks[].baseFeePerGasWeistring | nullBase fee per gas in wei, as a decimal string. "0" is real (BNB); null means not published.
blocks[].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