v1

latestOpenAPI 3.0.32026-07-22693462.7 KB
Compute

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.

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"
}