prepare_autonomous_swap
Prepares an autonomous spot swap within signed delegation bounds by verifying policy invariants, locking an atomic budget reservation, and computing the locked calldata digest for local agent signing.
Instructions
[Capability: available_with_tier_gate; tier: scout_plus; API: /api/v1/agent/authority; authority: /api/v1/agent/status] Prepare an autonomous spot swap within signed delegation bounds from authoritative quote and simulation records. FarmDash verifies 13 policy invariants, locks an atomic budget reservation, and computes the locked calldata digest. The agent signs and broadcasts in its local runtime.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | No | Action type, defaults to SWAP | SWAP |
| amount | No | Optional input amount in token base units | |
| chainId | No | Optional EVM Chain ID | |
| grantId | No | Active delegation grant ID (optional; looked up automatically if omitted) | |
| toToken | No | Optional output token symbol or address | |
| intentId | Yes | Authoritative swap intent ID from get_swap_quote | |
| protocol | No | Target protocol router address | |
| fromToken | No | Optional input token symbol or address | |
| slippageBps | No | Optional slippage tolerance in basis points | |
| ownerAddress | Yes | Wallet owner EVM address | |
| simulationId | Yes | Authoritative preflight simulation ID from simulate_swap_intent | |
| agentSessionId | Yes | Authenticated agent session ID | |
| sessionPublicKey | Yes | Agent local signer public address (must equal ownerAddress for EOA V1) |