Overview
Metis is Jupiter’s low-level swap routing engine. It exposes granular control over every aspect of a swap transaction: route selection, instruction composition, priority fees, compute unit limits, slippage, and broadcasting. Unlike Jupiter Ultra, Metis requires you to handle these yourself — but in return you get maximum flexibility for integrations that need CPI, custom instructions, or a specific transaction broadcasting strategy. Use Metis when you need:- CPI (Cross Program Invocation) with your own on-chain program
- Custom instruction composition around the swap
- Full control over priority fees, compute units, and slippage
- Your own RPC or Jito broadcasting
- You want end-to-end execution without managing slippage, fees, or broadcasting
- You need Real-Time Slippage Estimator (RTSE), only available via Ultra
Metis Swap API access is available on OrbitFlare Dedicated Nodes via the
/jup path prefix on your node endpoint. For the hosted Jupiter API, use https://api.jup.ag/swap/v1/... with your x-api-key.How It Works
Get Quote
Call
GET /swap/v1/quote with the input mint, output mint, amount, and slippage to receive the best route from the Metis routing engine.Build Swap Transaction
Post the quote response to
POST /swap/v1/swap. The API returns a serialized, ready-to-sign transaction with optional priority fee estimation, dynamic compute unit limits, and dynamic slippage.Step 1 — Get Quote
Endpoint:GET /swap/v1/quote
Required Parameters
| Parameter | Description |
|---|---|
inputMint | Token mint address of the input token (e.g. So11111111111111111111111111111111111111112 for SOL) |
outputMint | Token mint address of the output token (e.g. EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v for USDC) |
amount | Raw integer amount of input tokens before decimals (lamports for SOL, atomic units for all others) |
slippageBps | Maximum slippage tolerance in basis points (e.g. 50 = 0.5%) |
Example — Quote 1 SOL to USDC
Example Response
Additional Quote Options
restrictIntermediateTokens
restrictIntermediateTokens
Set to
true to ensure routing only goes through highly liquid intermediate tokens. This reduces routing failures caused by illiquid paths and improves route stability at a small potential cost to price.onlyDirectRoutes
onlyDirectRoutes
Set to
true to restrict routing to a single market (no multi-hop). Returns no quote if no direct route exists. Can yield unfavorable prices — use with caution.maxAccounts
maxAccounts
Limits the total number of accounts in the inner swap instructions. Useful when you need to leave room for your own instructions. Recommended minimum is
64. Setting it too low drops DEXes that require more accounts (e.g. Meteora DLMM requires up to 47).platformFeeBps
platformFeeBps
Add a fee to the swap that is credited to your
feeAccount. Combine with feeAccount in the swap request.Step 2 — Build Swap Transaction
Endpoint:POST /swap/v1/swap
Pass the quote response from Step 1 along with the user’s public key. The API returns a serialized base64 transaction ready to sign and send.
Build Transaction with Landing Optimizations
Example Response
Priority Fee Levels
priorityLevel | Percentile | Use Case |
|---|---|---|
medium | 25th | Low congestion, non-time-sensitive |
high | 50th | Standard trading conditions |
veryHigh | 75th | Competitive conditions, MEV, time-sensitive swaps |
maxLamports as a safety cap to prevent overpaying during fee spikes:
Using Swap Instructions Instead
If you need to compose the swap with your own instructions, use/swap/v1/swap-instructions instead of /swap/v1/swap. It takes the same parameters but returns individual instruction objects rather than a serialized transaction:
Step 3 — Send Swap Transaction
Deserialize, Sign, and Serialize
TheswapTransaction field in the response is base64-encoded. Deserialize it to a VersionedTransaction, sign it, then convert back to binary for sending:
Send the Transaction
| Option | Description |
|---|---|
maxRetries | Maximum retries before giving up. If omitted, the RPC retries until the blockhash expires. |
skipPreflight | Skip signature verification and simulation before submitting. Recommended true for speed-sensitive swaps. |
Confirm the Transaction
Broadcasting via Jito
To use Jito for faster inclusion and MEV protection, replaceprioritizationFeeLamports with a Jito tip and submit to a Jito RPC endpoint:
Advanced
Dynamic Slippage
Dynamic Slippage
Enable
dynamicSlippage: true in the swap request. The backend simulates the transaction and applies heuristics based on token category to estimate an appropriate slippage value.Note: Dynamic Slippage development has been discontinued. For production use, Jupiter recommends the Ultra Swap API which includes Real-Time Slippage Estimator (RTSE) — a significantly more accurate and reactive system.CPI (Cross Program Invocation)
CPI (Cross Program Invocation)
As of January 2025, Jupiter Swap via CPI is the recommended method for on-chain program integration. Add the Then invoke the shared accounts route from your instruction handler. See the Jupiter CPI example for a full reference implementation.
jupiter-cpi crate to your program:Flash Fill (Legacy)
Flash Fill (Legacy)
Flash Fill was an earlier workaround for CPI account size limitations using Versioned Transactions and Address Lookup Tables. It is no longer recommended now that Loosen CPI restrictions are live on Solana mainnet. See sol-swap-flash-fill for historical reference.
DEX Account Requirements
DEX Account Requirements
When using
Setting
maxAccounts, these are the estimated account counts per DEX (min applies when ALTs are available, max when they are not):| DEX | Max Accounts | Min Accounts |
|---|---|---|
| Meteora DLMM | 47 | 19 |
| Meteora | 45 | 18 |
| Raydium | 45 | 18 |
| Raydium CLMM | 45 | 19 |
| Moonshot | 37 | 15 |
| Raydium CPMM | 37 | 14 |
| Pumpfun AMM | 42 | 17 |
| Pumpfun Bonding Curve | 40 | 16 |
| Orca Whirlpool | 30 | 12 |
| Obric | 30 | 12 |
| Solfi | 22 | 9 |
| Sanctum | 80 | 80 |
| Sanctum Infinity | 80 | 80 |
maxAccounts too low will silently drop DEXes from routing. Keep it as high as possible and only reduce if your transaction exceeds the 1232-byte size limit.Requirements & Resources
Metis Swap API access via OrbitFlare is available on Dedicated Nodes only. The API is accessible via the/jup path on your dedicated node endpoint, or directly at https://api.jup.ag/swap/v1/... with a Jupiter API key.
Official Metis Docs
Complete API reference for all Metis endpoints, parameters, and response schemas.
Metis Binary (GitHub)
The self-hostable Metis binary by Jupiter for running the routing engine on your own infrastructure.
Jito Bundle Simulation
Simulate and validate Jito MEV bundles on your dedicated node before submission.
Dedicated Nodes
Deploy isolated, unlimited-RPS Solana infrastructure with Metis Swap API access included.