Skip to content
QSwapDocs

Swap

From typing an amount to the receipt. What each part of the screen means, and every call behind it.

Swap one Solana token for another at the best price Jupiter can find, in a single transaction.

Reading the quote
10SOL
1,412.38USDC
Rate1 SOL = 141.238 USDC
Min received1,405.31 USDC
Price impact0.04%
RouteMetis · 3 pools
Fee0.1% · gasless: no
Swap
  1. You pay: type an amount, or tap 50% or MAX
  2. You receive: Jupiter's best output for this amount
  3. Token badge: verified, unverified or flagged
  4. Rate: tap to flip the direction
  5. Minimum received: the least you get after slippage
  6. Price impact: how much your trade moves the price
  7. Route: which router won and which pools it uses
  8. Fees: Jupiter's fee is already in the amount; gasless orders need no SOL

Pick the tokens

Tap a token to search for it, or paste its mint address. Check the badge: verified, unverified or flagged. See Token badges.

Type what you pay

Enter an amount, or tap 50% or MAX. MAX on SOL keeps a little back for network fees and rent.

Check the quote

Read the rate, the minimum you receive, the price impact and the route before you go on.

Swap and sign

Press Swap. Your wallet shows the transaction; approve it. Jupiter lands it and QSwap shows the receipt.

When you've signed, the app shows the swap's progress:

AfterYou see
15 s"Taking longer than usual…"
ExpiryThe order expired before it landed. Get a new price and sign again.
SuccessA receipt with the amount you actually received, and a link to Solscan.

What the button says

The button runs one ordered list of rules. The first rule that matches sets the label.

What the swap button says, and whyLive demo, running real codeFlip the conditions. Rules are checked top to bottom; the first match wins.
Conditions
Rules, in order
  1. 1No amount
  2. 2Not connected
  3. 3Quote loading
  4. 4No route
  5. 5Balance too low
  6. 6No SOL for fees, and not gasless
  7. 7Very high price impact
  8. 8Ready
Button
Swap
Every outcome
  1. 1No amount
    Enter an amount
  2. 2Not connected
    Connect wallet
  3. 3Quote loading
    Getting the best price…
  4. 4No route
    No route for this pair
  5. 5Balance too low
    Insufficient balance
  6. 6No SOL for fees, and not gasless
    Not enough SOL for fees
  7. 7Very high price impact
    Swap anyway
  8. 8Ready
    Swap
Source: src/features/docs-site/swap-model.ts → swapButton()

Behind the button

A swap, call by call
Step 13 of 13

Your wallet signs; it doesn't send

QSwap asks your wallet to sign the transaction, not to send it. The signed transaction goes back through the QSwap API to Jupiter, which lands it. For RFQ orders a market maker adds its own signature at that point, which is why the wallet only signs partially.

Each phase, from pressing Swap to the receipt, is a state in one machine. Step through it on Transaction lifecycle.