Swap
quote
Request for a quote to be used in POST /swap
:::note Refer to Swap API doc for more information :::
get/quote
Query parameters
inputMintstring required
outputMintstring required
amountinteger required
- Raw amount to swap (before decimals)
- Input Amount if SwapMode=ExactIn
- Output Amount if SwapMode=ExactOut
slippageBpsinteger
swapMode'ExactIn' | 'ExactOut'
- ExactOut is for supporting use cases where you need an exact output amount, like using Swap API as a payment service
- 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
dexesstring[]
- 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
excludeDexesstring[]
- 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
restrictIntermediateTokensboolean
- Restrict intermediate tokens within a route to a set of more stable tokens
- This will help to reduce exposure to potential high slippage routes
onlyDirectRoutesboolean
- Direct Routes limits Jupiter routing to single hop routes only
- This may result in worse routes
asLegacyTransactionboolean
- Instead of using versioned transaction, this will use the legacy transaction
platformFeeBpsinteger
- Take fees in basis points
- Used together with feeAccount in /swap, see Adding Fees guide
maxAccountsinteger
- 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
dynamicSlippageboolean
- If true, slippageBps will be overriden by Dynamic Slippage's estimated value
- The value is returned in /swap endpoint
Response
Successful response to be used in /swap