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

# Create Vault

> Create a new vault (lake) and optionally set its initial configuration and seed deposit.

```http theme={null}
POST /api/v1/lake/create
```

The operation type for signing is `"create_lake"`.

This endpoint creates a new vault and returns its generated account address. The API path uses `lake`, but this feature is referred to as `vaults` in user-facing docs.

`manager_loss_share` is currently disabled; omit it or pass `"0"`.

#### Request Body

<table><thead><tr><th width="200">Field</th><th width="110">Type</th><th width="90">Need</th><th>Description</th><th>Example</th></tr></thead><tbody><tr><td>`"account"`</td><td>string</td><td>required</td><td>Creator wallet address</td><td>`42trU9A5...`</td></tr><tr><td>`"signature"`</td><td>string</td><td>required</td><td>Signature over the sorted request payload</td><td>`5J3mBbAH...`</td></tr><tr><td>`"timestamp"`</td><td>integer</td><td>required</td><td>Current timestamp in milliseconds</td><td>`1716200000000`</td></tr><tr><td>`"manager"`</td><td>string</td><td>optional</td><td>Manager address. Omit to create a fresh vault with no manager.</td><td>`8zFqj1Kp...`</td></tr><tr><td>`"nickname"`</td><td>string</td><td>optional</td><td>Display name for the vault</td><td>`BTC Basis Vault`</td></tr><tr><td>`"deposit_cap"`</td><td>decimal string</td><td>optional</td><td>Maximum LP balance accepted by the vault</td><td>`1000000`</td></tr><tr><td>`"manager_profit_share"`</td><td>decimal string</td><td>optional</td><td>Performance fee fraction in `[0,1]`</td><td>`0.20`</td></tr><tr><td>`"manager_loss_share"`</td><td>decimal string</td><td>optional</td><td>Temporarily disabled; only `"0"` is accepted</td><td>`0`</td></tr><tr><td>`"deposit_min_duration_ms"`</td><td>integer</td><td>optional</td><td>Minimum deposit lock duration in milliseconds</td><td>`86400000`</td></tr><tr><td>`"manager_min_balance_portion"`</td><td>decimal string</td><td>optional</td><td>Manager balance ratio required to claim or re-enable the vault</td><td>`0.10`</td></tr><tr><td>`"manager_liquidation_balance_portion"`</td><td>decimal string</td><td>optional</td><td>Manager balance ratio that triggers trading halt and liquidation</td><td>`0.05`</td></tr><tr><td>`"initial_deposit"`</td><td>decimal string</td><td>optional</td><td>Seed deposit from the creator in the same request</td><td>`1000.00`</td></tr><tr><td>`"withdraw_window_s"`</td><td>integer</td><td>optional</td><td>Withdrawal cycle period in seconds</td><td>`2592000`</td></tr><tr><td>`"withdraw_duration_s"`</td><td>integer</td><td>optional</td><td>Open withdrawal time per cycle in seconds</td><td>`259200`</td></tr><tr><td>`"referral_code"`</td><td>string</td><td>optional</td><td>Referral code to claim for the new vault</td><td>`testcode`</td></tr><tr><td>`"initial_deposit_address_whitelist"`</td><td>string array or null</td><td>optional</td><td>Initial deposit-address whitelist. Empty or omitted = no restriction (anyone can deposit).</td><td>`["42trU9A5..."]`</td></tr><tr><td>`"agent_wallet"`</td><td>string</td><td>optional</td><td>Agent wallet address</td><td>`69trU9A5...`</td></tr><tr><td>`"expiry_window"`</td><td>integer</td><td>optional</td><td>Signature expiry in milliseconds</td><td>`30000`</td></tr></tbody></table>

```json theme={null}
{
  "account": "42trU9A5...",
  "signature": "5J3mBbAH...",
  "timestamp": 1716200000000,
  "nickname": "BTC Basis Vault",
  "manager_profit_share": "0.20",
  "deposit_cap": "1000000",
  "deposit_min_duration_ms": 86400000,
  "manager_min_balance_portion": "0.10",
  "manager_liquidation_balance_portion": "0.05",
  "initial_deposit": "1000.00",
  "withdraw_window_s": 2592000,
  "withdraw_duration_s": 259200,
  "referral_code": "testcode",
  "expiry_window": 30000
}
```

#### Response

* Status 200: Vault created successfully

```json theme={null}
{
  "success": true,
  "data": {
    "lake_address": "AbCdEfGh123456789...",
    "referral_claimed": true
  },
  "error": null,
  "code": null
}
```

| Field | Type | Description |
| - | - | - |
| `'lake_address'` | string | Generated vault account address |
| `'referral_claimed'` | boolean | Whether the optional referral code was claimed successfully |

* Status 400: Invalid request parameters
* Status 401: Unauthorized access
* Status 500: Internal server error


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.