GET /swap/quote

Auth X-Hub-Key from API_HUB_KEYExecute GET /run/jupiter_portfolio/swap/quoteCache cached 1s, never served stale past that windowCost free · weight 0 · standard rate classSource billing free

Read-only Jupiter swap quote: expected output amount, the routed venues and price impact for an input mint, output mint and amount.

Parameters

nameintypedescription
inputMintquerystrrequiredInput token mint address (Solana SPL mint). Wrapped SOL = So11111111111111111111111111111111111111112.
example: So11111111111111111111111111111111111111112
outputMintquerystrrequiredOutput token mint address (Solana SPL mint). USDC = EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v.
example: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
amountquerystrrequiredRaw input-token quantity in its smallest unit (not decimal). 1000000000 = 1 SOL; 1000000 = 1 USDC. Upstream returns the output amount as a string for the same reason (big-number safety).
example: 1000000000
slippageBpsqueryintoptionalSlippage tolerance in basis points (1 bps = 0.01%). 50 = 0.5%. Used to compute otherAmountThreshold (minimum acceptable output).
example: 50
swapModequerystr
ExactIn | ExactOut
optionalExactIn (default): amount is input; ExactOut: amount is desired output. Only these two values are accepted upstream; case/separator variants (exactin, EXACT_IN) are canonicalised by OpenAPI Hub and anything else is rejected upstream with 400.
example: ExactIn
onlyDirectRoutesquerybooloptionalRestrict the quote to direct (single-venue) routes only.
example: false

Response

type: object
data key: routePlan
pagination: none
sample: {
  "inputMint": "str",
  "inAmount": "str",
  "outputMint": "str",
  "outAmount": "str",
  "otherAmountThreshold": "str",
  "swapMode": "str",
  "slippageBps": "int",
  "platformFee": "null",
  "priceImpactPct": "str",
  "routePlan": "array[1]",
  "contextSlot": "int",
  "timeTaken": "float",
  "swapUsdValue": "str",
  "mostReliableAmmsQuoteReport": "object",
  "longtailMarketQuoteReport": "null"

Safe request

Reads the credential from API_HUB_KEY; it never appears in the URL.

curl -sH "X-Hub-Key: $API_HUB_KEY" "https://openapihub.dev/run/jupiter_portfolio/swap/quote?inputMint=So11111111111111111111111111111111111111112&outputMint=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v&amount=1000000000&slippageBps=50&swapMode=ExactIn&onlyDirectRoutes=false"