Skip to main content
The GET shortcuts/route/nontokenized endpoint constructs an optimal conversion route. This API allows entering a non-tokenized DeFi position (e.g. Hyperliquid spot, Morpho etc.) from any ERC20 or native token.

Authentication

  1. Create an API key in the Enso Developer Portal.
  2. Store it in an environment variable. Never commit the key to source control.

API Parameters

Required Parameters

The positionId serves as a unique identifier for each position within the protocol. When a protocol represents positions using a bytes32 identifier in its smart contracts (for example, Morpho), this existing identifier is adopted as the positionId. In cases where no native bytes32 identifier exists, the system automatically generates a unique positionId for the position.address can also be used as positionOut, but it might represent multiple positions (like Morpho) and request will return an error.

Optional Parameters

Response Schema

The API returns a non-tokenized route with the following fields:

Discovering Non-Tokenized Positions

To find available non-tokenized positions for routing, use the GET /api/v1/nontokenized endpoint to query the registry of supported non-tokenized positions.

Query Parameters

Response Schema

The API returns an array of non-tokenized positions with the following fields:

Example Usage

For best routing results, it is strongly recommended to use the positionId as the positionOut parameter when requesting a route. The address parameter is supported as an alternative, but may resolve to multiple positions (such as with Morpho protocols), which will result in an error response.

Example: Depositing into Hypercore

Here’s an example of how to route funds to deposit into a Hypercore position: Example: Depositing 100 HYPE into a Hypercore USDT
  • Input: 100 HYPE
  • Output: Hypercore USDT position
  • Chain: 999 (HyperEVM)
cURL
Key parameters:
  • chainId: 999 (HyperEVM)
  • tokenIn: 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee (HYPE)
  • positionOut: 0x200000000000000000000000000000000000010C (Hypercore USDT position)
  • amountIn: 100000000000000000000 (100 HYPE in wei)
  • receiver: The address that will receive the position

Example: Depositing into cbBTC/USDC Morpho market

Here’s an example of how to route funds to deposit into a cbBTC/USDC Morpho market: Example: Depositing 1 ETH into a Morpho market
cURL
Key parameters:
  • chainId: 1 (Ethereum)
  • tokenIn: 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee (ETH)
  • positionOut: 0x30a0da8cabf25a31805d9f3eca9005540e419f408beecf5cf715c67f3958ee55 (cbBTC/USDC Morpho Market ID)
  • amountIn: 1000000000000000000 (1 ETH in wei)
  • receiver: The address that will receive the position

Example: Cross-Chain Bridge to Hypercore

Here’s an example of how to bridge funds from Ethereum to a Hypercore position: Example: Bridging 0.5 ETH from Ethereum to HYPE Hypercore position
  • Input: 0.5 ETH (Ethereum)
  • Output: HYPE Hypercore position
  • Source Chain: 1 (Ethereum)
  • Destination Chain: 999 (HyperEVM)
cURL
Key parameters for cross-chain routing:
  • chainId: 1 (Ethereum - source chain)
  • destinationChainId: 999 (HyperEVM - destination chain)
  • tokenIn: 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee (ETH on Ethereum)
  • positionOut: 0x2222222222222222222222222222222222222222 (HYPE position on HyperEVM)
  • amountIn: 500000000000000000 (0.5 ETH in wei)
  • referralCode: 0123456789ABCDEF (optional referral tracking)
  • receiver: The address that will receive the position on the destination chain

Next steps