v1
latestOpenAPI 3.0.32026-07-22693462.7 KBCompute
Compute swap quote (base output)
Calculate the required input amount to achieve a desired output amount. Useful for swaps where you know the target output.
get/compute/swap-base-out
Query parameters
inputMintstring required
Mint address of the input token.
outputMintstring required
Mint address of the output token.
amountstring required
Desired output amount in the smallest unit (lamports).
slippageBpsstring required
Maximum slippage tolerance in basis points (0–10000).
txVersion'V0' | 'LEGACY' required
Solana transaction version.
Response
Swap quote computed successfully.
Example response
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"success": true,
"version": "V1"
}