sameChainIntent=true, the Route API splits the trade into two transactions. Your transaction swaps tokenIn into the settlement token and hands it to a one-time intent address. Enso then buys tokenOut in a second transaction on a fresh quote and sends it to receiver.
Same-chain intents are separate from async redeems (
allowAsync). allowAsync is for vault withdrawals that pay out later and cannot be combined with intents.How it works
- Your user signs and submits transaction 1 on
chainId. IftokenInis not already the settlement token, transaction 1 swaps it into the settlement token first. - Transaction 1 checks that the amount meets the intent trigger and that the block timestamp is at or before
validUntil, publishes the intent on-chain, and transfers the settlement token tointent.address. - Enso observes the published intent, requests a fresh quote, buys
tokenOut, and sends at leastminAmountOuttoreceiverin transaction 2. - If the buy cannot fill before the 5-minute deadline, the settlement token is refunded to
refundReceiver, or toreceiverwhenrefundReceiveris not set.
tokenOut arrives in transaction 2, not transaction 1.
Supported assets
Same-chain intents apply whentokenOut is a supported mintable position with a single underlying token and tokenIn is not one of those positions. Same-chain intent execution must also be enabled on chainId.
Selling an xStock or Ondo GM token (passing one as
tokenIn) stays on the normal atomic route because selling still requires an RFQ quote in transaction 1.
Request
Same-chain intents are available onGET and POST /api/v1/shortcuts/route. They are not available on /quote or the public Bundle API.
Unsupported requests silently fall back to the normal atomic route, so always check for
intent in the response.
Example: buy an xStock on Optimism
SetENSO_API_KEY to your API key, ADDRESS to the user’s wallet, and XSTOCK_TOKEN to the target xStock or wrapped xStock address on Optimism.
This request swaps 0.1 ETH on Optimism into USDC in transaction 1, hands the USDC to an intent address, and buys $XSTOCK_TOKEN for $ADDRESS in transaction 2.
tokenIn is already the settlement token (USDC on Optimism for xStocks, or USDT on BSC for Ondo GM), transaction 1 skips the swap and transfers tokenIn directly to the intent address.
The response, trimmed to the fields that matter here:
preTransactions first, then sign and submit tx. Save the transaction hash from tx to track execution.
Response fields
Track execution with /intent/status
Track a same-chain intent with GET /api/v1/intent/status, passing chainId and the hash of transaction 1 (txHash). Do not use /api/v1/bridge/check or /api/v1/bridge/route, which return 404 because there is no bridge.
Status values
In-flight status lookups refresh every 3 seconds, so polling every few seconds is sufficient.
Error responses
GET /api/v1/intent/status also accepts the source transaction hash of a cross-chain intent, but it reports only the intent execution stage. For cross-chain intents, continue using GET /api/v1/bridge/route to follow both the bridge and execution.Deadlines and refunds
- Submission cutoff. Transaction 1 enforces
block.timestamp <= validUntilon-chain, wherevalidUntilis at most 3 minutes after quoting (the 5-minute deadline minus a 2-minute execution buffer). Submitting transaction 1 late causes it to revert, so the user keepstokenIn. - Intent expiry and refund. Once transaction 1 succeeds, transaction 2 has until the 5-minute deadline (
intent.data.deadline) to buy at leastminAmountOutoftokenOut. If the buy does not complete in time, the settlement token (USDC for xStocks, USDT for Ondo GM on BSC) is refunded onchainIdafter the deadline. - Refund recipient. Refunds go to
refundReceiver, or toreceiverwhenrefundReceiveris omitted.destinationBridgeRefundReceiveris ignored on same-chain intents because there is no bridge. - No fees on refund. Route fees are collected only when transaction 2 executes, so a refunded intent pays no
feeAmountorensoFeeAmount.
Fees
- Transaction 1 charges no route or Enso platform fees.
feeAmount(andensoFeeAmount, when Enso’s platform fee applies under your fee policy) are denominated in the settlement token, matching cross-chain intents, and are collected on transaction 2.intent.data.keeperFeereports the execution fee in the settlement token:tokenis the settlement token address,intentFeeis the execution fee in base units, andrefundFeeis currently"0".amountOutis net of route fees andintent.data.keeperFee.intentFee.metadata.bridgeFeesis empty ([]).
Fallback cases and errors
Requests that fall back to the normal atomic route
The API silently returns a normal atomic route (withoutintent in the response) when any of the following apply:
sameChainIntentis nottrue.tokenOutis not a supported mintablexstocks,wrapped-xstocks, orondo-gmposition with a single underlying token.tokenInis itself anxstocks,wrapped-xstocks, orondo-gmposition.- More than one
tokenInortokenOutis passed. amountInis a placeholder variable instead of a concrete amount.slippageis"0".minAmountOutis set.ignoreStandardsis non-empty.allowAsyncistrue.swapTypeis set to a value other than"any".- Same-chain intent execution is not enabled on
chainId.
Requests that return an error
These cases return an HTTP error instead of falling back:Updated 2026-11-25
