quote
curl --request GET \
--url https://api.jup.ag/swap/v1/quote \
--header 'x-api-key: <api-key>'{
"inputMint": "So11111111111111111111111111111111111111112",
"inAmount": "100000000",
"outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"outAmount": "17057460",
"otherAmountThreshold": "16886885",
"swapMode": "ExactIn",
"slippageBps": 100,
"priceImpactPct": "0.0001",
"platformFee": {
"amount": "0",
"feeBps": 0
},
"routePlan": [
{
"swapInfo": {
"ammKey": "HXpGFJGCEEFdV31tDmjDBaJMEB1fKLiAoKoWr3Fnonid",
"label": "Meteora DLMM",
"inputMint": "So11111111111111111111111111111111111111112",
"outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"inAmount": "100000000",
"outAmount": "17057460",
"feeAmount": "1285",
"feeMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
},
"percent": 100
}
],
"contextSlot": 324307186,
"timeTaken": 0.012
}Get Quote
Request for a quote to be used in POST /swap
GET
/
quote
quote
curl --request GET \
--url https://api.jup.ag/swap/v1/quote \
--header 'x-api-key: <api-key>'{
"inputMint": "So11111111111111111111111111111111111111112",
"inAmount": "100000000",
"outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"outAmount": "17057460",
"otherAmountThreshold": "16886885",
"swapMode": "ExactIn",
"slippageBps": 100,
"priceImpactPct": "0.0001",
"platformFee": {
"amount": "0",
"feeBps": 0
},
"routePlan": [
{
"swapInfo": {
"ammKey": "HXpGFJGCEEFdV31tDmjDBaJMEB1fKLiAoKoWr3Fnonid",
"label": "Meteora DLMM",
"inputMint": "So11111111111111111111111111111111111111112",
"outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"inAmount": "100000000",
"outAmount": "17057460",
"feeAmount": "1285",
"feeMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
},
"percent": 100
}
],
"contextSlot": 324307186,
"timeTaken": 0.012
}Documentation Index
Fetch the complete documentation index at: https://dev.jup.ag/docs/llms.txt
Use this file to discover all available pages before exploring further.
Metis Swap API is no longer actively maintained and has been superseded by Swap V2.
Authorizations
Get API key via https://developers.jup.ag/portal
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
ExactOutfor 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 using the
/program-id-to-labelendpoint
- 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 using the
/program-id-to-labelendpoint
- 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
platformFeeBpsis passed in, thefeeAccountin/swapmust 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
/swapendpoint
Set to true if the quote will be used in a Jito bundle. This excludes DEXes that are incompatible with Jito bundles (e.g. HumidiFi).
Response
200 - application/json
Successful response to be used in /swap
- Best output amount after deducting AMM fees and platform fees
- Does not account for slippage
- Minimum acceptable output amount —
outAmountafter applyingslippageBpstolerance - Not used by
/swapendpoint to build transaction
Available options:
ExactIn, ExactOut Required range:
x >= 0Show child attributes
Show child attributes
Show child attributes
Show child attributes
- Markets that would have quoted for this pair
- Useful for debugging and verifying route decisions
- Each key is an AMM account address, each value is the quoted output amount
Show child attributes
Show child attributes
Was this page helpful?
⌘I
