Skip to main content

How should I implement recurring Enso transactions?

Use an off-chain actor that calls the Enso API each time for a fresh route. Do not reuse old calldata on a schedule, because routes are market-dependent.

J
Written by Javier Diaz

Implement recurring Enso transactions with an off-chain actor that calls the API each time for a fresh route. Do not reuse old calldata on a schedule. Routes are dynamic and market conditions change.

Definition

A recurring transaction is the same product intent run more than once — for example a periodic swap or a repeated deposit. The intent can stay the same; the transaction data should not.

How it works

  1. Store the intent (tokens, destination, slippage policy, and the signer to use), not a previous tx.

  2. On each run, request a new Route or Bundle quote.

  3. Review simulated output, gas, and approvals.

  4. Submit the new transaction as-is, then confirm and refresh balances.

  5. If a run is delayed, requote again before signing.

How Enso does this

The FAQ recommends an off-chain actor that calls the API periodically to get the latest optimal route. Use POST https://api.enso.build/api/v1/shortcuts/route or /shortcuts/bundle from that actor, with a key stored securely from the Developer Portal. Stay inside the default 10 RPS limit.

FAQ

Can I use this for a bot?

Yes. The same requote-every-run rule applies. See “Can I use Enso for bots or automated strategies?”

What if the recurring run is cross-chain?

Requote the source-chain transaction each time, then track destination delivery with Bridge Status after the user or signer submits it.

Related articles

  • Can I use Enso for bots or automated strategies?

  • What if my quote expired?

  • What is the default Enso API rate limit?

  • How do I let users deposit into yield from any token?

  • How do I add a same-chain swap to my app?

Sources

Did this answer your question?