Chains API

The blocks in a rollup settlement batch

Every rollup block one settlement batch carries, newest first, 50 per page: number, hash, timestamp, transaction count, gas and base fee.

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

What it returns

Every rollup block in one settlement batch, newest first, 50 per page. A batch is one contiguous block range, so the walk ends at the batch's first block; keep passing nextCursor back as cursor until it is null. Where the batch stands on the parent chain, and its block range and transaction count, are in rollup-settlement. 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-blocks/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 blocks in a rollup settlement batch
FieldTypeDescription
batchintegerThe batch asked about.
blocksobject[]Newest first, one contiguous run of block numbers. Never empty.
blocks[].numberintegerThe block number.
blocks[].hashstringThe block hash.
blocks[].parentHashstring | nullThe previous block's hash; null when not known.
blocks[].timestampinteger | nullUnix seconds the block was produced at; null when not known.
blocks[].transactionCountinteger | nullTransactions in the block, system transactions included; null when not known.
blocks[].gasUsedstring | nullGas used, as a decimal string; null when not known.
blocks[].gasLimitstring | nullThe block gas limit, as a decimal string; null when not known.
blocks[].baseFeePerGasWeistring | nullThe base fee per gas in wei, as a decimal string; null when not known.
blocks[].minerstring | nullThe address the block names as its producer, lowercase; 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