GET /v1/quotes/{id}. Check it until the swap is done, or have changes sent to you with webhooks. What each status means is in Quotes and statuses.
Check the status
POST /v1/quotes returned, as it stands now.
After a page reload, an escrow quote that’s still
awaiting_deposit can give back the steps to send: add ?withTransactions=true. Once a deposit is seen, or the quote expires, they’re left out.
How often to check: every 2 to 5 seconds while the user is watching, and stop once the status is final. etaSecs gives a rough idea of how long it’ll take. If you’re tracking many swaps at once, use webhooks instead: every check counts toward your rate limit.
Get updates sooner
Tern finds every deposit and swap on its own. If you send a transaction’s hash as soon as it’s mined, the status updates a little sooner:202 Accepted with an empty body. See POST /v1/index.
Show a user’s swap history
GET /v1/quotes finds firm quotes, newest first. Search by one of:
address: swaps that address sent or received;txHash: the swap a transaction belongs to, whether it’s a deposit, a payment, a refund, or a same-chain swap.
limit. For the next page, pass nextCursor as cursor. The last page has no nextCursor.
Private swaps don’t name any address, so searching by address won’t find them. Keep their quote IDs yourself.
Measure how fast swaps fill
On a cross-chain swap,to.lockedAt minus from.confirmedAt is how long the solver took to lock the user’s tokens once the deposit was confirmed. Each time appears once that step has happened.