82trust / 100

Sol Swap Quote

by Solana swap quote (Jupiter) in Onchain & crypto

x402 APIPassing, checked 4 h ago

Executable 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.

POST https://agent402.tools/api/sol-swap-quote

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
184 ms typical, 184 ms slowest 5%
Last check
4 h ago
Next check
any minute now

How to call it

# See the payment challenge (nothing is charged)
curl -i -X POST "https://agent402.tools/api/sol-swap-quote" \
  -H "content-type: application/json" \
  -d '{"amount":"1000000000","inputMint":"So11111111111111111111111111111111111111112","outputMint":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v","slippageBps":50}'
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.03:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fagent402.tools%2Fapi%2Fsol-swap-quote
const res = await pay("https://agent402.tools/api/sol-swap-quote", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"amount":"1000000000","inputMint":"So11111111111111111111111111111111111111112","outputMint":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v","slippageBps":50}),
});
console.log(await res.json());

Example input

{
  "amount": "1000000000",
  "inputMint": "So11111111111111111111111111111111111111112",
  "outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
  "slippageBps": 50
}

Example output

{
  "contextSlot": 440919041,
  "fetchedAt": "2026-08-22T12:00:00.000Z",
  "hops": 2,
  "inAmount": "1000000000",
  "inputMint": "So11111111111111111111111111111111111111112",
  "minOutAmount": "93240240",
  "outAmount": "93708783",
  "outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
  "priceImpactPct": 0,
  "route": [
    {
      "inAmount": "1000000000",
      "inputMint": "So11111111111111111111111111111111111111112",
      "label": "BisonFi",
      "outAmount": "93720054",
      "outputMint": "Es9v...",
      "percent": 100
    },
    {
      "inAmount": "93720054",
      "inputMint": "Es9v...",
      "label": "SolFi V2",
      "outAmount": "93708783",
      "outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
      "percent": 100
    }
  ],
  "slippageBps": 50,
  "source": "jupiter",
  "swapMode": "ExactIn",
  "swapUsdValue": 93.7
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
4 h agoPassed402184 ms$0.003