Bundle several DeFi actions into a single transaction using the bundle
API.
route
do the job? route
API might be the simpler way to route your assets.
Before using the bundle API, check if route
would work using happypath.swap
, deposit
, borrow
, harvest
, and bridge
. See our Actions Reference for the complete list.protocol
(where to execute), action
(what to do), and args
(action-specific parameters). Actions execute in array order.useOutputOfCallAt
to reference previous action outputs. This enables chaining without knowing amounts in advance - critical for harvesting, compounding, and multi-step strategies.getActionsBySlug
(GET /v1/actions/{protocol}
) method.primaryAddress
: Protocol’s main contract (pool, vault, router)useOutputOfCallAt
: Reference output from action at index Nreceiver
: Optional override for output recipientslippage
: Basis points for price protection (100 = 1%)route
) will invoke Enso’s automatic routing engine and optimize ETH → USDC path,
useOutputOfCallAt
to chain actions dynamically.
useOutputOfCallAt: 0
references the output from the first action (index 0). This enables compound strategies without knowing reward amounts in advance.
callback
array executes atomically on the destination chain. If any callback action fails, the entire operation (including the bridge) reverts - true cross-chain atomicity!delegate
and router
strategies for action execution**.**