Swap
Risk

Simulate a wallet-bound swap intent

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.

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

Headers

X-ClawHub-Skillstring
Example:farmdash-signal-architect

ClawHub skill attribution. An installed FarmDash skill sends its canonical skill slug (e.g. farmdash-signal-architect) on every FarmDash API request so anonymous Scout usage can be attributed to the skill that drove it. Optional and analytics-only: absence never blocks a request, and malformed values are ignored. This is a skill identity, never a wallet address, API key, or user ID.

Request body

intent_idstring required

Wallet-bound quote intent returned by /agents/quote

wallet_addressstring required

Signing wallet for the simulated execution

Example request

{
  "intent_id": "fd_intent_7f3a"
}

Response

Simulation report

okboolean required
simulation_idstring required
intent_idstring required
successboolean required
gas_usednumber required
gas_cost_usdnumber required
output_amountstring required
price_impact_pctnumber nullable
mev_risk'low' | 'medium' | 'high' required
revert_reasonstring nullable
valid_untilstring date-time required
wallet_addressstring 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_fingerprintstring
request_fingerprintstring
providerstring
cachedboolean
required_for_executiontrue required

Example response

{
  "ok": true,
  "simulation_id": "sim_9b2e"
}

Changes

No recorded changes to this operation across all 1 revision of this API.