v1

latestOpenAPI 3.0.32026-07-22693462.7 KB
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

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.

idstring

Unique request identifier (UUID).

successboolean

Whether the compute succeeded.

versionstring

API response version.

Example response

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "success": true,
  "version": "V1"
}