Compute
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
Request
- Base URLhttps://api.raydium.io
- Authnone required
- TypeScriptA function with typed inputs. Its response is checked against the schema.
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"
}Changes
No recorded changes to this operation across all 1 revision of this API.