Chains API
A block's internal calls
Every internal call one block executed — calls, delegatecalls, creates and self-destructs, with value, gas and whether each reverted — in execution order, a page at a time. RHC, ETH, OP and SCROLL.
/api/external/chain-analysis/block-internal-transactions/{chain}What it returns
The calls contracts made while one block's transactions ran — call, delegatecall, staticcall, callcode, create, create2 and selfdestruct — in execution order: by transaction index, then by the call's index within its transaction. Up to 50 a page; pass nextCursor back as cursor for the next page of the same block (a cursor issued for another chain or block returns 400). Reverted calls are listed, with success false. RHC, ETH, OP and SCROLL. A block not indexed yet — not produced, or produced seconds ago (up to about 40 s on ETH) — answers indexed: false and internalTransactions: null. A block indexed in about the last 15 minutes that shows no calls yet answers internalTransactions: null — its calls may not be indexed yet — rather than []. [] is a settled block that made no internal calls.
Chains
- Ethereum ETH
- Robinhood Chain RHC
- Optimism OP
- Scroll SCROLL
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-internal-transactions/ETH?blockNumber=<blockNumber>"
| Parameter | Description |
|---|---|
blockNumberquery · integer · required | The block number to read, on the chain named in the path. |
cursorquery · string · optional | The nextCursor of the previous page for the same chain and block. Omit for the first page. |
chainpath · string · required | RHC, ETH, OP or SCROLL; every other chain returns 400, because no wired source lists a block's internal calls for it. |
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. |
indexed | boolean | false when this block is not indexed yet: not produced, or produced seconds ago. |
internalTransactions | object[] | null | In execution order: by transaction index, then by index. [] when the block made no internal calls; null when the block is not indexed yet, or was indexed so recently that its calls may not be yet. |
internalTransactions[].transactionHash | string | The transaction that made the call, lowercase. |
internalTransactions[].blockNumber | integer | The block the transaction was mined in. |
internalTransactions[].transactionIndex | integer | The transaction's position in its block, from 0. |
internalTransactions[].index | integer | The call's position among its transaction's internal calls, from 1 in execution order. |
internalTransactions[].type | string | The EVM call kind. delegatecall, staticcall and callcode are reported as types of their own, not as a plain call. |
internalTransactions[].from | string | The contract that made the call, lowercase. |
internalTransactions[].to | string | null | The callee, lowercase. null on a create or create2, whose address is createdContract. |
internalTransactions[].createdContract | string | null | The contract a create or create2 made, lowercase. null on every other type. |
internalTransactions[].valueWei | string | Native coin sent with the call, in wei, as a decimal string. "0" is a real zero. |
internalTransactions[].gasLimit | string | Gas the call was given, as a decimal string. |
internalTransactions[].success | boolean | false when the call reverted: its value did not move and its effects were undone. |
internalTransactions[].error | string | null | Why the call reverted, when that is known (e.g. "execution reverted", "Parent reverted"). |
internalTransactions[].timestamp | integer | Unix SECONDS of the block. |
nextCursor | string | null | Pass back as cursor for the next page of this block; null on the last page. |
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