Find which chain holds a transaction
/v1/txs/{hash}Use this when you have a transaction hash but do not know which chain it belongs to, for example a hash a user pasted. Sona asks every chain at the same time and answers as soon as one of them has the transaction. The answer says which chain holds it, in which block, and gives the path that returns the full transaction.
What you can pass. {hash} is a transaction hash, 0x followed by 64 hex digits in any letter case, for example 0xd8da0850029a64bcf82546585d1305d349a2e2565f5b7fe329868f3c98d48966.
What comes back: data.matches is a list. Each match has chain (the chain ID that holds the transaction), id (<chain>/tx/<hash>), block (the block that holds it, or null while it is pending), finality (finalized, confirmed or pending) and href, the path of the full transaction. Today the list holds one match: the first chain to answer. Follow href to read the transaction.
If no chain has the hash, you get 404 not_found_on_supported_chains. If a chain did not answer in time, the 404 body also carries a missing list naming that chain, with a retry path for the single-chain lookup. Such a 404 is not cached, so asking again is worthwhile.
Path parameters
| Name | Type | Description |
|---|---|---|
hashRequired | string | The transaction hash: |
Response
The chain that holds the transaction, wrapped in the {data, meta, links} envelope. data.kind is tx_matches.
| Field | Type | Description |
|---|---|---|
| hash | string | The transaction hash you asked for, in lowercase. |
| kind | string | Always |
| matches | array of objects | The chains that hold the transaction. Today it has one entry, the first chain to answer. |
Cost
5 credits, because every chain is asked. Each chain is given its own lookup limit (2.5 s on Ethereum, 7 s on Monad), so the call can take up to about 7 s.
Errors
| Status | Code |
|---|---|
| 400 | invalid_id |
| 404 | not_found_on_supported_chains |
| 429 | rate_limitedcredits_exhausted |
| 500 | internal |
| 503 | upstream_unavailable |
| 504 | deadline_exceeded |
400 invalid_id if the hash is malformed. 404 not_found_on_supported_chains if no chain has the hash. 429 rate_limited or credits_exhausted. 503 upstream_unavailable or 504 deadline_exceeded if the chain data source is down or slow; retry.