Swap

Create an execution intent with a firm single-provider quote

Explicit execution intent. Requires exact chain pair, token pair, amount, real wallet/taker, destination, slippage, and a client idempotency key; the fee tier is resolved server-side before any provider call. One intent contacts exactly one primary provider; a sequential alternate follows only a genuine primary failure. Identical intents reuse the stored firm quote (HTTP 200 reused:true); changed parameters never reuse a stale quote. The firm quote flows through simulate, approval, and prepare without further provider quote requests. Quote is not execution; FarmDash never signs or broadcasts. Provider prerequisites (compatibility swaps): A firm quote reports readiness plus any provider prerequisite that must be satisfied before simulation. A prerequisite recipe is NOT an executable swap transaction and must never be passed directly into simulation.

LI.FI: when approval.required is true, approval.spender is the spender FarmDash observed. FarmDash does not build or broadcast the ERC-20 approval transaction: the customer-controlled wallet must satisfy the ERC-20 allowance locally (standard approve(spender, amount)), wait for that transaction to confirm, then request a FRESH firm quote so FarmDash re-checks the wallet balance and allowance. Proceed only when executionReady is true. The zero address 0x0000000000000000000000000000000000000000 is the LI.FI native-token sentinel and requires no ERC-20 allowance; it is not WETH.

Relay: providerExecutionPlan is an ORDERED recipe whose steps have kind approve, transaction, signature or unknown, and carry status, to, data, value and chainId; approve steps also carry approvalSpender and approvalAmount, and signature steps carry signatureKind with sign/post/check. Follow planContinuation: "re_quote_after_approval" means complete the approval locally then obtain a fresh quote; "execute_provider_plan_and_check" means execute the ordered sign/post/check recipe exactly as returned; "provider_recipe_unsupported" means stop and do not treat the recipe as executable. A required step of kind unknown remains blocking. Never flatten a multi-step recipe into its first transaction. When a value is unreadable FarmDash reports unknown rather than assuming the prerequisite is satisfied. Prerequisite completion is not settlement.

post/v1/agent/quote-intent

Request

  • Base URL: https://www.farmdash.one/api
  • URL: https://www.farmdash.one/api/v1/agent/quote-intent
  • Auth: none declared

Request body

fromChainIdinteger required
toChainIdinteger required
fromTokenstring required
toTokenstring required
fromAmountstring required
walletAddressstring required
toAddressstring required
slippagenumber required
protocol'lifi' | 'relay'
idempotencyKeystring required
continuationIdstring uuid

Optional context correlation only; all existing admission and wallet authority requirements remain unchanged.

executionMode'USER_SIGNED' | 'BOUNDED_AUTONOMOUS'
sessionIdstring
grantIdstring
sessionTokenstring

Response

Stored firm quote reused for an identical intent

intentIdstring required
quoteKind'firm_quote' required
reusedboolean required
marketBenchmarkobject nullable
selectedProvider'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).

firmQuoteobject required
expiresAtstring required
executionReadyboolean required
approvalobject nullable
attemptsobject[] required
alternateUsedboolean required
unsignedtrue required
broadcast_by_farmdashfalse required
notestring required

Changes

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