latestOpenAPI 3.0.02026-08-2232150173.9 KB

b70d36b7002b

shortcuts

Bundle a list of actions into a single transaction

post/api/v1/shortcuts/bundle

Query parameters

chainIdnumber required

Chain ID of the network to execute the transaction on

fromAddressstring required

Ethereum address of the wallet to send the transaction from

referralCodestring
Example:0123456789ABCDEF

Referral code that will be included in an on-chain event.

routingStrategy'ensowallet-v2' | 'router' | 'delegate' | 'router-legacy' | 'delegate-legacy' nullable

Routing strategy to use

executionMode'user' | 'backend'

Controls how quote is built based on execution mode

receiverstring
Example:0xd8da6bf26964af9d7eed9e03e53415d37aa96045

Ethereum address of the receiver of the tokenOut

spenderstring
Example:0xd8da6bf26964af9d7eed9e03e53415d37aa96045

Ethereum address of the spender of the tokenIn

refundReceiverstring
Example:0xd8da6bf26964af9d7eed9e03e53415d37aa96045

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

ignoreAggregatorsstring[] nullable

A list of swap aggregators to be ignored from consideration

skipQuoteboolean

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

Request body

Example request

[
  {
    "protocol": "enso",
    "action": "route",
    "args": {
      "tokenIn": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
      "tokenOut": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
      "slippage": "100",
      "receiver": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
      "destinationChainId": 42161,
      "refundReceiver": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
      "feeReceiver": "0x5fe5C43f1c4B2A1BA49cC6fE4A6a62f2f1619B82",
      "destinationFeeReceiver": "0x5fe5C43f1c4B2A1BA49cC6fE4A6a62f2f1619B82",
      "ignoreAggregators": [
        "1inch",
        "paraswap"
      ],
      "ignoreStandards": [
        "uniswap-v2"
      ],
      "ignoreBridges": [
        "ccip"
      ]
    }
  }
]

Response

gasstring

Gas estimate for the transaction

amountsOutobject

Expected output amounts by token address

createdAtnumber required

Block number the transaction was created on

minAmountsOutobject

Expected minimal output amounts by token address

priceImpactnumber nullable

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

feeAmountobject

Fees by token address

validUntilnumber

Unix timestamp (seconds) after which this quote expires. Transactions submitted after this time may revert.

Example response

{
  "bundle": [
    {
      "protocol": "enso",
      "action": "route",
      "args": {
        "tokenIn": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
        "tokenOut": "0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84",
        "amountIn": "100000000000",
        "slippage": "300",
        "fee": [
          "100"
        ],
        "feeReceiver": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045"
      }
    }
  ],
  "route": [
    {
      "via": "cctp-forwarder"
    }
  ],
  "metadata": {
    "bridgeRefundAssets": [
      {
        "token": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
        "recipient": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
        "symbol": "USDC"
      }
    ]
  },
  "approvals": [
    {
      "from": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
      "to": "0x1111111111111111111111111111111111111111",
      "data": "0x"
    }
  ]
}