https://api.jup.ag/swap/v2. Two paths cover every use case: a default happy path for the best swap experience, and an advanced path for full transaction control.
Order & Execute
The default path. Get a fully assembled transaction with the best price across all routers, sign it, and send it to execute endpoint for managed landing.
Build Custom Transactions
The advanced path. Get raw swap instructions to build your own transaction. Add custom instructions, CPI, or modify the transaction however you need.
Choosing a path
/order + /execute | /build | |
|---|---|---|
| Returns | Assembled transaction | Raw swap instructions |
| Routers | All (Metis, RFQ, Dflow, OKX) | Metis only |
| Best for | Most integrations. Best price, simplest flow. | Custom transactions, CPI, composability. |
| Execution | Managed via /execute (optimised slippage, priority fees, accelerated landing) | Self-managed via your own RPC |
| Swap fees | Yes (Jupiter platform fee) | No |
| Integrator fees | Referral fees (referralAccount + referralFee) | Platform fee only (platformFeeBps) or DIY |
| Gasless | Automatic gasless, or your own payer | Use your own payer |
| Transaction modification | No | Full control |
/order. 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 /build if you need to modify the transaction.
Endpoints
Base URL:
https://api.jup.ag/swap/v2
All endpoints require an API key via the x-api-key header. Get one at portal.jup.ag.
API Reference
GET /order
Get a quote and assembled transaction
GET /build
Get a quote and raw swap instructions
POST /execute
Execute a signed /order transaction
Learn More
Routing
How routing works, which routers are available on each endpoint, and how to integrate your liquidity.
Fees
Fee models for /order (platform + referral) and /build (integrator only).
Advanced
Gasless swaps, compute unit estimation, reducing transaction size and latency.
Migration Guide
Migrating from Ultra or Metis to Swap V2.
