apiSubmit quote, your user signs the order payload and TetraFi puts the settlement on-chain. No gas, no RPC, no broadcast logic - the right default for wallets and super-apps where UX comes first.
There is no last-look trade-off here: every RFQ quote is already a firm, signed commitment, and settlement runs delivery-versus-payment through the escrow. What changes with apiSubmit is only who lands the transaction.
Reach for this when your users should never encounter gas at all - the wallet and super-app case. Teams operating their own submission infrastructure generally take
walletBroadcast instead; the quickstart covers that route.The Two Paths Side by Side
1. Get a Quote You Can Submit
Request quotes as usual - the execution mode rides on each quote, so there’s no request flag to set:How Your Funds Reach Escrow
Instead of approval flags on the request, the funding mechanism is a property of the corridor and token - preflight selects it and tells you what (if anything) to set up:2. Sign the Order Payload
Preflight your chosen quote; itsorderSignature action carries the complete EIP-712 envelope. Sign it exactly as returned - domain, types, and message all arrive assembled:
Inside the escrow-v0 payload
Inside the escrow-v0 payload
Whatever the shape, the envelope always binds: the funding wallet and receivers, the escrowed amounts and minimum deliveries, an expiry (after which the escrow refunds instead of settling), a replay-protection nonce, and the terms your
integrityChecksum locks to your submission.Sign the structure verbatim - anything you’d want different (receiver, amounts, expiry) is decided at quote time, never at signing time.3. Submit It
4. Follow It to Settlement
orders:{orderId} on wss://api.tetrafi.io/api/v1/ws?token=<key> for push updates:
A failed
apiSubmit order never strands funds: the delivery-or-refund escrow returns your input if delivery can’t be proven before expiry.
Full Example
Using Permit2 Approvals
Permit2 turns per-settler approvals into one reusable grant: approve the canonical Permit2 contract once per token, and every subsequent order authorizes its own escrow pull inside the signature you were already making. How it shows up in practice:- First trade on a token: preflight returns a
tokenApprovalaction (frequency: "reusableSetup") - a prepared transaction granting Permit2 a bounded allowance. Broadcast it once. - Every trade after: no approval action appears; the order’s signed payload itself carries the pull authorization. One signature, zero extra transactions.
- USDC-style tokens: may skip approvals entirely - EIP-3009
transferWithAuthorizationauthorizes the transfer inside the message, so preflight simply won’t list a setup step.
Bounded, reusable grants (rather than infinite approvals to many contracts) are the point: your exposure is one audited contract, sized allowances, and signatures that expire with their orders.
After the one-time setup, subsequent trades on the same token are pure sign-and-submit - the fastest path from quote to settlement the RFQ API offers.