Query Parameters
- Raw amount to swap (before decimals)
- Input Amount if
SwapMode=ExactIn
- Output Amount if
SwapMode=ExactOut
- Default: 50
- This is threshold denoted in basis points.
- If exact in and output amount exceeds the threshold, then the swap transaction will fail.
- 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
- Multiple DEXes can be pass in by comma separating them
- For example:
dexes=Raydium,Orca+V2,Meteora+DLMM
- If a DEX is indicated, the route will only use that DEX
- Full list of DEXes here: https://lite-api.jup.ag/swap/v1/program-id-to-label
- Multiple DEXes can be pass in by comma separating them
- For example:
excludeDexes=Raydium,Orca+V2,Meteora+DLMM
- If a DEX is indicated, the route will not use that DEX
- Full list of DEXes here: https://lite-api.jup.ag/swap/v1/program-id-to-label
- Restrict intermediate tokens within a route to a set of more stable tokens
- This will help to reduce exposure to potential high slippage routes
- Direct route limits Jupiter routing to single hop routes only
- This may result in worse routes
- Instead of using versioned transaction, this will use the legacy transaction
- Take fees in basis points
- If
platformFeeBps
is passed in, thefeeAccount
in/swap
must be passed as well
- 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
- The version of instruction to use in the swap program
Available options:
V1
, V2
- No longer applicable, only required to pass in via
/swap
endpoint
Response
200 - application/json
Successful response to be used in /swap
- Calculated output amount from routing engine
- The value includes platform fees and DEX fees, excluding slippage
- Calculated minimum output amount after accounting for
slippageBps
on theoutAmount
value - Not used by
/swap
endpoint to build transaction
Available options:
ExactIn
, ExactOut
Required range:
x >= 0