swap_execute
Execute a fresh swap quote as a simulated paper fill at its net price, enforcing approval and safety checks; live swaps are refused.
Instructions
Execute a swap_quote (PAPER FILL in paper mode — simulated at the quoted net price, never real money). LIVE MODE: swap execution is not wired yet (Phase 3) — the signer is ready (see signer_status / signer_sign_transaction) but swap calldata construction comes next; swap_execute refuses in live mode. Approval, enforced server-side: pass user_approved=true when the user explicitly approved this trade, OR leave it false and let auto-approve decide — that path only fills when the trader set a threshold via set_auto_approve, the trade's server-side USD value is known and at/under it, and the execution-time inspection is fully green. Red flags always need an explicit yes regardless of size; honeypots never fill. Execution-time safety: the token being bought is re-inspected NOW (honeypot turned on between quote and fill = blocked). Each quote fills at most once; the fill is atomic (balances + trade + fee records move together). Fails if the kill switch is engaged or the quote expired. Returns a paper: reference — paper fills are never confused with real tx hashes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| quote_id | Yes | Fresh quote_id from swap_quote (60s lifetime) | |
| trader_id | Yes | ||
| user_approved | Yes | True only if the user approved this trade or it is under their auto-approve threshold with green safety |