Routing to a non-tokenized position
Calculates optimal transaction with the best route entering a non-tokenized position, which may involve several actions that interact with various DeFi protocols.
Query Parameters
Chain ID of the network to execute the transaction on
80094
Ethereum address of the wallet to send the transaction from
"0xd8da6bf26964af9d7eed9e03e53415d37aa96045"
Routing strategy to use. For this API, always use delegate in conjunction with a Smart Wallet.
delegate, delegate-legacy Ethereum address of the token to swap from. For ETH, use 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
Ethereum address of the position to receive
"0xf99be47baf0c22b7eb5eac42c8d91b9942dc7e84"
Slippage in basis points (1/10000), e.g. 50 = 0.50%. Takes precedence over minAmountOut.
"300"
Fee in basis points (1/10000) for each amountIn value. Must be in range 1-100. By default the fee is collected from amountIn on the source chain. When destinationFeeReceiver is selected for destination execution, it is collected from the delivered bridge asset instead.
The Ethereum address that receives the source-chain fee and remains the fallback when destination collection does not apply. Required if fee is provided.
"0x220866B1A2219f40e72f5c628B65D54268cA3A9D"
Optional destination-chain fee receiver. For a cross-chain route with destination execution, the requested fee is collected atomically from the delivered bridge asset on the destination chain. Otherwise feeReceiver remains the source-chain receiver.
"0x220866B1A2219f40e72f5c628B65D54268cA3A9D"
Amount of tokenIn to swap in wei
Ethereum address of the receiver of the positionOut
"0xd8da6bf26964af9d7eed9e03e53415d37aa96045"
Ethereum address of the spender of the tokenIn
"0xd8da6bf26964af9d7eed9e03e53415d37aa96045"
Referral code that will be included in an on-chain event.
16"0123456789ABCDEF"
Response
Price impact in basis points, null if USD price not found
An array of the fee amount collected for each tokenIn
The minimum allowable amount out after slippage
Block number the transaction was created on
The tx object to use in ethers
The route the shortcut will use
Point-in-time lower-bound estimate of mandatory source-chain transaction fees in the native token smallest unit. Excludes priority fees, transaction value, bridge fees, and destination execution.
Decimal string USD value of transactionCost. Null when the native-token price or source-chain fee estimate is unavailable.
Transactions that may need to be executed before the main shortcut transaction. Token approvals should be skipped when the current allowance is already sufficient.
