82trust / 100

Jupiter Swap

by Losbeto Market Intelligence in Onchain & crypto

x402 APIPassing, checked 5 min ago

Jupiter swap quote with the best DEX route and expected slippage for a given pair and size, so an agent can price execution before committing.

GET https://api.losbeto.xyz/jupiter-swap

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
181 ms typical, 181 ms slowest 5%
Last check
5 min ago
Next check
in 26 min

How to call it

# See the payment challenge (nothing is charged)
curl -i -X GET "https://api.losbeto.xyz/jupiter-swap?pair=SOL%2FUSDC"
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.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fapi.losbeto.xyz%2Fjupiter-swap
const res = await pay("https://api.losbeto.xyz/jupiter-swap?pair=SOL%2FUSDC");
console.log(await res.json());

Example input

{
  "pair": "SOL/USDC"
}

Example output

{
  "amount_in": 1000000,
  "amount_out": "8924477",
  "input_mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
  "output_mint": "So11111111111111111111111111111111111111112",
  "price_impact_pct": "0",
  "raw": null,
  "recommended_next": [
    {
      "endpoint": "/dex-screen",
      "price_usdc": "0.0100",
      "why": "same category as /jupiter-swap"
    },
    {
      "endpoint": "/backtest",
      "price_usdc": "0.0600",
      "why": "same category as /jupiter-swap"
    }
  ],
  "route_plan_steps": 1,
  "version": "48.26.4-POLISH"
}

Security scan

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

Recent checks

WhenResultHTTPTimePrice
5 min agoPassed402181 ms$0.02
3 h agoPassed402210 ms$0.02
8 h agoPassed402181 ms$0.02