Skip to main content
Glama

OpenAny

Jupiter — Swap API V2 — Prepare unsigned build Transaction

jupiter_get_swap_v2_build

Get a swap quote with raw instructions for building custom transactions. Uses the caller's OpenAny gateway credentials. Charges and authorization are determined by the gateway.

Input Schema

NameRequiredDescriptionDefault
modeNoQuoting mode. "fast" trades quote optimality for reduced latency.
dexesNo- Comma-separated list of DEXes to restrict routing to. - Labels are case sensitive (`SolFi`, not `solfi`). An unrecognised label is not a validation error: it returns `400 {"error": "No routes found"}`, indistinguishable from a pair with no liquidity. - Mutually exclusive with excludeDexes. Passing both returns `400 {"error": "dexes and excludeDexes are mutually exclusive"}`. - Full list of DEXes here using the `/program-id-to-label` endpoint.
payerNoAccount that pays transaction fees and rent. Defaults to taker when not passed in.
takerYesPublic key of the user initiating the swap.
amountYesThe amount to swap in the smallest unit of the input token
inputMintYesThe mint address of the input token
tipAmountNoSOL tip amount in lamports. Adds a tip instruction for use with /submit. The tip payer is the taker (or payer if specified).
feeAccountNoToken account to collect platform fees. Required if platformFeeBps is positive.
outputMintYesThe mint address of the output token
maxAccountsNoMaximum number of accounts for the swap route. Defaults to 64.
slippageBpsNoSlippage tolerance in basis points. Defaults to 50. Import profile accepts the string branch only; other union branches are not exposed.
excludeDexesNo- Comma-separated list of DEXes to exclude. - Labels are case sensitive (`SolFi`, not `solfi`). - Mutually exclusive with dexes. - Full list of DEXes here using the `/program-id-to-label` endpoint.
forJitoBundleNoSet to `true` if the transaction will be submitted as part of a Jito bundle. This excludes DEXes that are incompatible with Jito bundles.
platformFeeBpsNoPlatform fee in basis points. If positive, feeAccount is required.
wrapAndUnwrapSolNoWhether to wrap/unwrap SOL. Defaults to true.
transactionVersionNoThe Solana transaction version to build for, `"0"` or `"1"`. Defaults to `"0"`. `"1"` returns v1 instructions: `computeBudgetInstructions` is empty and `addressesByLookupTableAddress` is `{}` (v1 inlines accounts, no lookup tables). Set the compute budget, including the returned `computeUnitPrice`, on the message config. Build with a v1-capable SDK (`@solana/kit` v8 or later).
blockhashSlotsToExpiryNoNumber of slots until the blockhash expires. Defaults to 150.
destinationTokenAccountNo- SPL token account to receive output tokens. - Mutually exclusive with nativeDestinationAccount.
nativeDestinationAccountNo- Native SOL account to receive output. - Mutually exclusive with destinationTokenAccount.
computeUnitPricePercentileNoPercentile of compute unit price to use. Named levels: "medium" (25th), "high" (50th), "veryHigh" (75th), or a number 0-10000 in basis points. Import profile accepts the string branch only; other union branches are not exposed.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.