GET /swap/v1/quote), build a transaction (POST /swap/v1/swap), then sign and send via your own RPC.
We recommend using Swap API V2
The Swap API V2 unifies Ultra and Metis into a single API. Use/order for the simplest flow with managed execution, or /build if you need custom transactions (the replacement for Metis /swap-instructions).
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.
