Every firm quote has a status you can check at 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

It’s the same quote object 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:
Tern answers 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.
Each result is the same quote object, without transactions. You get 20 results by default and up to 100 with 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.