Skip to main content
GET
/
quote
quote
curl --request GET \
  --url https://lite-api.jup.ag/swap/v1/quote
{
  "inputMint": "<string>",
  "inAmount": "<string>",
  "outputMint": "<string>",
  "outAmount": "<string>",
  "otherAmountThreshold": "<string>",
  "swapMode": "ExactIn",
  "slippageBps": 1,
  "platformFee": {
    "amount": "<string>",
    "feeBps": 123
  },
  "priceImpactPct": "<string>",
  "routePlan": [
    {
      "swapInfo": {
        "ammKey": "<string>",
        "label": "<string>",
        "inputMint": "<string>",
        "outputMint": "<string>",
        "inAmount": "<string>",
        "outAmount": "<string>",
        "feeAmount": "<string>",
        "feeMint": "<string>"
      },
      "percent": 123,
      "bps": 123
    }
  ],
  "contextSlot": 123,
  "timeTaken": 123
}

Query Parameters

inputMint
string
required
outputMint
string
required
amount
integer
required
  • Raw amount to swap (before decimals)
  • Input Amount if SwapMode=ExactIn
  • Output Amount if SwapMode=ExactOut
slippageBps
integer
default:50
  • Default: 50
  • This is threshold denoted in basis points.
  • If exact in and output amount exceeds the threshold, then the swap transaction will fail.
swapMode
enum<string>
default:ExactIn
  • ExactOut is for supporting use cases where you need an exact output amount
  • In the case of ExactIn, the slippage is on the output token
  • In the case of ExactOut, the slippage is on the input token
  • Not all AMMs support ExactOut: Currently only Orca Whirlpool, Raydium CLMM, Raydium CPMM
  • We do not recommend using ExactOut for most use cases
Available options:
ExactIn,
ExactOut
dexes
string[]
excludeDexes
string[]
restrictIntermediateTokens
boolean
default:true
  • Restrict intermediate tokens within a route to a set of more stable tokens
  • This will help to reduce exposure to potential high slippage routes
onlyDirectRoutes
boolean
default:false
  • Direct route limits Jupiter routing to single hop routes only
  • This may result in worse routes
asLegacyTransaction
boolean
default:false
  • Instead of using versioned transaction, this will use the legacy transaction
platformFeeBps
integer
  • Take fees in basis points
  • If platformFeeBps is passed in, the feeAccount in /swap must be passed as well
maxAccounts
integer
default:64
  • Rough estimate of the max accounts to be used for the quote
  • Useful if composing your own transaction or to be more precise in resource accounting for better routes
instructionVersion
enum<string>
default:V1
  • The version of instruction to use in the swap program
Available options:
V1,
V2
dynamicSlippage
boolean
default:false
  • No longer applicable, only required to pass in via /swap endpoint

Response

200 - application/json

Successful response to be used in /swap

inputMint
string
required
inAmount
string
required
outputMint
string
required
outAmount
string
required
  • Calculated output amount from routing engine
  • The value includes platform fees and DEX fees, excluding slippage
otherAmountThreshold
string
required
  • Calculated minimum output amount after accounting for slippageBps on the outAmount value
  • Not used by /swap endpoint to build transaction
swapMode
enum<string>
required
Available options:
ExactIn,
ExactOut
slippageBps
integer
required
Required range: x >= 0
priceImpactPct
string
required
routePlan
object[]
required
platformFee
object
contextSlot
integer
timeTaken
number
I