swap_execute
Accepts a winning sealed bid for a swap and creates the trade. Provide limit_price or quote_id to confirm; returns trade_id for on-chain settlement via HTLC.
Instructions
Accept the winning sealed bid for a swap and create the trade. Real funds. Provide EITHER limit_price (auto-takes the best bid only if it meets your bound) OR quote_id (the exact bid you saw via swap_status). With neither, this refuses (CONFIRMATION_REQUIRED) rather than guess — restate the price to the user first.
USE WHEN: a swap has an acceptable bid and the user confirmed. DO NOT USE WHEN: you have not surfaced the price to the user, or you want maker-side quoting (use respond_rfq).
PARAM NOTES: limit_price is the sealed reservation (SELL=floor, BUY=ceiling) and must be re-supplied here — it is deliberately never stored. WARNING: accepted_amount may EXCEED your requested amount if a maker quoted a larger size (full-fill v1 accepts a bid whose amount covers the request) — always reconcile accepted_amount against what you asked before settling on-chain. On success returns trade_id; settle on-chain next via create_htlc. This does NOT lock funds itself (non-custodial).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| swap_handle | Yes | The swap_handle (RFQ id) from swap_quote. | |
| limit_price | No | Sealed reservation. SELL=floor, BUY=ceiling. Re-supply it here; never persisted. | |
| quote_id | No | Exact bid id from swap_status best_bid.quote_id (explicit-confirm path). | |
| client_request_id | No | Idempotency key. Same id within this session returns the first result instead of accepting twice. Best-effort. |