Skip to main content
GET
/
compute
/
swap-base-in
Compute swap quote (base input)
curl --request GET \
  --url https://transaction-v1.raydium.io/compute/swap-base-in
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "success": true,
  "version": "V1",
  "data": {
    "inputAmount": "<string>",
    "outputAmount": "<string>",
    "priceImpact": "<string>",
    "routes": [
      {}
    ]
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.raydium.io/llms.txt

Use this file to discover all available pages before exploring further.

Query Parameters

inputMint
string
required

Mint address of the input token (base58-encoded public key).

outputMint
string
required

Mint address of the output token (base58-encoded public key).

amount
string
required

Input amount in lamports (smallest unit of SPL tokens). Must be a non-negative integer string.

slippageBps
string
required

Maximum slippage tolerance in basis points (0–10000). 1 bps = 0.01%.

referrerBps
string

Optional referrer fee in basis points (0–10000). Only used if you have a referrer authority.

txVersion
enum<string>
required

Solana transaction version. V0 uses address lookup tables; LEGACY is the traditional format.

Available options:
V0,
LEGACY

Response

Swap quote computed successfully.

id
string

Unique request identifier (UUID).

Example:

"550e8400-e29b-41d4-a716-446655440000"

success
boolean

Whether the compute succeeded.

Example:

true

version
string

API response version.

Example:

"V1"

data
object

Swap computation result.