> ## Documentation Index
> Fetch the complete documentation index at: https://docs.enso.build/llms.txt
> Use this file to discover all available pages before exploring further.

# Non-tokenized Position Routing

> Get route calldata into non-tokenized positions

export const date_0 = "2025-07-07"

The [GET `shortcuts/route/nontokenized`](/api-reference/defi-shortcuts/routing-to-a-non-tokenized-position) 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 using [Enso Dashboard](https://developers.enso.build).
2. Securely store your API key and make it available in your environment:

```bash authentication.sh theme={null}
ENSO_API_KEY="$ENSO_API_KEY"
echo $ENSO_API_KEY >> .env
git ignore .env
source .env
```

## API Parameters

### Required Parameters

| Parameter     | Type   | Description                                                                                           | Example                                                                                                              |
| ------------- | ------ | ----------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
| `chainId`     | number | Chain ID of the network to execute the transaction on                                                 | `999`                                                                                                                |
| `fromAddress` | string | The address making the request                                                                        | `0xd8da6bf26964af9d7eed9e03e53415d37aa96045`                                                                         |
| `tokenIn`     | string | Ethereum address of the token to swap from. For ETH, use `0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee` | `0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee`                                                                         |
| `positionOut` | string | Position ID or address of the position to receive                                                     | `0x30a0da8cabf25a31805d9f3eca9005540e419f408beecf5cf715c67f3958ee55` or `0x200000000000000000000000000000000000010C` |
| `amountIn`    | string | Amount of tokenIn to swap in wei                                                                      | `100000000000000000000`                                                                                              |
| `receiver`    | string | Ethereum address of the receiver of the positionOut                                                   | `0xd8da6bf26964af9d7eed9e03e53415d37aa96045`                                                                         |

<Note>
  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.
</Note>

### Optional Parameters

| Parameter            | Type   | Description                                                              | Default       | Example                                      |
| -------------------- | ------ | ------------------------------------------------------------------------ | ------------- | -------------------------------------------- |
| `routingStrategy`    | string | Routing strategy to use (`router`, `delegate`, `delegate-legacy`)        | `"router"`    | `"delegate"`                                 |
| `slippage`           | string | Slippage in basis points (1/10000)                                       | `"50"` (0.5%) | `"300"` (3%)                                 |
| `referralCode`       | string | Referral code for on-chain event tracking                                | -             | `"0123456789ABCDEF"`                         |
| `destinationChainId` | number | Chain ID to bridge to and receive nontokenized position                  | -             | `10`                                         |
| `fee`                | string | Fee in basis points (1/10000) for each amountIn value                    | -             | `100` (1%)                                   |
| `feeReceiver`        | string | Ethereum address to receive collected fees (required if fee is provided) | -             | `0x220866B1A2219f40e72f5c628B65D54268cA3A9D` |
| `spender`            | string | Ethereum address of the spender of the tokenIn                           | -             | `0xd8da6bf26964af9d7eed9e03e53415d37aa96045` |
| `refundReceiver`     | string | Ethereum address to receive any dust tokens produced during execution    | -             | `0xd8da6bf26964af9d7eed9e03e53415d37aa96045` |

## Response Schema

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

| Field             | Type           | Description                                                                        |
| ----------------- | -------------- | ---------------------------------------------------------------------------------- |
| `createdAt`       | number         | Block number the transaction was created on                                        |
| `gas`             | string         | Gas estimate for the transaction                                                   |
| `amountDeposited` | string         | Amount of value allocated to the position after the transaction completes          |
| `priceImpact`     | number \| null | Price impact in basis points (1/10000). Returns null if calculation is unavailable |
| `tx`              | Transaction    | The transaction object with `to`, `data`, and other fields                         |
| `route`           | Hop\[]         | The route the shortcut will use                                                    |
| `feeAmount`       | string\[]      | Array of fee amounts charged                                                       |
| `ensoFeeAmount`   | string\[]      | Array of Enso platform fees charged                                                |
| `userOp`          | UserOperation  | The ERC-4337 user operation object (if applicable)                                 |

## 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

| Parameter        | Type      | Description                                       | Example                                                                  |
| ---------------- | --------- | ------------------------------------------------- | ------------------------------------------------------------------------ |
| `project`        | string    | The overarching project or platform               | `"hypercore"`                                                            |
| `protocolSlug`   | string    | The specific standard integration or version      | `"hypercore-spot"`                                                       |
| `chainId`        | number    | Chain ID of the network                           | `999`                                                                    |
| `address`        | string\[] | Ethereum addresses of that represent the position | `["0x200000000000000000000000000000000000010C"]`                         |
| `primaryAddress` | string\[] | Ethereum addresses for contract interaction       | `["0x200000000000000000000000000000000000010C"]`                         |
| `positionId`     | string\[] | Identifier of the positions                       | `["0x30a0da8cabf25a31805d9f3eca9005540e419f408beecf5cf715c67f3958ee55"]` |
| `page`           | number    | Pagination page number (1000 results per page)    | `1`                                                                      |
| `cursor`         | number    | Cursor for pagination                             | `0`                                                                      |

### Response Schema

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

| Field              | Type          | Description                                     |
| ------------------ | ------------- | ----------------------------------------------- |
| `chainId`          | number        | Chain ID of the network of the position         |
| `protocol`         | string        | The specific standard integration or version    |
| `address`          | string        | Ethereum address of the non-tokenized position  |
| `primaryAddress`   | string        | Ethereum address for contract interaction       |
| `underlyingTokens` | TokenModel\[] | Underlying tokens of the position (may be null) |

### Example Usage

```bash theme={null}
# Get all non-tokenized positions on HyperEVM chain
curl -X GET \
  "https://api.enso.build/api/v1/nontokenized?chainId=999" \
  -H "Authorization: Bearer $ENSO_API_KEY" | jq

# Get specific positions for Hypercore
curl -X GET \
  "https://api.enso.build/api/v1/nontokenized?protocolSlug=hypercore-spot" \
  -H "Authorization: Bearer $ENSO_API_KEY" | jq

# Get positions by specific address/id
curl -X GET \
  "https://api.enso.build/api/v1/nontokenized?address=0x200000000000000000000000000000000000010C" \
  -H "Authorization: Bearer $ENSO_API_KEY" | jq

# Get positions of Morpho on Ethereum
curl -X GET \
  "https://api.enso.build/api/v1/nontokenized?protocolSlug=morpho-markets-v1&chainId=1" \
  -H "Authorization: Bearer $ENSO_API_KEY" | jq

```

<Note>
  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.
</Note>

## 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)

<CodeGroup dropdown>
  ```bash cURL theme={null}
  curl -X GET \
    'https://api.enso.build/api/v1/shortcuts/route/nontokenized?chainId=999&fromAddress=0xd8da6bf26964af9d7eed9e03e53415d37aa96045&tokenIn=0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee&positionOut=0x200000000000000000000000000000000000010C&amountIn=100000000000000000000&receiver=0xd8da6bf26964af9d7eed9e03e53415d37aa96045' \
    -H "Authorization: Bearer $ENSO_API_KEY" | jq
  ```
</CodeGroup>

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

* **Input**: 1 ETH
* **Output**: cbBTC/USDC Morpho Market [0x30a0da8cabf25a31805d9f3eca9005540e419f408beecf5cf715c67f3958ee55](https://app.morpho.org/ethereum/market/0x64d65c9a2d91c36d56fbc42d69e979335320169b3df63bf92789e2c8883fcc64/cbbtc-usdc)
* **Chain**: 1 (Ethereum)

<CodeGroup dropdown>
  ```bash cURL theme={null}
  curl -X GET \
    'https://api.enso.build/api/v1/shortcuts/route/nontokenized?chainId=1&fromAddress=0xd8da6bf26964af9d7eed9e03e53415d37aa96045&tokenIn=0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee&positionOut=0x64d65c9a2d91c36d56fbc42d69e979335320169b3df63bf92789e2c8883fcc64&amountIn=1000000000000000000&receiver=0xd8da6bf26964af9d7eed9e03e53415d37aa96045' \
    -H "Authorization: Bearer $ENSO_API_KEY" | jq
  ```
</CodeGroup>

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)

<CodeGroup dropdown>
  ```bash cURL theme={null}
  curl -X GET \
    'https://api.enso.build/api/v1/shortcuts/route/nontokenized?chainId=1&destinationChainId=999&fromAddress=0xd8da6bf26964af9d7eed9e03e53415d37aa96045&tokenIn=0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee&positionOut=0x2222222222222222222222222222222222222222&amountIn=500000000000000000&receiver=0xd8da6bf26964af9d7eed9e03e53415d37aa96045' \
    -H "Authorization: Bearer $ENSO_API_KEY" | jq
  ```
</CodeGroup>

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

* Explore the [Shortcuts Library](/pages/build/examples/shortcuts) for common DeFi workflows.
* Check out the [API Reference](/api-reference/defi-shortcuts/routing-to-a-non-tokenized-position) for full parameter details
  <div className="text-right text-xs gray-200 font-semibold w-full" style={{marginTop: '0'}}>
    <p style={{
          color: "#b2b2b2"  
      }}>Updated {date_0}</p>
  </div>
