POST
/
api
/
v1
/
shortcuts
/
bundle
curl --request POST \
  --url https://api.enso.finance/api/v1/shortcuts/bundle \
  --header 'Content-Type: application/json' \
  --data '[
  {
    "protocol": "enso",
    "action": "route",
    "args": {
      "token": "<string>",
      "spender": "<string>",
      "amount": "<string>"
    }
  }
]'
{
  "bundle": [
    {
      "protocol": "enso",
      "action": "route",
      "args": {
        "token": "<string>",
        "spender": "<string>",
        "amount": "<string>"
      }
    }
  ],
  "gas": "<string>",
  "createdAt": 123,
  "tx": {
    "data": "<string>",
    "to": "<string>",
    "from": "<string>",
    "value": "<string>"
  },
  "amountsOut": {}
}

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
default:delegate

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:
delegate,
router
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.

Example:

"0123456789ABCDEF"

Body

application/json · object[]

The body is of type object[].

Response

200 - application/json

The response is of type object.