v1
latestOpenAPI 3.0.32026-07-22693462.7 KBCompute
Compute swap quote (base input)
Calculate the expected output amount when swapping a fixed input amount. Useful for displaying a preview before transaction building.
get/compute/swap-base-in
Query parameters
inputMintstring required
Mint address of the input token (base58-encoded public key).
outputMintstring required
Mint address of the output token (base58-encoded public key).
amountstring required
Input amount in lamports (smallest unit of SPL tokens). Must be a non-negative integer string.
slippageBpsstring required
Maximum slippage tolerance in basis points (0–10000). 1 bps = 0.01%.
referrerBpsstring
Optional referrer fee in basis points (0–10000). Only used if you have a referrer authority.
txVersion'V0' | 'LEGACY' required
Solana transaction version. V0 uses address lookup tables; LEGACY is the traditional format.
Response
Swap quote computed successfully.
Example response
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"success": true,
"version": "V1"
}