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.

GET/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"
Parameters
ParameterDescription
direction

query · string · optional

Required. deposit (parent chain into this L2) or withdrawal (this L2 out to its parent chain).
address

query · 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).
transaction

query · 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).
cursor

query · 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).
chain

path · 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.

Response fields of The canonical-bridge deposits and withdrawals of an L2, with their status
FieldTypeDescription
directionstringThe direction asked for.
addressstring | nullThe wallet asked about, lowercase; null when not filtered by one.
transactionstring | nullThe transaction asked about, lowercase; null when not filtered by one.
orderstringHow transfers is ordered: oldest_first on BASE, newest_first everywhere else.
transfersobject[]In order. [] when nothing matched.
transfers[].directionstringSame as the request's.
transfers[].messageIdstring | nullThe 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[].statusstring | nullinitiated: 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[].claimableboolean | nullWithdrawals: 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[].originAddressstring | nullThe address that started it, lowercase; null when not known (BASE deposits, SCROLL).
transfers[].l2TransactionHashstring | nullThe 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[].l2BlockNumberinteger | nullThe L2 block of l2TransactionHash; null when not known.
transfers[].parentTransactionHashstring | nullThe 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[].parentBlockNumberinteger | nullThe parent-chain block of parentTransactionHash; null when not known.
transfers[].parentProveTransactionHashstring | nullBASE withdrawals: the parent-chain transaction that proved it. null otherwise, or before it is proven.
transfers[].initiatedAtinteger | nullUnix seconds it started on its origin chain; null when not known.
transfers[].relayedAtinteger | nullUnix seconds it was executed on the destination chain; null when not relayed or 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