Chains API

A block's transactions

Every transaction in one EVM block, in order, with sender, recipient, value, success or failure, gas, the function called and the ERC-20 / ERC-721 token transfers each emitted.

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

What it returns

Every transaction in ONE block, in block order: sender, recipient, native value, whether it succeeded, gas used and paid, the contract it created and the function it called, plus the ERC-20 and ERC-721 Transfer events it emitted. Amounts are raw decimal strings (never Number() them). Transfer events that do not follow either standard's shape are left out, and calls between contracts inside a transaction are not listed here. A block that has not been produced yet answers block: null and transactions: null. Busy blocks hold several hundred transactions.

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

query · integer · required

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

path · string · required

Ethereum, BNB, Base, Stable, Arc or RHC. SOL returns 400: no wired source answers a Solana block's transactions. 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 A block's transactions
FieldTypeDescription
blockNumberintegerThe block number asked about.
blockobject | nullThe block, or null when it has not been produced yet.
block.numberintegerThe block height.
block.hashstringThe block hash.
block.timestampintegerUnix seconds the block was produced at.
transactionsobject[] | nullIn block order. A real empty array for a block with none; null exactly when block is.
transactions[].hashstringThe transaction hash.
transactions[].indexintegerPosition of the transaction in the block, from 0.
transactions[].fromstringThe sender.
transactions[].tostring | nullThe recipient. null when the transaction created a contract.
transactions[].valueWeistringNative coin sent, in wei, as a decimal string.
transactions[].statusstring | nullWhether it executed or reverted. null only on blocks from before the chain recorded it.
transactions[].gasUsedintegerGas the transaction used.
transactions[].effectiveGasPriceWeistring | nullWhat one unit of gas cost it, wei, decimal string. 0 is real on chains and system transactions that pay no gas.
transactions[].contractCreatedstring | nullThe contract it created, or null.
transactions[].methodIdstring | nullThe first four bytes of the call data (the function called), or null when there is no call data.
transactions[].tokenTransfersobject[]The standard ERC-20 and ERC-721 Transfer events it emitted, in log order. A real empty array when none.
transactions[].tokenTransfers[].logIndexintegerPosition of the event in the block.
transactions[].tokenTransfers[].tokenstringThe token contract.
transactions[].tokenTransfers[].standardstringerc20 when the event moved an amount, erc721 when it moved one token id.
transactions[].tokenTransfers[].fromstringSender. The zero address on a mint.
transactions[].tokenTransfers[].tostringRecipient. The zero address on a burn.
transactions[].tokenTransfers[].amountstring | nullRaw token units as a decimal string, no decimals applied. null on erc721.
transactions[].tokenTransfers[].tokenIdstring | nullThe token id as a decimal string. null on erc20.

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