v1
latestOpenAPI 3.0.02026-07-26278284.4 KBDeFi Shortcuts
Bundle a list of actions
Returns a single transaction bundling the submitted actions. For available actions, see /actions endpoint.
post/api/v1/shortcuts/bundle
Query parameters
chainIdnumber
Chain ID of the network to execute the transaction on
fromAddressstring required
Example:0xd8da6bf26964af9d7eed9e03e53415d37aa96045
Ethereum address of the wallet to send the transaction from
routingStrategy'ensowallet' | 'router' | 'delegate' | 'router-legacy' | 'delegate-legacy' nullable
Routing strategy to use. Use delegate when:
- You want to specify spender
- You want to use the harvest or deposit action with /bundle endpoint
receiverstring
Example:0xd8da6bf26964af9d7eed9e03e53415d37aa96045
Ethereum address of the receiver of the tokenOut
spenderstring
Example:0xd8da6bf26964af9d7eed9e03e53415d37aa96045
Ethereum address of the spender of the tokenIn
ignoreAggregatorsstring[] nullable
A list of swap aggregators to be ignored from consideration. See /aggregators endpoint for available aggregators
referralCodestring
Example:0123456789ABCDEF
Referral code that will be included in an on-chain event after encoding to hex. At most 16 characters.
refundReceiverstring
Example:0xd8da6bf26964af9d7eed9e03e53415d37aa96045
Ethereum address of the receiver of any dust tokens that might be produced during the execution of actions
skipQuoteboolean
Flag to skip quoting (if true, amountOut and gas will not be returned)
Request body
Example request
[
{
"protocol": "enso",
"action": "route",
"args": {
"primaryAddress": "0x38EA452219524Bb87e18dE1C24D3bB59510BD783",
"destinationChainId": 42161,
"tokenIn": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"amountIn": "1000000000",
"receiver": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
"protocolArgs": {
"transferType": "fast",
"forwardFee": "high",
"isHyperCoreTransfer": true
}
}
}
]Response
Example response
{
"bundle": [
{
"protocol": "enso",
"action": "route",
"args": {
"primaryAddress": "0x38EA452219524Bb87e18dE1C24D3bB59510BD783",
"destinationChainId": 42161,
"tokenIn": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"amountIn": "1000000000",
"receiver": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
"protocolArgs": {
"transferType": "fast",
"forwardFee": "high",
"isHyperCoreTransfer": true
}
}
}
]
}