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.
/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"
| Parameter | Description |
|---|---|
batchquery · integer · optional | The settlement batch number. Required. |
cursorquery · 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). |
chainpath · 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.
| Field | Type | Description |
|---|---|---|
batch | integer | The batch asked about. |
transactions | object[] | Newest block first, then by position, descending. |
transactions[].hash | string | The transaction hash. |
transactions[].blockNumber | integer | The rollup block it is in. |
transactions[].index | integer | Its position in that block. |
transactions[].type | integer | null | The transaction type, e.g. 2; 126 is an OP deposit. null when not known. |
transactions[].status | string | null | Whether it succeeded; null when not known. |
transactions[].from | string | The sender, lowercase. |
transactions[].to | string | null | The recipient, lowercase; null when the transaction created a contract. |
transactions[].contractCreated | string | null | The contract it created, lowercase; null when none. |
transactions[].valueWei | string | null | Native value sent, in wei, as a decimal string. "0" is a real zero; null when not known. |
transactions[].feeWei | string | null | What it paid, in wei, as a decimal string; null when not known. |
transactions[].gasUsed | integer | null | Gas used; null when not known. |
transactions[].gasPriceWei | string | null | What one unit of gas cost it, in wei, as a decimal string; null when not known. |
transactions[].timestamp | integer | null | Unix seconds of its block; null when not known. |
nextCursor | string | null | Pass 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