Skip to main content
POST
/
api
/
v1
/
shortcuts
/
bundle
Bundle a list of actions
curl --request POST \
  --url https://api.enso.finance/api/v1/shortcuts/bundle \
  --header 'Content-Type: application/json' \
  --data '[
  {
    "protocol": "enso",
    "action": "route",
    "args": {}
  }
]'
{
  "bundle": [
    {
      "protocol": "enso",
      "action": "route",
      "args": {}
    }
  ],
  "gas": "<string>",
  "amountsOut": {},
  "route": [
    {
      "tokenIn": [
        "<string>"
      ],
      "tokenOut": [
        "<string>"
      ],
      "protocol": "<string>",
      "action": "<string>",
      "primary": "<string>",
      "internalRoutes": [
        "<string>"
      ],
      "args": {},
      "chainId": 123,
      "sourceChainId": 123,
      "destinationChainId": 123
    }
  ],
  "createdAt": 123,
  "tx": {
    "data": "<string>",
    "to": "<string>",
    "from": "<string>",
    "value": "<string>"
  },
  "priceImpact": 123,
  "feeAmount": {}
}

Query Parameters

chainId
number
default:1

Chain ID of the network to execute the transaction on

fromAddress
string
required

Ethereum address of the wallet to send the transaction from

Example:

"0xd8da6bf26964af9d7eed9e03e53415d37aa96045"

routingStrategy
enum<string> | null

Routing strategy to use. Use delegate when:

  • You want to specify spender
  • You want to use the harvest or deposit action with /bundle endpoint
Available options:
ensowallet,
router,
delegate,
router-legacy,
delegate-legacy
receiver
string

Ethereum address of the receiver of the tokenOut

Example:

"0xd8da6bf26964af9d7eed9e03e53415d37aa96045"

spender
string

Ethereum address of the spender of the tokenIn

Example:

"0xd8da6bf26964af9d7eed9e03e53415d37aa96045"

ignoreAggregators
string[] | null

A list of swap aggregators to be ignored from consideration. See /aggregators endpoint for available aggregators

referralCode
string

Referral code that will be included in an on-chain event after encoding to hex. At most 16 characters.

Maximum length: 16
Example:

"0123456789ABCDEF"

refundReceiver
string

Ethereum address of the receiver of any dust tokens that might be produced during the execution of actions

Example:

"0xd8da6bf26964af9d7eed9e03e53415d37aa96045"

skipQuote
boolean

Flag to skip quoting (if true, amountOut and gas will not be returned)

Body

application/json · object[]
protocol
string
required

Protocol to interact with

Example:

"enso"

action
enum<string>
required
Available options:
approve,
borrow,
borrowwithpositionid,
bridge,
deposit,
singledeposit,
singledepositwithpositionid,
multideposit,
tokenizedsingledeposit,
tokenizedmultideposit,
multioutsingledeposit,
depositclmm,
harvest,
permittransferfrom,
redeem,
singleredeem,
singleredeemwithpositionid,
multiredeem,
tokenizedsingleredeem,
tokenizedmultiredeem,
redeemclmm,
repay,
repaywithpositionid,
swap,
transfer,
transferfrom,
route,
call,
split,
merge,
balance,
minamountout,
slippage,
fee,
ensofee,
paymasterfee
Example:

"route"

args
object
required

Arguments specific to the action type. See the action types for more details. Arguments for the approve action

  • Approve
  • Borrow
  • Bridge
  • Deposit
  • SingleDeposit
  • MultiDeposit
  • TokenizedSingleDeposit
  • TokenizedMultiDeposit
  • MultiOutSingleDeposit
  • DepositCLMM
  • Harvest
  • PermitTransferFrom
  • Redeem
  • SingleRedeem
  • MultiRedeem
  • TokenizedSingleRedeem
  • TokenizedMultiRedeem
  • RedeemCLMM
  • Repay
  • Swap
  • Transfer
  • TransferFrom
  • Route
  • Slippage
  • BorrowWithPositionId
  • SingleDepositWithPositionId
  • SingleRedeemWithPositionId
  • RepayWithPositionId
  • Call
  • Split
  • Merge
  • Balance
  • MinAmountOut
  • Fee

Response

200 - application/json
bundle
object[]
required
route
object[]
required

The route the shortcut will use

createdAt
number
required

Block number the transaction was created on

tx
object
required

The tx object to use in ethers

priceImpact
number
required

Price impact in basis points, null if USD price not found

feeAmount
object
required
gas
string

Gas estimate for the transaction

amountsOut
object

Expected output amounts by token address

I