Skip to main content

/quote REST API Endpoint - Swap API

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

Updated on
Oct 14, 2026
Please note that this method is only available for paid subscribers of Swap API.
Solana Kit includes the ability to customize RPC methods and transports, allowing you to seamlessly integrate Quicknode add-ons into your applications. For more information on how to use Quicknode add-ons with Solana Kit, check out these guides: How to Use Quicknode Add-ons using Solana Kit (Part 1) and How to Use Quicknode Add-ons using Solana Kit (Part 2)

Query Parameters

inputMint
string
REQUIRED

Input token mint address

outputMint
string
REQUIRED

Output token mint address

amount
integer
REQUIRED

Raw amount to swap (before decimals). Input amount if swapMode is ExactIn, output amount if swapMode is ExactOut

slippageBps
integer

Slippage threshold in basis points. If the output token amount exceeds the slippage then the swap transaction will fail. Default is 50

swapMode
string

The swap mode. Possible values include: ExactIn, ExactOut. The default value is set to ExactIn. ExactOut is for supporting use cases where you need an exact token amount, like payments

dexes
array

Only the DEXes that you want to include. Separate them with commas. If you want to route directly to the GooseFX Gamma API, you can set the dexes to 'Gamma' without any additional dexes.

excludeDexes
array

The DEXes that you want to exclude. Separate them with commas.

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. Default is true

onlyDirectRoutes
boolean

Direct Routes limits Jupiter routing to single hop routes only. By default, it is set to false

asLegacyTransaction
boolean

Instead of using versioned transaction, this will use the legacy transaction. By default, it is set to false

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. Default is 64

instructionVersion
string

The version of instruction to use in the swap program, defaults to V1. Options are: V1 or V2

dynamicSlippage
boolean

No longer applicable. Default is false

Returns

inputMint
string

The source token's mint address

inAmount
string

The amount of the source token being swapped

outputMint
string

The destination token's mint address

outAmount
string

Calculated output amount from the routing engine. Value includes platform fees and DEX fees, excluding slippage

otherAmountThreshold
string

Calculated minimum output amount after accounting for slippageBps on the outAmount value

swapMode
string

Indicates the swap mode

slippageBps
integer

Slippage tolerance in basis points

platformFee
object

The platform Fee object which contains the following fields:

amount
string

The amount of the platform fee

feeBps
integer

The fee percentage in basis points

priceImpactPct
string

The percentage of price impact due to the swap

routePlan
array

An array containing detailed information about each step of the swap process

swapInfo
object

Detailed information about a specific swap step

ammKey
string

The key identifying the Automated Market Maker (AMM) responsible for the swap

label
string

A label or identifier for the AMM

inputMint
string

The mint address of the token being swapped from in this step

outputMint
string

The mint address of the token being received in this step

inAmount
string

The amount of the token being swapped from in this step

outAmount
string

The amount of the token being received after the swap in this step

feeAmount
string

The amount of fee charged for this step of the swap

feeMint
string

The mint address of the token used for paying fees in this step

percent
integer

The percentage allocation of the swap for this step

bps
integer

The basis points allocation of the swap for this step

instructionVersion
string

The version of instruction used in the swap program. Possible values: V1 or V2, or null

contextSlot
integer

A contextual identifier

timeTaken
integer

Time taken for the request to be processed

Request
Response
1
{
2
"inputMint": "So11111111111111111111111111111111111111112",
3
"inAmount": "1000000000",
4
"outputMint": "EKpQGSJtjMFqKZ9KQanSqYXRcF8fBopzLHYxdM65zcjm",
5
"outAmount": "277873995",
6
"otherAmountThreshold": "276484626",
7
"swapMode": "ExactIn",
8
"slippageBps": 50,
9
"platformFee": null,
10
"priceImpactPct": "0",
11
"routePlan": [
12
{
13
"swapInfo": {
14
"ammKey": "Gkt4BpMRFxhhrrVMQsewM74ggriAbxyN2yUYDD9qt1NV",
15
"label": "Lifinity V2",
16
"inputMint": "So11111111111111111111111111111111111111112",
17
"outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
18
"inAmount": "1000000000",
19
"outAmount": "151723380",
20
"feeAmount": "50000",
21
"feeMint": "So11111111111111111111111111111111111111112"
22
},
23
"percent": 100
24
},
25
{
26
"swapInfo": {
27
"ammKey": "BuMSijp24Vg28YVi3Y8WRjpRuBdMUTYuYn1BxgoRe3yR",
28
"label": "ZeroFi",
29
"inputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
30
"outputMint": "EKpQGSJtjMFqKZ9KQanSqYXRcF8fBopzLHYxdM65zcjm",
31
"inAmount": "151723380",
32
"outAmount": "277873995",
33
"feeAmount": "0",
34
"feeMint": "11111111111111111111111111111111"
35
},
36
"percent": 100
37
}
38
],
39
"scoreReport": null,
40
"contextSlot": 335660308,
41
"timeTaken": 0.003340617,
42
"swapUsdValue": "151.61720367660802477109744292",
43
"simplerRouteUsed": false,
44
"mostReliableAmmsQuoteReport": {
45
"info": {}
46
}
47
}
1
{
2
"inputMint": "So11111111111111111111111111111111111111112",
3
"inAmount": "1000000000",
4
"outputMint": "EKpQGSJtjMFqKZ9KQanSqYXRcF8fBopzLHYxdM65zcjm",
5
"outAmount": "277873995",
6
"otherAmountThreshold": "276484626",
7
"swapMode": "ExactIn",
8
"slippageBps": 50,
9
"platformFee": null,
10
"priceImpactPct": "0",
11
"routePlan": [
12
{
13
"swapInfo": {
14
"ammKey": "Gkt4BpMRFxhhrrVMQsewM74ggriAbxyN2yUYDD9qt1NV",
15
"label": "Lifinity V2",
16
"inputMint": "So11111111111111111111111111111111111111112",
17
"outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
18
"inAmount": "1000000000",
19
"outAmount": "151723380",
20
"feeAmount": "50000",
21
"feeMint": "So11111111111111111111111111111111111111112"
22
},
23
"percent": 100
24
},
25
{
26
"swapInfo": {
27
"ammKey": "BuMSijp24Vg28YVi3Y8WRjpRuBdMUTYuYn1BxgoRe3yR",
28
"label": "ZeroFi",
29
"inputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
30
"outputMint": "EKpQGSJtjMFqKZ9KQanSqYXRcF8fBopzLHYxdM65zcjm",
31
"inAmount": "151723380",
32
"outAmount": "277873995",
33
"feeAmount": "0",
34
"feeMint": "11111111111111111111111111111111"
35
},
36
"percent": 100
37
}
38
],
39
"scoreReport": null,
40
"contextSlot": 335660308,
41
"timeTaken": 0.003340617,
42
"swapUsdValue": "151.61720367660802477109744292",
43
"simplerRouteUsed": false,
44
"mostReliableAmmsQuoteReport": {
45
"info": {}
46
}
47
}
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free