Skip to main content
Treat every quote as a snapshot-bound instruction set that can expire before the user signs.

Definition

Quotes use the latest pool snapshot available to the service. The response can also encode slippage bounds, route choices, transaction fields, and a TransactionEnvelope or transaction object. Those fields belong to that quote request.

Decision Table

NeedAction
Display indicative pricingQuote without sender and refresh on user action
Build transaction dataRequote with sender when the user confirms
Require Stellar ledger freshnessSet fresh=true on the Stellar quote endpoint
Compare route detailPass includePaths=true for the request you inspect
Retry after route failureRequote; do not reuse old transaction data

Worked Example

curl "https://swap.xoxno.com/api/v1/quote?\
from=WEGLD-bd4d79&\
to=USDC-c76f1f&\
amountIn=1000000000000000000&\
slippage=0.01&\
sender=erd1..."
Verify the result before signing:
  • amountOut matches the UI route.
  • amountOutMin reflects the slippage tolerance you showed the user.
  • transaction or txData came from the same quote request.
  • The user has not changed token, amount, slippage, or sender since the quote.

Edge Cases

CaseBehaviorFix
User changes slippage after quoteEncoded transaction data can carry the old minimum output.Requote.
User changes senderNonce, gas, source account, or envelope fields can differ.Requote with the new sender.
Pool state changes before signingOutput can differ on-chain or fail slippage checks.Requote near confirmation.
Stellar snapshot is stalefresh=true can return 409 when drift is above the service threshold.Retry after the snapshot catches up.
Do not reuse txData, transaction objects, or TransactionEnvelope values across quote requests.