Skip to main content
The Swap API is Jupiter’s REST API for swapping tokens on Solana, served at https://api.jup.ag/swap/v2. Wallets, exchanges, trading bots and AI agents integrate it through one of two paths:
  • Meta-Aggregator (/order + /execute): Metis, JupiterZ market makers answering a Request for Quote (RFQ), Dflow and OKX compete on every request. You sign the transaction Jupiter returns and Jupiter lands it, with no RPC node needed.
  • Router (/build + /submit or your own RPC): raw instructions from Metis onchain routing only, for CPI, custom instructions and your own landing pipeline, with no Jupiter swap fee.
Quotes work without an API key, and one key covers every Jupiter API.

Meta-Aggregator

All routers compete (Metis, JupiterZ, Dflow, OKX). Best price, simplest flow. Sign and send to Jupiter for managed landing.

Router

Metis onchain routing. Get raw swap instructions to build your own transaction. Add custom instructions, CPI, or modify the transaction however you need.

Quick start

Get a quote for 0.1 SOL to USDC. No API key and no wallet are needed for a quote:
Without taker, /order returns the quote only. Add taker=<your wallet> to receive the transaction, sign it, and POST it to /execute. The full flow with @solana/kit and @solana/web3.js examples is on Order and Execute.
Keyless requests are limited to 0.5 requests per second. For production, pass an API key in the x-api-key header. See Rate Limits.

Choosing a path

Start with the Meta-Aggregator. It gives you the best price because all routers compete, including RFQ market makers who often beat onchain routing by 5-20bps on major pairs. Only use the Router if you need to modify the transaction.

Routing engines

Jupiter’s routing combines multiple engines and selects the best execution price across all of them, with a self-learning mechanism that automatically sidelines underperforming sources.
JupiterZ (RFQ) is not available on the Router path. It is available through the Meta-Aggregator, where it competes with the other engines.
  • Jupiter runs safety and validation mechanisms between integrators and market makers, and market makers have last-look execution rights, which requires controlled transaction handling to ensure validity and prevent spam.
  • Transactions routed through JupiterZ cannot be modified after they are returned, so use cases that require CPI, custom instructions, or any transaction modification must use the Router path.

Endpoints

Keyless requests work at 0.5 requests per second. Pass an API key in the x-api-key header for production rate limits; get one at Portal. Meta-Aggregator Router

Why integrate the Swap API

Routers compete on every order

Metis, JupiterZ, Dflow and OKX compete on every /order. JupiterZ market makers often beat onchain routing by 5 to 20 bps on major pairs, and a self-learning mechanism sidelines underperforming sources.

Managed execution

/execute lands the transaction through Jupiter’s landing pipeline, with the priority fee set for you and confirmation polling built in. Slippage is set earlier, at order time, by the Real-Time Slippage Estimator (RTSE).

Gasless swaps

Users without SOL can still swap. Jupiter sponsors gas automatically on eligible trades, JupiterZ market makers pay fees on their quotes, or you sponsor gas with your own payer.

Full control when you need it

/build returns raw instructions for CPI, custom instructions and your own landing pipeline, with no Jupiter swap fee.

Transparent fees

The platform fee depends on the token pair, from 0 bps on pegged assets and Jupiter tokens to 10 bps on most pairs. Every /order response shows feeBps and feeMint.

The infrastructure behind jup.ag

The same routing and landing serve Jupiter’s own frontend.

Typical integrations

Wallets, exchanges and trading terminals

/order and /execute for the best price with managed landing, or Jupiter Plugin for a drop-in swap widget.

Trading bots

/order with a fixed slippageBps for deterministic behaviour, or /build to control compute units and landing.

AI agents

Keyless calls for prototyping, the Jupiter CLI, the MCP server, and a Markdown version of every page at .md.

Protocols and programs

Compose swaps into your own transactions with /build, including CPI.

Integrators earning fees

A referral fee on /order or a platform fee on /build.

Migrating from Ultra or Swap API V1

Ultra Swap API users move to the Meta-Aggregator: /order and /execute replace Ultra’s endpoints with the same managed landing. Swap API V1 (Metis) users on /quote and /swap move to /order for managed execution or to /build for raw instructions.

Ultra to Meta-Aggregator

Replace Ultra’s order and execute endpoints with Swap API V2.

Metis to Meta-Aggregator

Move from /quote and /swap to /order and /execute.

Metis to Router

Move from /quote and /swap-instructions to /build.

Integrate into routing

If you want your liquidity routed through Jupiter:

FAQ

Start with the Meta-Aggregator (/order and /execute). All routing engines compete, including JupiterZ market makers, so it returns the best price, and Jupiter lands the transaction for you. Use the Router (/build) only when you must modify the transaction: adding your own instructions, calling the swap through CPI, or sending it through your own landing pipeline. The Router routes through Metis only and charges no Jupiter swap fee. Router vs Meta-Aggregator on the Build page compares the two in detail.
Call GET /order with inputMint, outputMint, amount and the user’s wallet as taker, have the wallet sign the returned transaction, then POST /execute with the signed transaction and the requestId. That is the whole flow for most apps. Order and Execute has complete code with @solana/kit and @solana/web3.js, and Jupiter Plugin is a drop-in widget if you prefer not to call the API yourself.
It depends on what you are building. The Swap API is designed for products that need swap execution across Solana’s liquidity sources through one request: /order makes Metis, JupiterZ market makers, Dflow and OKX compete on each swap and returns a ready-to-sign transaction, and /build returns raw instructions when you need control over the transaction. Choosing a path and Routing engines describe what each path covers, so you can judge it against your own requirements.
Call GET /order without taker. The response contains the full quote (inAmount, outAmount, router, feeBps, price impact) and transaction: null. This replaces the V1 /quote endpoint for price checks. Add taker when you want the transaction. See Get an order.
Not for the Meta-Aggregator: /order builds the transaction and /execute lands it, so the only thing you do yourself is sign. On the Router, you compile and send the transaction, through your own RPC or through /submit, Jupiter’s landing endpoint, which also removes the need for an RPC.
/order includes a platform fee that depends on the token pair: 0 bps when buying Jupiter tokens or swapping pegged assets, 2 bps SOL to stablecoin, 5 bps liquid staking token to stablecoin, 10 bps for everything else, and 50 bps on tokens less than 24 hours old. The fee is deducted from the quote and shown in feeBps, platformFee and feeMint. /build has no Jupiter swap fee. See Fees.
Yes. On /order, pass referralAccount and referralFee (50 to 255 bps); Jupiter keeps 20% of your fee and charges no separate platform fee. You create the referral accounts once through the Referral Program. On /build, pass platformFeeBps with your feeAccount. See Referral fees and Build fees.
Yes, on /order. Three sources can make a swap gasless: Jupiter sponsors gas automatically when the taker has low SOL on an eligible trade, a JupiterZ market maker pays the fees on its own quote, or you sponsor gas by passing a payer wallet. Check signatureFeePayer against the taker to know which one applied. See Gasless Swaps.
On /order, the Real-Time Slippage Estimator (RTSE) sets the slippage for each swap from token category, recent slippage data and live failure rates. On /build, pass slippageBps=rtse to opt in or a fixed value such as 50. When /order cannot build a transaction it returns transaction: "" with an errorCode (for example insufficient funds or insufficient SOL for gas), and /execute returns its own error codes when landing fails. See Slippage Estimation and Error codes.
On /order and /execute, Jupiter sets the priority fee as part of managed landing. On /build, the response includes a compute unit price based on recent network fees; computeUnitPricePercentile lets you choose the percentile (medium, high, veryHigh, or a value in bps), with the 50th percentile as default and the 90th in mode=fast. Simulate to set the compute unit limit, and cap the price if you bid in volatile conditions. See Compute Units.
Use /build. Its instructions are yours to assemble, sign and send however you want, and forJitoBundle=true excludes DEXes that are incompatible with Jito bundles. /order transactions are built for /execute: JupiterZ market makers have last-look rights and the transaction cannot be modified, so they are landed by Jupiter. See the optional parameters of /build, and Transaction Submission for Jupiter’s landing pipeline with SOL tips.
Keyless: 0.5 requests per second. Free API key: 1 RPS, Developer 10, Launch 50, Pro 150. /execute has its own bucket (Keyless 20, Free 50, paid plans 100 RPS) that does not count against your main limit. See Rate Limits.
V1’s /quote and /swap become /order and /execute (or /build if you used /swap-instructions); route plans report bps instead of percent, and V2 instructions no longer emit fee events. Ultra’s order and execute endpoints map directly onto /order and /execute. The migration guides list every change: Ultra to Meta-Aggregator, Metis to Meta-Aggregator, Metis to Router.