---
title: "Simulate a wallet-bound swap intent"
method: POST
path: "/v1/simulate"
tags: ["Swap", "Risk"]
---

# Simulate a wallet-bound swap intent

`POST /v1/simulate`

## Request

- Base URL: `https://www.farmdash.one/api`
- URL: `https://www.farmdash.one/api/v1/simulate`
- Auth: one of:
  - HTTP bearer
  - none

Mandatory pre-execution simulation gate for Signal Architect. The caller
submits `simulationRequirements.intent_id` (`fd_intent_*`) returned by
`POST /v1/agent/quote-intent` plus the signing wallet. Do not submit the
top-level `intentId` (`qi_*`), which is the quote-cache/idempotency identity.
FarmDash simulates the bound execution intent, caches the result for 60 seconds,
and returns a `simulation_id` that `/agents/swap` requires.

## Headers

- `X-ClawHub-Skill` string

## Request body

- SwapSimulationRequest
  - `intent_id` string, required: Wallet-bound quote intent returned by /agents/quote
  - `wallet_address` string, required: Signing wallet for the simulated execution

## Response `200`

Simulation report

- SwapSimulationResponse
  - `ok` boolean, required
  - `simulation_id` string, required
  - `intent_id` string, required
  - `success` boolean, required
  - `gas_used` number, required
  - `gas_cost_usd` number, required
  - `output_amount` string, required
  - `price_impact_pct` number, nullable
  - `mev_risk` 'low' | 'medium' | 'high', required
  - `revert_reason` string, nullable
  - `valid_until` string, date-time, required
  - `wallet_address` string, required
  - `selected_protocol` 'lifi' | 'relay', required: Swap quote provider. Automatic routing compares all healthy compatible providers (LI.FI, Relay; 0x paused until reinstated); force one with ?protocol= (deterministic, never silent fallback).
  - `tx_fingerprint` string
  - `request_fingerprint` string
  - `provider` string
  - `cached` boolean
  - `required_for_execution` true, required

## Other responses

- `400`: Invalid parameters
- `402`: Free-tier limit exceeded — x402 payment required
- `409`: Intent and wallet mismatch
- `429`: Rate limit exceeded

---

[API](https://skmtc.dev/farmdash/apis/farmdash-agent-api.md) · [All operations](https://skmtc.dev/farmdash/apis/farmdash-agent-api/llms.txt) · [OpenAPI document](https://skmtc.dev/farmdash/apis/farmdash-agent-api/revisions/96310281f58c?raw)
