v1

latestOpenAPI 3.1.02026-07-13570316.1 KB
Solana

Get Solana Swap Quote

Get a quote for swapping tokens on Solana. This endpoint returns the expected output amount and swap details without executing the transaction.

Important: Swaps are only available on Solana mainnet.

Authentication: This endpoint requires backend authentication using the x-secret-key header.

get/v1/solana/swap

Query parameters

addressstring required

Solana wallet address that will execute the swap.

Example:8JBLmveV4YF5AQ7EVnKJgyj6etGgVkPp3tYqQMTu3p5B

Solana wallet address that will execute the swap.

tokenInstring required

Input token mint address (the token being sold).

Example:8JBLmveV4YF5AQ7EVnKJgyj6etGgVkPp3tYqQMTu3p5B

Input token mint address (the token being sold).

tokenOutstring required

Output token mint address (the token being purchased).

Example:8JBLmveV4YF5AQ7EVnKJgyj6etGgVkPp3tYqQMTu3p5B

Output token mint address (the token being purchased).

amountstring required

Amount of input token to swap, expressed in the smallest unit (e.g., lamports for SOL).

Amount of input token to swap, expressed in the smallest unit (e.g., lamports for SOL).

chainIdstring required
Example:solana:mainnet

Response

Quote fetched successfully. Returns expected output amount and swap details.

Example response

{
  "result": {
    "inputMint": "So11111111111111111111111111111111111111112",
    "outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
    "inputAmount": "100000000",
    "outputAmount": "95423156",
    "inputUsdValue": 10.5,
    "outputUsdValue": 10.48,
    "slippageBps": 50,
    "requestId": "uuid-1234-5678"
  }
}