quote
Request for a quote to be used in POST /swap
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
- 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, the feeAccount 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
- No longer applicable, only required to pass in via /swap endpoint
Response
Successful response to be used in /swap
Changes
Changed in 28 of the 50 revisions of this API.381939
- ○
added the optional property
instructionVersionto the response with the200statusresponse-optional-property-added
- ○
- ▲
the response property
routePlan/items/percentbecame nullable for the status200response-property-became-nullable
- ▲
removed the required property
routePlan/items/swapInfo/feeAmountfrom the response with the200statusresponse-required-property-removed
- ▲
removed the required property
routePlan/items/swapInfo/feeMintfrom the response with the200statusresponse-required-property-removed
- ▲
- ▲
for the
queryrequest parameterslippageBps, default value50was addedrequest-parameter-default-value-added
- ▲
for the
queryrequest parameteramount, the type/format was changed frominteger/tointeger/uint64request-parameter-type-changed
- ▲
for the
queryrequest parametermaxAccounts, the type/format was changed frominteger/tointeger/uint64request-parameter-type-changed
- ▲
for the
queryrequest parameterplatformFeeBps, the type/format was changed frominteger/tointeger/uint16request-parameter-type-changed
- ▲
for the
queryrequest parameterslippageBps, the type/format was changed frominteger/tointeger/uint16request-parameter-type-changed
- ▲
the response property
routePlan/items/percentbecame optional for the status200response-property-became-optional
- ▲
the
platformFee/feeBpsresponse's property type/format changed frominteger/int32tointeger/uint16for status200response-property-type-changed
- ▲
the
routePlan/items/percentresponse's property type/format changed frominteger/int32tointeger/uint8for status200response-property-type-changed
- ▲
the
slippageBpsresponse's property type/format changed frominteger/int32tointeger/uint16for status200response-property-type-changed
- ○
added the new optional
queryrequest parameterinstructionVersionnew-optional-request-parameter
- ○
added the optional property
routePlan/items/bpsto the response with the200statusresponse-optional-property-added
- ▲
- ○
endpoint added
endpoint-added
- ○
- ▲
api path removed without deprecation
api-path-removed-without-deprecation
- ▲
- ▲
for the
queryrequest parameterasLegacyTransaction, default valuefalsewas addedrequest-parameter-default-value-added
- ▲
for the
queryrequest parametermaxAccounts, default value64was addedrequest-parameter-default-value-added
- ▲
for the
queryrequest parameteronlyDirectRoutes, default valuefalsewas addedrequest-parameter-default-value-added
- ▲
for the
queryrequest parameterrestrictIntermediateTokens, default valuetruewas addedrequest-parameter-default-value-added
- ▲
for the
queryrequest parameterswapMode, default valueExactInwas addedrequest-parameter-default-value-added
- ▲
for the
queryrequest parameteramount, the type/format was changed fromnumber/tointeger/request-parameter-type-changed
- ▲
for the
queryrequest parametermaxAccounts, the type/format was changed fromnumber/tointeger/request-parameter-type-changed
- ▲
for the
queryrequest parameterplatformFeeBps, the type/format was changed fromnumber/tointeger/request-parameter-type-changed
- ▲
for the
queryrequest parameterslippageBps, the type/format was changed fromnumber/tointeger/request-parameter-type-changed
- ○
added the new optional
queryrequest parameterdynamicSlippagenew-optional-request-parameter
- ▲
- ○
endpoint added
endpoint-added
- ○
- ▲
api path removed without deprecation
api-path-removed-without-deprecation
This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ▲
- ▲
the response property
platformFee/amountbecame optional for the status200response-property-became-optional
- ▲
the response property
platformFee/feeBpsbecame optional for the status200response-property-became-optional
- ▲
the response property
routePlan/items/swapInfo/labelbecame optional for the status200response-property-became-optional
- ●
deleted the
queryrequest parameterautoSlippagerequest-parameter-removed
- ●
deleted the
queryrequest parameterautoSlippageCollisionUsdValuerequest-parameter-removed
- ●
deleted the
queryrequest parametercomputeAutoSlippagerequest-parameter-removed
- ●
deleted the
queryrequest parameterdynamicSlippagerequest-parameter-removed
- ●
deleted the
queryrequest parametermaxAutoSlippageBpsrequest-parameter-removed
- ●
deleted the
queryrequest parameterminimizeSlippagerequest-parameter-removed
- ●
deleted the
queryrequest parameterpreferLiquidDexesrequest-parameter-removed
- ●
deleted the
queryrequest parameterpreferSimpleRoutingrequest-parameter-removed
- ●
deleted the
queryrequest parametertokenCategoryBasedIntermediateTokensrequest-parameter-removed
- ●
removed the optional property
computedAutoSlippagefrom the response with the200statusresponse-optional-property-removed
- ●
removed the optional property
simplerRouteUsedfrom the response with the200statusresponse-optional-property-removed
- ●
removed the optional property
swapUsdValuefrom the response with the200statusresponse-optional-property-removed
- ○
api tag
Swapaddedapi-tag-added
- ○
for the
queryrequest parameteramount, the type/format was generalized frominteger/tonumber/request-parameter-type-generalized
- ○
for the
queryrequest parametermaxAccounts, the type/format was generalized frominteger/tonumber/request-parameter-type-generalized
- ○
for the
queryrequest parameterplatformFeeBps, the type/format was generalized frominteger/tonumber/request-parameter-type-generalized
- ○
for the
queryrequest parameterslippageBps, the type/format was generalized frominteger/tonumber/request-parameter-type-generalized
This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ▲
- ○
added the new optional
queryrequest parameterpreferSimpleRoutingnew-optional-request-parameter
- ○
added the optional property
simplerRouteUsedto the response with the200statusresponse-optional-property-added
- ○