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.
/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"
| Parameter | Description |
|---|---|
blockNumberquery · integer · optional | The block height. Give this or blockHash, not both. |
blockHashquery · string · optional | The block hash, 0x followed by 64 hexadecimal characters. Give this or blockNumber, not both. |
chainpath · 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.
| Field | Type | Description |
|---|---|---|
block | object | null | The block, or null when the chain has no block with this number or hash. |
block.number | integer | The block height. |
block.hash | string | The block hash. |
block.parentHash | string | null | The hash of the block before this one, or null when not published. |
block.timestamp | integer | null | Unix seconds the block was produced at. |
block.transactionCount | integer | null | Transactions in the block. 0 is a real empty block, different from null. |
block.gasUsed | string | null | Gas used by the block, as a decimal string. |
block.gasLimit | string | null | The 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.baseFeePerGasWei | string | null | Base fee per gas in wei, as a decimal string. "0" is real (BNB); null means not published. |
block.miner | string | null | The 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