Skip to main content

GET /quote

Sends a GET request to the Jupiter API to get the best priced quote.

Query Parameters
inputMint string — REQUIRED

Input token mint address

outputMint string — REQUIRED

Output token mint address

amount integer — REQUIRED

The amount to swap, have to factor in the token decimals.

slippageBps integer

Default is 50 unless autoSlippage is set to true. The slippage % in BPS. If the output token amount exceeds the slippage then the swap transaction will fail.

swapMode string

Possible values: [ExactIn, ExactOut]

(ExactIn or ExactOut) Defaults to ExactIn. ExactOut is for supporting use cases where you need an exact token amount, like payments. In this case the slippage is on the input token.

dexes string[]

Default is that all DEXes are included. You can pass in the DEXes that you want to include only and separate them by ,. You can check out the full list here.

excludeDexes string[]

Default is that all DEXes are included. You can pass in the DEXes that you want to exclude and separate them by ,. You can check out the full list here.

restrictIntermediateTokens boolean

Restrict intermediate tokens to a top token set that has stable liquidity. This will help to ease potential high slippage error rate when swapping with minimal impact on pricing.

onlyDirectRoutes boolean

Default is false. Direct Routes limits Jupiter routing to single hop routes only.

asLegacyTransaction boolean

Default is false. Instead of using versioned transaction, this will use the legacy transaction.

platformFeeBps integer

If you want to charge the user a fee, you can specify the fee in BPS. Fee % is taken out of the output token.

maxAccounts integer

Rough estimate of the max accounts to be used for the quote, so that you can compose with your own accounts

autoSlippage boolean

Default is false. By setting this to true, our API will suggest smart slippage info that you can use. computedAutoSlippage is the computed result, and slippageBps is what we suggest you to use. Additionally, you should check out maxAutoSlippageBps and autoSlippageCollisionUsdValue.

maxAutoSlippageBps integer

In conjunction with autoSlippage=true, the maximum slippageBps returned by the API will respect this value. It is recommended that you set something here.

autoSlippageCollisionUsdValue integer

If autoSlippage is set to true, our API will use a default 1000 USD value as way to calculate the slippage impact for the smart slippage. You can set a custom USD value using this parameter.

Responses
200

Successful response

Schema — OPTIONAL
inputMint string
inAmount string
outputMint string
outAmount string
otherAmountThreshold string
swapMode string

Possible values: [ExactIn, ExactOut]

slippageBps int32
platformFee object — OPTIONAL
amount string — OPTIONAL
feeBps int32 — OPTIONAL
priceImpactPct string
routePlan object[]
swapInfo object
ammKey string
label string — OPTIONAL
inputMint string
outputMint string
inAmount string
outAmount string
feeAmount string
feeMint string
percent int32
contextSlot number — OPTIONAL
timeTaken number — OPTIONAL