Swap

quote

Retrieve a quote to be used in POST /swap.

Refer to https://station.jup.ag/docs/swap-api/get-quote for more information.

get/quote

Query parameters

inputMintstring required

Input token mint address

outputMintstring required

Output token mint address

amountnumber required

Amount of input token

slippageBpsnumber

Slippage in basis points

swapMode'ExactIn' | 'ExactOut'

Swap mode (ExactIn or ExactOut)

dexesstring[]

List of DEXes to include

excludeDexesstring[]

List of DEXes to exclude

restrictIntermediateTokensboolean

Whether to restrict intermediate tokens

onlyDirectRoutesboolean

Whether to only use direct routes

asLegacyTransactionboolean

Whether to use legacy transaction

platformFeeBpsnumber

Platform fee in basis points

maxAccountsnumber

Maximum number of accounts

Response

Successful response

  • To be used in /swap
inputMintstring required
inAmountstring required
outputMintstring required
outAmountstring required
  • Calculated output amount from routing algorithm
  • Exlcuding network fees, slippage or platform fees
otherAmountThresholdstring required
  • Calculated minimum output amount after accounting for slippageBps and platformFeeBps
  • Not used by build transaction
swapMode'ExactIn' | 'ExactOut' required
slippageBpsinteger required
priceImpactPctstring required
contextSlotnumber
timeTakennumber

Time taken to determine quote

Changes