---
title: "Find optimal route between tokens (direct routes, zaps)"
method: GET
path: "/api/v1/shortcuts/route"
tags: ["shortcuts"]
---

# Find optimal route between tokens (direct routes, zaps)

`GET /api/v1/shortcuts/route`

## Query parameters

- `chainId` number, required
- `fromAddress` string, required
- `routingStrategy` 'ensowallet-v2' | 'router' | 'delegate' | 'router-legacy' | 'delegate-legacy', nullable
- `executionMode` 'user' | 'backend'
- `toEoa` boolean, nullable
- `receiver` string
- `spender` string
- `refundReceiver` string
- `amountIn` string[], required
- `minAmountOut` string[]
- `slippage` string
- `fee` string[]
- `feeReceiver` string
- `destinationFeeReceiver` string
- `ignoreAggregators` string[], nullable
- `ignoreStandards` string[], nullable
- `ignoreBridges` string[]
- `crosschainRouteMode` 'direct' | 'source' | 'destination' | 'sourceOrDestination' | 'full'
- `referralCode` string
- `tokenIn` string[], required
- `tokenOut` string[], required
- `destinationChainId` number

## Response `200`

- RouteShortcutTransaction
  - `gas` string, required
  - `amountOut` union, required
    - string
    - string[]
  - `blockNumber` number — Block number the quote was simulated against
  - `priceImpact` number, nullable — Price impact in basis points, null if USD price not found
  - `feeAmount` string[] — An array of the fee amount collected for each tokenIn
  - `ensoFeeAmount` string[] — An array of the enso fee amount collected for each tokenIn, when applicable
  - `metadata` ShortcutResponseMetadata, required
    - `bridgeRefundAssets` BridgeRefundAsset[], required — Protocol-specific refund destinations for bridge principal in the returned transaction. An entry does not guarantee that every bridge failure is refundable.
      - `protocol` 'cctp' | 'stargate' | 'ccip' | 'relay', required
      - `chainId` number, required
      - `token` string, required — Address of the bridge principal token that may be refunded
      - `recipient` string, required — Address that would receive the bridge principal refund
      - `symbol` string — Token symbol when metadata is available
  - `minAmountOut` union — The minimum allowable amount out after slippage
    - string
    - string[]
  - `createdAt` number, required — Block number the transaction was created on
  - `tx` Transaction, required
    - `data` string, required
    - `to` string, required
    - `from` string, required
    - `value` string, required
  - `route` Hop[], required — Simple description of meta actions the route takes
    - `tokenIn` string[], required
    - `tokenOut` string[], required
    - `protocol` string, required
    - `action` 'approve' | 'borrow' | 'borrowwithpositionid' | 'bridge' | 'deposit' | 'singledeposit' | 'singledepositwithpositionid' | 'multideposit' | 'multidepositwithpositionid' | 'tokenizedsingledeposit' | 'tokenizedmultideposit' | 'multioutsingledeposit' | 'depositclmm' | 'depositwithestimate' | 'encodedswap' | 'flashloan' | 'singletokenflashloan' | 'multitokenflashloan' | 'harvest' | 'nftborrow' | 'nftdeposit' | 'nftmultideposit' | 'nftmultiredeem' | 'nftredeem' | 'nftrepay' | 'permittransferfrom' | 'redeem' | 'singleredeem' | 'singleredeemwithpositionid' | 'multiredeem' | 'tokenizedsingleredeem' | 'tokenizedmultiredeem' | 'redeemclmm' | 'redeemwithestimate' | 'repay' | 'repaywithpositionid' | 'swap' | 'transfer' | 'transferfrom' | 'withdraw' | 'singlewithdraw' | 'singlewithdrawwithpositionid' | 'multiwithdraw' | 'route' | 'call' | 'split' | 'merge' | 'ondosplit' | 'ondomerge' | 'balance' | 'minamountout' | 'slippage' | 'fee' | 'ensofee' | 'paymasterfee' | 'depositposition' | 'add' | 'sub' | 'mul' | 'div' | 'min' | 'max' | 'isequal' | 'islessthan' | 'isequalorlessthan' | 'isgreaterthan' | 'isequalorgreaterthan' | 'not' | 'check' | 'toggle', required
    - `primaryAddress` string
    - `internalRoutes` string[]
    - `args` object
    - `sources` string[]
    - `poolAddresses` string[]
    - `estimatedAmountOut` string[] — Only available for split actions returned by the pathfinder routing engine. Display estimates use the planned split input, are ordered to match tokenOut, and are not execution guarantees
    - `chainId` number
    - `sourceChainId` number
    - `destinationChainId` number
    - `positionOut` string[] — Non-tokenized position ID for deposit actions
    - `via` 'cctp-forwarder' — Off-chain settler for this hop. Set when the hop is descriptive metadata rather than a weiroll call in `tx.data` — execution happens asynchronously via the named external system (e.g. Circle's CctpForwarder credits HyperCore on CCTP message receipt). Absent on hops that are actual on-chain weiroll calls.
  - `detailedRoute` string[] — Detailed description of the route
  - `userOp` UserOperation
    - `callData` string, required
    - `callGasLimit` string, required
    - `factory` string
    - `factoryData` string
    - `maxFeePerGas` string, required
    - `maxPriorityFeePerGas` string, required
    - `nonce` string, required
    - `paymaster` string
    - `paymasterData` string
    - `paymasterPostOpGasLimit` string
    - `paymasterVerificationGasLimit` string
    - `preVerificationGas` string, required
    - `sender` string, required
    - `signature` string, required
    - `verificationGasLimit` string, required
  - `bridgingEstimates` BridgeLatencyEstimate[] — Estimated bridging durations when applicable
    - `fromChainId` number, required
    - `toChainId` number, required
    - `token` string, required — Token bridged to the destination chain
    - `estimatedSeconds` number, required — Estimated bridge latency in seconds
    - `sendConfirmations` number — Send confirmations used for the estimation
    - `receiveConfirmations` number — Receive confirmations
    - `sendBlockTimeSeconds` number — Average block time assumed for the source chain (seconds)
    - `receiveBlockTimeSeconds` number — Average block time assumed for the destination chain (seconds)
    - `bridge` string — Bridge implementation or provider that produced the estimate
    - `source` 'defaults' | 'override' | 'fallback' — Source of the data (defaults, override, fallback)
    - `note` string — Optional note describing overrides or fallbacks applied
  - `validUntil` number — Unix timestamp (seconds) after which this quote expires. Transactions submitted after this time may revert.

## Other responses

- `400`

---

[API](https://skmtc.net/enso/apis/untitled-api.md) · [All operations](https://skmtc.net/enso/apis/untitled-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/enso/untitled-api/revisions/b70d36b7002b/schema)
