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.
/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>"
| Parameter | Description |
|---|---|
blockNumberquery · integer · required | The block number to read, on the chain named in the path. |
chainpath · 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.
| Field | Type | Description |
|---|---|---|
blockNumber | integer | The block number asked about. |
block | object | null | The block, or null when it has not been produced yet. |
block.number | integer | The block height. |
block.hash | string | The block hash. |
block.timestamp | integer | Unix seconds the block was produced at. |
transactions | object[] | null | In block order. A real empty array for a block with none; null exactly when block is. |
transactions[].hash | string | The transaction hash. |
transactions[].index | integer | Position of the transaction in the block, from 0. |
transactions[].from | string | The sender. |
transactions[].to | string | null | The recipient. null when the transaction created a contract. |
transactions[].valueWei | string | Native coin sent, in wei, as a decimal string. |
transactions[].status | string | null | Whether it executed or reverted. null only on blocks from before the chain recorded it. |
transactions[].gasUsed | integer | Gas the transaction used. |
transactions[].effectiveGasPriceWei | string | null | What one unit of gas cost it, wei, decimal string. 0 is real on chains and system transactions that pay no gas. |
transactions[].contractCreated | string | null | The contract it created, or null. |
transactions[].methodId | string | null | The first four bytes of the call data (the function called), or null when there is no call data. |
transactions[].tokenTransfers | object[] | The standard ERC-20 and ERC-721 Transfer events it emitted, in log order. A real empty array when none. |
transactions[].tokenTransfers[].logIndex | integer | Position of the event in the block. |
transactions[].tokenTransfers[].token | string | The token contract. |
transactions[].tokenTransfers[].standard | string | erc20 when the event moved an amount, erc721 when it moved one token id. |
transactions[].tokenTransfers[].from | string | Sender. The zero address on a mint. |
transactions[].tokenTransfers[].to | string | Recipient. The zero address on a burn. |
transactions[].tokenTransfers[].amount | string | null | Raw token units as a decimal string, no decimals applied. null on erc721. |
transactions[].tokenTransfers[].tokenId | string | null | The 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