Skip to main content
If you currently use Metis but don’t need to modify the transaction, consider upgrading to the Meta-Aggregator (/order + /execute) instead of migrating to the Router (/build). You get better pricing because all routing engines compete, not just Metis.

What you gain

  • All routers including JupiterZ RFQ market makers (often 5-20bps better on major pairs)
  • Managed execution via /execute (no RPC management, no priority fee tuning)
  • Gasless support (automatic for users with < 0.01 SOL)
  • Simpler integration (one call + sign + execute)

The trade-off

You cannot modify the transaction. If you need CPI, custom instructions, or any transaction modification, use the Router (/build) path instead. See Metis to Router for that migration.

Before and after

Before (Metis: two calls + self-managed sending)
// 1. Get quote
const quote = await fetch(
  "https://api.jup.ag/swap/v1/quote?" +
    new URLSearchParams({
      inputMint: "So11111111111111111111111111111111111111112",
      outputMint: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
      amount: "100000000",
      slippageBps: "50",
    }),
  { headers: { "x-api-key": API_KEY } }
).then((r) => r.json());

// 2. Get swap transaction
const swap = await fetch("https://api.jup.ag/swap/v1/swap", {
  method: "POST",
  headers: { "Content-Type": "application/json", "x-api-key": API_KEY },
  body: JSON.stringify({
    quoteResponse: quote,
    userPublicKey: walletAddress,
  }),
}).then((r) => r.json());

// 3. Sign and send yourself via RPC
After (Meta-Aggregator: one call + managed execution)
// 1. Get order (all routers compete)
const order = await fetch(
  "https://api.jup.ag/swap/v2/order?" +
    new URLSearchParams({
      inputMint: "So11111111111111111111111111111111111111112",
      outputMint: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
      amount: "100000000",
      taker: walletAddress,
    }),
  { headers: { "x-api-key": API_KEY } }
).then((r) => r.json());

// 2. Sign the transaction
// ... (sign order.transaction with your wallet)

// 3. Execute with managed landing
const result = await fetch("https://api.jup.ag/swap/v2/execute", {
  method: "POST",
  headers: { "Content-Type": "application/json", "x-api-key": API_KEY },
  body: JSON.stringify({
    signedTransaction: signedTxBase64,
    requestId: order.requestId,
  }),
}).then((r) => r.json());