Swap

Get a token swap quote

Provider-neutral market estimate by default: returns an explicitly labelled market_estimate (reference price, approximate output, server fee tier, route compatibility, freshness) WITHOUT calling 0x, LI.FI, or Relay trading APIs. Browsing, polling, previews, and wallet-supplied GETs all receive estimation — a walletAddress alone is exploratory context, never execution intent, and never fans out into provider APIs. The estimate is intelligence, not a provider quote: no executable calldata, no provider attribution, no liquidity confirmation, never executionReady: true. For execution, POST /v1/agent/quote-intent with exact parameters, a real wallet, and an idempotency key to receive a firm single-provider quote bound to an intentId; then re-call this endpoint with the identical parameters plus intentId to serve the stored firm quote with zero new provider calls. Changed parameters never reuse a stale quote (intent_params_changed); unknown/expired intents return intent_not_found. One intent contacts exactly one primary provider; a sequential alternate follows only a genuine primary failure. 0x quotes use the AllowanceHolder flow (standard approve + plain transaction); FarmDash does not support Permit2 EIP-712 signatures. mock=true is not supported and returns a typed 400 without contacting a provider.

get/agents/quote

Request

  • Base URL: https://www.farmdash.one/api
  • URL: https://www.farmdash.one/api/agents/quote
  • Auth: none declared

Query parameters

fromChainId1 | 10 | 137 | 8453 | 42161 | 59144 required

Source chain: 1=Ethereum, 10=Optimism, 137=Polygon, 8453=Base, 42161=Arbitrum, 59144=Linea

toChainId1 | 10 | 137 | 8453 | 42161 | 59144 required

Destination chain ID

fromTokenstring required

Source token contract address

toTokenstring required

Destination token contract address

fromAmountstring required

Amount in wei (no leading zeros)

protocol'lifi' | 'relay'

Force a specific routing protocol (auto-selected if omitted)

mock'true'

Unsupported for quotes. Returns HTTP 400 mock_not_supported and never contacts a live quote provider.

walletAddressstring

Optional real wallet. Exploratory context only — a wallet alone never triggers provider quoting. For execution, POST /api/v1/agent/quote-intent.

toAddressstring

Optional destination wallet override. Must exactly match the stored intent when serving via intentId.

slippagenumber

Optional slippage tolerance in percent

expectedUpsideUsdnumber

Optional upside estimate used to enforce positive net edge

riskBufferUsdnumber

Optional execution-risk haircut added to total route cost

healthFactornumber

Optional health factor used for halt checks

liquidationBufferPctnumber

Optional liquidation buffer percentage used for halt checks

safetyMode'strict' | 'balanced'

strict halts on severe quote decay, balanced downgrades that condition to a warning

intentIdstring

Execution-intent ID from POST /api/v1/agent/quote-intent. Serves the stored firm quote with zero new provider calls when all other parameters exactly match the intent; mismatches return intent_params_changed, unknown IDs return intent_not_found.

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.

Response

Swap quote

OR

Changes

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