To add cross-chain swaps, use a routing API: send the asset the user holds, the destination chain, and the asset they should receive, then let the user sign a source-chain transaction. Destination delivery is a separate, asynchronous step — it is not the same as source-chain confirmation. Enso’s Route API implements this pattern with a destinationChainId.
Definition
Cross-chain routing finds a path from a token or position on one chain to a token or position on another. That path can include a swap on the source chain, a bridge, and a swap or deposit on the destination chain. Bridging alone only moves an asset. Routing can also land the user in a different token or position.
How it works
Request a quote with a source asset, amount, destination chain, and destination asset.
Show the user the expected output, minimum output, gas, and any approval requirement.
Submit required token approvals, then the returned source-chain transaction as-is.
Track destination delivery with a status API. Do not treat a source receipt as the end of the flow.
Refresh balances on both chains when delivery (or a refund) is confirmed.
Same-chain steps in one transaction are atomic. A destination failure cannot revert a source-chain bridge that has already finalized. Rebuild an expired quote instead of editing the returned transaction.
How Enso does this
Create an API key in the Developer Portal.
Call
POST https://api.enso.build/api/v1/shortcuts/routewithchainId,destinationChainId,fromAddress,tokenIn,amountIn,tokenOut,receiver, and slippage in basis points (for example,"50"is 0.5%). UseroutingStrategy: "router"for a typical EOA flow.Review
amountOut, gas,route, and any bridge-fee metadata from the response.Submit any
preTransactionsor approvals, then sign and sendtx.to,tx.data, andtx.valueunchanged.Poll Enso’s bridge status APIs with the source chain ID and source transaction hash, then refresh balances.
If you need a specific bridge or a custom destination action sequence, use the Bundle API with a bridge action and a destination callback instead of a single Route request.
FAQ
Does the routing API choose the bridge for me?
On a Route request, Enso can select a documented bridge automatically when you provide destinationChainId. Use Bundle if you need to specify the bridge or attach post-bridge actions.
Is a cross-chain swap one atomic transaction?
No. Each chain’s transaction can be atomic on that chain, but source and destination are separate stages.
Can I set both slippage and minAmountOut?
No. Choose one protection method.
Can the destination be Solana?
Yes, as a Route API destination only. Enso does not originate routes on Solana or run destination callbacks there. Set an explicit Solana receiver and an EVM refundReceiver.
Related articles
What is a DeFi routing and execution layer?
What is Enso?
How do I bundle multiple DeFi actions into one transaction?
Bridge aggregator vs routing API: what’s the difference?
Alternatives to building my own swap router
