Chains API

The transactions in a rollup settlement batch

Every rollup transaction one settlement batch carries, newest first, 50 per page: hash, block, position, type, status, sender, recipient, value, fee and gas.

GET/api/external/chain-analysis/rollup-batch-transactions/{chain}

What it returns

Every rollup transaction in one settlement batch, newest block first and by position within the block, descending, 50 per page at most. System and deposit transactions are included (every RHC block opens with one at position 0, every OP block with a deposit of type 126), so the rows add up to the batch's transaction count in rollup-settlement. Keep passing nextCursor back as cursor until it is null; the last page can be empty. A batch whose blocks carry no transactions answers an empty list; a batch that does not exist or is not indexed yet is a 404 (OP batch numbers skip values, so some OP numbers never exist).

Chains

  • 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/rollup-batch-transactions/RHC"
Parameters
ParameterDescription
batch

query · integer · optional

The settlement batch number. Required.
cursor

query · string · optional

An opaque cursor from a previous response's nextCursor, for the next page. It only pages the chain and batch it was issued for; an empty one, or one over 256 characters, is a 400 (enforced after the API-key gate).
chain

path · string · required

RHC, OP or SCROLL; 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.

Response fields of The transactions in a rollup settlement batch
FieldTypeDescription
batchintegerThe batch asked about.
transactionsobject[]Newest block first, then by position, descending.
transactions[].hashstringThe transaction hash.
transactions[].blockNumberintegerThe rollup block it is in.
transactions[].indexintegerIts position in that block.
transactions[].typeinteger | nullThe transaction type, e.g. 2; 126 is an OP deposit. null when not known.
transactions[].statusstring | nullWhether it succeeded; null when not known.
transactions[].fromstringThe sender, lowercase.
transactions[].tostring | nullThe recipient, lowercase; null when the transaction created a contract.
transactions[].contractCreatedstring | nullThe contract it created, lowercase; null when none.
transactions[].valueWeistring | nullNative value sent, in wei, as a decimal string. "0" is a real zero; null when not known.
transactions[].feeWeistring | nullWhat it paid, in wei, as a decimal string; null when not known.
transactions[].gasUsedinteger | nullGas used; null when not known.
transactions[].gasPriceWeistring | nullWhat one unit of gas cost it, in wei, as a decimal string; null when not known.
transactions[].timestampinteger | nullUnix seconds of its block; null when not known.
nextCursorstring | nullPass back as cursor for the next page. 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