Executing Swaps
This guide walks through the full swap lifecycle using the Argyros API on Fogo.Flow
- Get a quote. Find the best route and estimated output.
- Build a transaction. Get an unsigned transaction from the API.
- Sign. Sign the transaction with the user’s wallet.
- Submit. Send the signed transaction to the network.
- Confirm. Wait for on-chain confirmation.
Step 1: Get a quote
Step 2: Build the swap transaction
Step 3: Sign and submit
TypeScript
Using raw instructions instead
If you need to compose swap instructions with other instructions (e.g., creating token accounts, adding memos), usePOST /instructions instead of POST /swap. See the Get Instructions endpoint.