Learn more about how Metis fits into Jupiter’s routing ecosystem, including Juno, Iris, and JupiterZ, in our Routing documentation.
Metis is now an independent public good, no longer coupled to Jupiter or Ultra, and is maintained as a toolkit for the ecosystem. Read more in our Metis v7 blog post.Though Jupiter continues to provide access to a hosted Metis API for developers.
We recommend using Ultra Swap API
Ultra Swap API is the spiritual successor to Metis Swap API, and is much simpler to use than Metis Swap API. If you are first starting out on your Solana development journey, using Ultra Swap API is highly recommended over Metis Swap API.Using Metis Swap APIRequires your own maintenance, optimizations and dependencies.
- Upkeep of RPCs: To retrieve wallet balances, broadcast and retrieve transactions, etc.
- Deciding transaction fee: Including, but not limited to, priority fee, Jito fee, etc.
- Deciding slippage: The optimal slippage to use to balance between trade success and price protection, do note that RTSE is only available via Ultra Swap API.
- Broadcasting the transaction: Ultra uses a proprietary transaction sending engine which dramatically improves landing rate and speed.
- Parsing the swap results: Polling and parsing the resulting transaction from the RPC, including handling for success and error cases.
- Add custom instructions.
- Use via Cross Program Invocation (CPI) calls.
- Choose your own transaction broadcasting method (like Typical RPCs, Jito, etc).
- Modify the number of accounts to use in a transaction.
Getting Started with Metis Swap API
- Get Quote: Request for a quote which consists of the route plan, and other params such as integrator fee, slippage, etc.
-
Build Swap Transaction: Post the quote to build a swap transaction.
- You can utilize other methods to return swap instructions or use CPI rather than the default swap transaction.
- You can utilize other parameters such as priority fee, dynamic slippage, etc to customize the transaction.
- Send Swap Transaction: Sign and send the swap transaction to the network via your own RPC or other methods.
- Adding Fees to Metis Swap API: Add custom integrator fees to the swap transaction.
- Requote with Lower Max Accounts: Requote with a lower max accounts to reduce the transaction size to fit more instructions or other use cases.
