tradeReceipt
Tells you whether the transactions POST /trade/v1/swap returned did what the quote promised, once you've sent them. It only reads the chain.
Cost: free, never x402-gated.
Key inputs:
quoteId(the one you called POST /trade/v1/swap with) andtxHashes, the 1 to 4 transactions you sent for it: the swap, and any approvals. It answers for a quote /trade/v1/swap handed transactions for in the last hour, else 404swap_not_found, and only for that quote's transactions, sent from itstaker: an approval to the input token, or a swap to ArcgateRouter whose deadline one of the quote's /trade/v1/swap or /trade/v1/swap/tx answers issued and whose output goes to itsrecipient, else 400invalid_request.Smart-contract wallets: a Safe, an ERC-4337 account or a batching EIP-7702 wallet sends its transaction from an executor or bundler, or to itself, not from the taker to ArcgateRouter, so this answers 400
invalid_requestfor it. Check that transaction's own receipt and your wallet's success event instead.Returns:
result, from the swap transactions. One that filled decides it:passwhendeliveredis at leastminAmountOut, elsefail(a round 1 that reverted doesn't undo a round 2 that filled). With none filled:pendingwhile one is not mined yet, elsefail: it reverted or was never mined by 60s after its deadline (statusexpired, ornot_foundwhen the chain never saw it). Approvals are listed but don't change the result.deliveredis whatrecipientreceived oftoken(the output), read from the swap transaction's Transfer logs, in base units. Alsoblock, each transaction'sstatus, andreason, one sentence on a fail or pending. The first result from a mined swap is final: asking again returns it.Limits: one chain read per quote every 5s (the same
txHashesinside that get the last answer; other hashes get 429receipt_rate_limitedwithretryAfterSec), and at most 132 per quote (then 429receipt_reads_exhausted, for good).Next:
pass: tell the user what they bought (deliveredoftoken).fail: follownext:requotewhen no swap transaction succeeded (nothing filled; quote again),stopwhen one did (tell themreason, and don't trade again).pending: ask again in a few seconds.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| quoteId | Yes | ||
| txHashes | Yes |