Chains API

One block's reward and transaction counts

What one confirmed block earned its proposer (plus any uncle rewards) and how many transactions it carried, broken out by kind.

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

What it returns

Facts about ONE block, addressed by number. reward is who was credited, how much (in wei, as a decimal STRING — never Number() this), and any uncle rewards; uncles is a real empty array and uncleInclusionRewardWei a real "0" on every post-Merge Ethereum block (2022-09-15 onward) — proof-of-stake has no uncles, this is not a missing answer. blockRewardWei stays real and nonzero post-Merge: it is priority-fee tip revenue to the block's fee recipient now, not the old proof-of-work subsidy. On RHC the credited address is the sequencer and blockRewardWei a real "0": a rollup block pays no reward. On ARC reward is all-null, because no reward is reported there. txnCounts answers on every chain; on Stable, RHC and ARC only total is counted and the by-kind counts are null. erc20, erc721 and erc1155 count transfer EVENTS, not transactions: one transaction moving three tokens counts three. On BNB and Base internal is null — not a zero — because internal calls are not counted there. A block number that has not been mined, or does not exist on this chain, answers with every field null rather than an error.

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-stats/BNB?blockNumber=<blockNumber>"
Parameters
ParameterDescription
blockNumber

query · integer · required

The block number to look up, on the chain named in the path.
chain

path · string · required

Ethereum, BNB, Base, Stable, RHC or ARC — the six chains this resource indexes. Every other chain returns 400. reward answers on all but ARC, and txnCounts breaks out by kind on Ethereum, BNB and Base only — see the response schema.

Response fields

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

Response fields of One block's reward and transaction counts
FieldType
rewardobject
reward.timestampnumber | null
reward.minerstring | null
reward.blockRewardWeistring | null
reward.unclesobject[]
reward.uncles[].minerstring | null
reward.uncles[].positionnumber | null
reward.uncles[].rewardWeistring | null
reward.uncleInclusionRewardWeistring | null
txnCountsobject | null
txnCounts.totalnumber | null
txnCounts.internalnumber | null
txnCounts.erc20number | null
txnCounts.erc721number | null
txnCounts.erc1155number | null

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