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

Retrieve a quote for swapping a specific amount of tokens.

Parameters:

  • inputMint: The mint address of the input token (required).
  • outputMint: The mint address of the output token (required).
  • amount: The amount to swap, factoring in the token decimals (required).
  • slippageBps: Slippage tolerance in basis points (default 50 unless autoSlippage is set to true).
  • swapMode: Can be ExactIn or ExactOut (default ExactIn).
  • dexes: List of DEXes to include (optional).
  • excludeDexes: List of DEXes to exclude (optional).
  • restrictIntermediateTokens: Restrict to a top token set for stable liquidity (optional).
  • onlyDirectRoutes: Limit to single hop routes only (optional, default false).
  • asLegacyTransaction: Use legacy transactions (optional, default false).
  • platformFeeBps: Fee to charge in BPS (optional).
  • maxAccounts: Max accounts to be used for the quote (suggested, read more).
  • autoSlippage: Enable smart slippage (optional, default false).
  • maxAutoSlippageBps: Max slippage BPS for smart slippage (optional).
  • autoSlippageCollisionUsdValue: Custom USD value for calculating slippage impact (optional).
Language
Click Try It! to start a request and see the response here!