Skip to main content

Route API vs Bundle API: which should I use?

Use Route when Enso should find the path into one destination. Use Bundle when your product must specify the exact action sequence.

J
Written by Javier Diaz

Use the Route API when Enso should find the path into one destination. Use the Bundle API when your product must specify the exact action sequence, or when the action is one Route does not cover. Start with Route unless the flow needs that extra control.

Definition

Route is an outcome-shaped request: tokenIn to tokenOut, and Enso selects the hops. Bundle is a list-shaped request: you provide the Actions, and Enso turns that same-chain list into one transaction. The enso:route action inside a bundle is not the standalone Route API.

How they compare

  • Who chooses the steps? Route does. Bundle uses the list you send.

  • Typical Route cases: swap, zap into one position, withdraw or redeem one position, migration, or a simple cross-chain path into one destination.

  • Typical Bundle cases: harvest, borrow, repay, leverage, claim, checks, dynamic outputs, or a custom post-bridge sequence.

  • Atomicity: same-chain steps in either transaction are atomic. Cross-chain delivery is a later stage in both.

How Enso does this

The comparison table is in Get Started. Call POST https://api.enso.build/api/v1/shortcuts/route or POST /api/v1/shortcuts/bundle. If Route cannot build a path, confirm the operation is not a Bundle-only action such as redeem or harvest.

FAQ

Can I use both in one product?

Yes. Many products use Route for swaps and zaps, and Bundle for workflows that need an explicit sequence.

Is one endpoint “better”?

They solve different jobs. Choose by whether the product can express one destination, or must control the steps.

Related articles

  • When should I use the Bundle API instead of Route?

  • What is the difference between routing and bundling?

  • What is the Enso Route API?

  • What is the Enso Bundle API?

  • What does “Could not build shortcuts for route” mean?

Sources

Did this answer your question?