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 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.
Adding optional parameters to
/order (such as fee or slippage overrides) may restrict routing. See Routing for details.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.
Related
- Routing for the routing impact matrix
- Fees for fee models across both paths
- Migration Guide for migrating from Ultra or Metis
- API Reference for the OpenAPI specification
