quote
GEThttps://lite-api.jup.ag/swap/v1/quote
Request for a quote to be used in POST /swap
note
Refer to Swap API doc for more information
Request
Query Parameters
- Raw amount to swap (before decimals)
- Input Amount if
SwapMode=ExactIn
- Output Amount if
SwapMode=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
: Currently only Orca Whirlpool, Raydium CLMM, Raydium CPMM - 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
- 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
- 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 Routes 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
- Used together with
feeAccount
in /swap, see Adding Fees guide - 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
- If true,
slippageBps
will be overriden by Dynamic Slippage's estimated value - The value is returned in
/swap
endpoint
inputMint stringrequired
outputMint stringrequired
amount integerrequired
slippageBps integer
swapMode string
Possible values: [ExactIn
, ExactOut
]
Default value:
ExactIn
dexes string[]
excludeDexes string[]
restrictIntermediateTokens boolean
Default value:
true
onlyDirectRoutes boolean
Default value:
false
asLegacyTransaction boolean
Default value:
false
platformFeeBps integer
maxAccounts integer
Default value:
64
dynamicSlippage boolean
Default value:
false
Responses
- 200
Successful response to be used in /swap
- application/json
- Schema
- Example (auto)
Schema
- 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
inputMintstringrequired
inAmountstringrequired
outputMintstringrequired
outAmountstringrequired
otherAmountThresholdstringrequired
swapModeSwapMode (string)required
Possible values: [ExactIn
, ExactOut
]
slippageBpsint32required
platformFee object
priceImpactPctstringrequired
routePlan object[]required
contextSlotnumber
timeTakennumber
{
"inputMint": "string",
"inAmount": "string",
"outputMint": "string",
"outAmount": "string",
"otherAmountThreshold": "string",
"swapMode": "ExactIn",
"slippageBps": 0,
"platformFee": {
"amount": "string",
"feeBps": 0
},
"priceImpactPct": "string",
"routePlan": [
{
"swapInfo": {
"ammKey": "string",
"label": "string",
"inputMint": "string",
"outputMint": "string",
"inAmount": "string",
"outAmount": "string",
"feeAmount": "string",
"feeMint": "string"
},
"percent": 0
}
],
"contextSlot": 0,
"timeTaken": 0
}
- curl
- nodejs
- python
- rust
- CURL
curl -L 'https://lite-api.jup.ag/swap/v1/quote' \
-H 'Accept: application/json'
ResponseClear