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

# Deposit into Orderly Vault

> Deposit into Orderly vaults with nontokenized position router

## Discovering Orderly Vaults

You can use `/nontokenized` endpoint to discover all the available Orderly vaults:

```bash theme={null}
# Get all Orderly vaults
curl -X GET \
  "https://api.enso.build/api/v1/nontokenized?protocolSlug=orderly" \
  -H "Authorization: Bearer $ENSO_API_KEY" | jq
```

This returns a list of available Orderly vaults with their position IDs and details.

### Example response

For example, this is Orderly OmniVault position from `/nontokenized`

```json theme={null}
{
  "chainId": 10,
  "address": "0x70Fe7d65Ac7c1a1732f64d2E6fC0E33622D0C991",
  "primaryAddress": "0x70Fe7d65Ac7c1a1732f64d2E6fC0E33622D0C991",
  "name": "Orderly OmniVault",
  "logosUri": [
    "https://icons.llamao.fi/icons/protocols/orderly"
  ],
  "positionId": "0xa3426a1cef4052c056fced18099be899d93f1427d13b9a1df1806b91fad3d0c2",
  "protocol": "orderly",
  "underlyingTokens": [
    {
      "chainId": 10,
      "address": "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85",
      "type": "base",
      "decimals": 6,
      "name": "USDC",
      "symbol": "USDC",
      "logosUri": [
        "https://assets.coingecko.com/coins/images/6319/thumb/usdc.png?1696506694"
      ]
    }
  ]
},
```

## Route Example

Here's how to deposit into Orderly OmniVault (positionId `0xa3426a1cef4052c056fced18099be899d93f1427d13b9a1df1806b91fad3d0c2`).

**Route Mechanics:**

* Swap ETH to USDC if needed (Orderly OmniVault requires USDC deposits)
* Execute the deposit transaction to add USDC to the Orderly Omnivault
* Receive a nontokenized position in Orderly

<Note>
  Fee in ETH is required for Orderly vault deposits. The fee will be added to
  the native token of the chain and included in the `tx.value`.
</Note>

### Request Parameters

| Parameter         | Description                           | Example                                                              |
| ----------------- | ------------------------------------- | -------------------------------------------------------------------- |
| `chainId`         | Chain ID of the network to execute on | `10` (Optimism)                                                      |
| `fromAddress`     | The address making the request        | `0xd8da6bf26964af9d7eed9e03e53415d37aa96045`                         |
| `routingStrategy` | Routing strategy to use               | `router`                                                             |
| `tokenIn`         | Address of token to swap from         | `0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee` (ETH)                   |
| `positionOut`     | Position ID of the target vault       | `0xa3426a1cef4052c056fced18099be899d93f1427d13b9a1df1806b91fad3d0c2` |
| `amountIn`        | Amount of tokenIn to deposit (in wei) | `1000000000000000000` (1 ETH)                                        |
| `receiver`        | Address to receive the vault position | `0xd8da6bf26964af9d7eed9e03e53415d37aa96045`                         |

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

### Route Response Example

The API returns a response with the following structure:

```json theme={null}
{
  "amountDeposited": "3056348596",
  "priceImpact": 10,
  "gas": "3781112",
  "createdAt": 145404112,
  "route": [
    {
      "action": "swap",
      "tokenIn": ["0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"],
      "tokenOut": ["0x0b2c639c533813f4aa9d7837caf62653d097ff85"],
      "chainId": 10
    },
    {
      "action": "deposit",
      "protocol": "orderly",
      "tokenIn": ["0x0b2c639c533813f4aa9d7837caf62653d097ff85"],
      "chainId": 10
    }
  ],
  "tx": {
    "data": "0x...",
    "to": "0xF75584eF6673aD213a685a1B58Cc0330B8eA22Cf",
    "from": "0x...",
    "value": "1000003656373812635"
  }
}
```

The route consists of two main actions:

1. **Swap**: Convert ETH to the required token for the vault (if needed)
2. **Deposit**: Deposit the converted token into the Orderly vault

## Key Points

* Use the `/shortcuts/route/nontokenized` endpoint for nontokenized position routing
* The `positionOut` parameter uses the vault's position ID
* Fees are charged in the chain's native token
* The response includes transaction data ready to be executed on-chain
