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

# Add Isolated Margin

> This endpoint allows users to add margin to an isolated position.

```http theme={null}
POST /api/v1/positions/add_isolated_margin
```

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

Transfers USDC from free balance into the isolated margin pool for the specified position.

#### Request Body

<table><thead><tr><th width="176">Field</th><th width="98">Type</th><th width="95">Need</th><th>Description</th><th>Example</th></tr></thead><tbody><tr><td>`"account"`</td><td>string</td><td>required</td><td>User's wallet address</td><td>`42trU9A5...`</td></tr><tr><td>`"signature"`</td><td>string</td><td>required</td><td>Cryptographic signature</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>`"symbol"`</td><td>string</td><td>required</td><td>Trading pair symbol</td><td>`BTC`</td></tr><tr><td>`"amount"`</td><td>string</td><td>required</td><td>Amount of USDC to add as margin</td><td>`100.000000`</td></tr><tr><td>`"agent_wallet"`</td><td>string</td><td>optional</td><td>Agent wallet address</td><td>`8zFqj1Kp...`</td></tr><tr><td>`"expiry_window"`</td><td>integer</td><td>optional</td><td>Signature expiry in milliseconds</td><td>`10000`</td></tr></tbody></table>

#### Response

* Status 200: Successfully added isolated margin

```json theme={null}
{
  "success": true
}
```

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

#### Code Example (Python)

```python theme={null}
import requests

payload = {
    "account": "42trU9A5...",
    "signature": "5J3mBbAH...",
    "timestamp": 1716200000000,
    "symbol": "BTC",
    "amount": "100.000000",
}

response = requests.post(
    "/api/v1/positions/add_isolated_margin",
    json=payload,
    headers={"Accept": "*/*"},
)

data = response.json()
```


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