Solana swap quote (Jupiter)
POST /api/sol-swap-quoteExecutable swap quote on Solana from Jupiter's aggregator: input and output mint, amount in base units, slippage in bps - returns out amount, minimum out after slippage, price impact percent, the routed DEX labels in hop order with split percentages, the USD value of the swap and the context slot. A real multi-hop route across Solana DEX liquidity, so the number reflects depth, not a spot price. Quote only - nothing is signed or sent. Keyless.
Input
| Field | Type | Description |
|---|---|---|
inputMint * | string | Base58 mint you sell. |
outputMint * | string | Base58 mint you buy. |
amount * | string | Input amount in base units (integer string; 1 SOL = 1000000000 lamports, 1 USDC = 1000000). |
slippageBps | number | Slippage tolerance in basis points (0-5000, default 50 = 0.5%). |
Example output
{
"inputMint": "So11111111111111111111111111111111111111112",
"outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"inAmount": "1000000000",
"outAmount": "93708783",
"minOutAmount": "93240240",
"slippageBps": 50,
"priceImpactPct": 0,
"swapUsdValue": 93.7,
"swapMode": "ExactIn",
"hops": 2,
"route": [
{
"label": "BisonFi",
"percent": 100,
"inputMint": "So11111111111111111111111111111111111111112",
"outputMint": "Es9v...",
"inAmount": "1000000000",
"outAmount": "93720054"
},
{
"label": "SolFi V2",
"percent": 100,
"inputMint": "Es9v...",
"outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"inAmount": "93720054",
"outAmount": "93708783"
}
],
"contextSlot": 440919041,
"source": "jupiter",
"fetchedAt": "2026-08-22T12:00:00.000Z"
}
Try it - see the 402 challenge (free)
curl -i -X POST https://agent402.tools/api/sol-swap-quote \
-H "Content-Type: application/json" \
-d '{"inputMint":"So11111111111111111111111111111111111111112","outputMint":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v","amount":"1000000000","slippageBps":50}'
The response is HTTP 402 Payment Required with exact payment requirements. Any x402 v2 client pays automatically and retries:
Paid call (JavaScript agent)
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client();
registerExactEvmScheme(client, { signer: privateKeyToAccount(KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);
const res = await payFetch("https://agent402.tools/api/sol-swap-quote", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"inputMint": "So11111111111111111111111111111111111111112",
"outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"amount": "1000000000",
"slippageBps": 50
}),
});
Related tools
Crypto order book
GET /api/crypto-orderbookL2 order-book snapshot for a spot pair: best bid/ask, mid price, spread (absolute + %), and the top N aggregated price l…
try in playground →Stablecoin peg monitor
GET /api/stablecoin-pegLive $1-peg deviation for the top USD stablecoins (USDT, USDC, USDS, DAI, USDe, PYUSD, USDD, TUSD, FDUSD by default, or …
try in playground →Wallet balance (native + ERC-20)
POST /api/wallet-balanceLook up the native coin balance (ETH/MATIC) plus every ERC-20 holding for a wallet address on Ethereum, Base, Polygon, A…
try in playground →