prepare_autonomous_swap
Prepares an autonomous spot swap within signed delegation limits by validating policy invariants, reserving budget atomically, and computing locked calldata 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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"intentId": "<intentId>",
"simulationId": "<simulationId>",
"agentSessionId": "<agentSessionId>",
"ownerAddress": "<ownerAddress>",
"sessionPublicKey": "<sessionPublicKey>"
},
"name": "prepare_autonomous_swap"
}
}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 | |
| sessionToken | No | ||
| 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) |