Execute a swap
execute_swapExecute a swap that get_swap_quote already priced. ⚠️ THIS SPENDS REAL MONEY. It submits a real transaction from the user's wallet using real funds and cannot be undone. Confirm the exact amount, token and network with the user in plain language, and get their explicit go-ahead, BEFORE calling this. Only ever pass a quote_id returned by get_swap_quote in this same conversation, after showing the user that quote's numbers and receiving an unambiguous yes. Never call this to 'check' anything. If it answers that the quote expired, get a fresh quote — never re-send the old quote_id.
AMOUNTS: read the _ui fields (whole tokens) when talking to the user — the un-suffixed output_amount / minimum_output_amount / filled_*_amount are in the token's SMALLEST unit. A null amount is unknown, never zero: fill_pending: true means the trade was submitted but its fill is not booked yet — say so, and read the received amount from get_swap_status rather than guessing it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| quote_id | Yes | `quote_id` from a recent `get_swap_quote` response. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||