Find optimal route between tokens (direct routes, zaps)
Changed onRequest
- Base URLhttps://api.enso.finance
- URLhttps://api.enso.finance/api/v1/shortcuts/route
- AuthHTTP bearer
Query parameters
Chain ID of the network to execute the transaction on
Ethereum address of the wallet to send the transaction from
Routing strategy to use
Controls how quote is built based on execution mode
Flag that indicates if gained tokenOut should be sent to EOA
Include point-in-time source-chain transaction cost estimates in native units and USD, plus USD values for reported bridge fees
Route a cross-chain request through an intent address on the destination chain. The bridge delivers to that address, then a keeper runs the destination route and sends tokenOut to the receiver. When omitted, intents are used if both chains support them. Set to false to use a bridge callback instead. Ignored for same-chain routes.
Ethereum address of the spender of the tokenIn
Ethereum address of the receiver of any dust tokens produced during execution. Required for routes to Solana.
Amount of tokenIn to swap in wei
[ "1000000000000000000" ]
Minimum amount out in wei. If specified, slippage should not be specified
Slippage in basis points (1/10000). e.g. 50 = 0.50%. If specified, minAmountOut should not be specified
A list of swap aggregators to be ignored from consideration
A list of standards to be ignored from consideration
A list of bridges to be ignored from consideration
Controls cross-chain route complexity. direct uses only a bridge, source allows routing before the bridge, destination allows routing after the bridge, sourceOrDestination allows routing on either chain but not both, and full allows routing on both chains
Latency/quality trade-off for pathfinding and aggregator querying. light returns fastest over a reduced search space (short aggregator wait with early return once two usable quotes arrive, fewer candidate paths, no destination-side bridge routing), medium waits the full short window over the full search space, high is the default balanced behavior, and max queries all aggregators in parallel with an extended wait for best execution (higher CU cost)
Referral code that will be included in an on-chain event.
Ethereum address of the token to swap from. For ETH, use 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
[ "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" ]
Destination token addresses. Solana mints are case-sensitive; native SOL uses 11111111111111111111111111111111.
Destination recipient. Required for cross-chain routes; Solana uses a case-sensitive Base58 address.
Chain ID of the network to bridge to and receive tokenOut
Allow async redeems, where tokenOut is paid after the transaction. An async route returns amountOut, minAmountOut and priceImpact as null and describes the payout in async. Cannot be combined with minAmountOut or useIntentAddress, intents do not support async redeems.
Response
Example response
{
"metadata": {
"bridgeRefundAssets": [
{
"token": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"recipient": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
"symbol": "USDC"
}
]
},
"route": [
{
"via": "cctp-forwarder"
}
]
}Changes
- warning
added the new
mayanenum value to the///response property for the response status - info
added the enum value
mayanto the propertyitems/of thequeryrequest parameterignoreBridges
- warning
- info
added the new optional
queryrequest parametereffort
- info