Chains API
The canonical-bridge deposits and withdrawals of an L2, with their status
Canonical-bridge deposits and withdrawals of an L2: status, whether claimable, both chains' transactions and times. RHC chain-wide or by transaction; BASE by wallet; OP and SCROLL chain-wide.
/api/external/chain-analysis/bridge-transfers/{chain}What it returns
The messages that crossed the canonical bridge between this L2 and its parent chain, one direction at a time (direction: deposit into the L2, withdrawal out of it), 50 per page. Each row gives its status (initiated, sent, proven, confirmed, relayed, or null when it is not stated), whether a withdrawal can be claimed now, the transaction and block on each chain when known, and when it started. What can be asked differs by chain: on RHC, chain-wide (newest first) or the withdrawals one L2 transaction started (transaction); on BASE, one wallet's (address, oldest first); on OP and SCROLL, chain-wide only (newest first). Anything else is a 400 that says what to pass. Keep passing nextCursor back as cursor until it is null.
Chains
- Base BASE
- 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/bridge-transfers/BASE"
| Parameter | Description |
|---|---|
directionquery · string · optional | Required. deposit (parent chain into this L2) or withdrawal (this L2 out to its parent chain). |
addressquery · string · optional | BASE, and required there: only this wallet's transfers — the recipient of deposits, the sender of withdrawals. 0x followed by 40 hexadecimal characters. Not available on RHC, OP or SCROLL (400). |
transactionquery · string · optional | RHC, with direction=withdrawal only: the withdrawals this L2 transaction started. 0x followed by 64 hexadecimal characters; a single page, so it cannot be combined with cursor. Not available on BASE, OP or SCROLL (400). |
cursorquery · string · optional | An opaque cursor from a previous response's nextCursor, for the next page. It only pages the chain, direction and wallet it was issued for; an empty one, or one over 512 characters, is a 400 (enforced after the API-key gate). |
chainpath · string · required | RHC, BASE, 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 |
|---|---|---|
direction | string | The direction asked for. |
address | string | null | The wallet asked about, lowercase; null when not filtered by one. |
transaction | string | null | The transaction asked about, lowercase; null when not filtered by one. |
order | string | How transfers is ordered: oldest_first on BASE, newest_first everywhere else. |
transfers | object[] | In order. [] when nothing matched. |
transfers[].direction | string | Same as the request's. |
transfers[].messageId | string | null | The bridge's own number for the message, as a decimal string: its message index on RHC and SCROLL, the withdrawal nonce on BASE and OP. null when not known (BASE and OP deposits). |
transfers[].status | string | null | initiated: started on its origin chain, nothing further yet. sent (RHC withdrawals): posted to the parent chain, inside its challenge period. proven (BASE and OP withdrawals): proven on the parent chain, claimable once its challenge window ends. confirmed (RHC and OP withdrawals): past its challenge period and claimable. relayed: executed on the destination chain. null when it is not stated (OP deposits): check l2TransactionHash for the outcome. |
transfers[].claimable | boolean | null | Withdrawals: whether it can be claimed on the parent chain now (true only when confirmed). null for deposits, and for a withdrawal whose next step is not known. |
transfers[].originAddress | string | null | The address that started it, lowercase; null when not known (BASE deposits, SCROLL). |
transfers[].l2TransactionHash | string | null | The transaction on this L2: where a withdrawal started, or where a deposit was executed (on OP, given even though the deposit's status is not stated). null until it happens, or when not known. |
transfers[].l2BlockNumber | integer | null | The L2 block of l2TransactionHash; null when not known. |
transfers[].parentTransactionHash | string | null | The transaction on the parent chain: where a deposit started, or where a withdrawal was executed (claimed). null until it happens, or when not known. |
transfers[].parentBlockNumber | integer | null | The parent-chain block of parentTransactionHash; null when not known. |
transfers[].parentProveTransactionHash | string | null | BASE withdrawals: the parent-chain transaction that proved it. null otherwise, or before it is proven. |
transfers[].initiatedAt | integer | null | Unix seconds it started on its origin chain; null when not known. |
transfers[].relayedAt | integer | null | Unix seconds it was executed on the destination chain; null when not relayed or 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