> ## Documentation Index
> Fetch the complete documentation index at: https://pamm-api.exuratech.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Fund and withdraw Investors

> Move capital through the PAMM-controlled endpoints and reconcile the actual MT5 result.

## Deposit capital

`POST /api/v1/investor/deposit` is the only external capital entry point in the PAMM workflow. Send `login`, a positive `amount`, optional `currency`, and a CRM reference in `comment` as query parameters.

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl -X POST \
  "https://pamm-api.example.com/api/v1/investor/deposit?login=146600&amount=1000&currency=USD&comment=CRM-DEP-8451" \
  -H "Authorization: Bearer YOUR_CRM_API_KEY"
```

Record `deal_id`, `amount`, and the CRM reference. The Investor credit is synchronous, while its operating reflection in the Master may be asynchronous.

## Withdraw capital

Every withdrawal must use `POST /api/v1/investor/withdraw`. The API crystallizes pending performance fees before determining the amount that can be withdrawn.

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl -X POST \
  "https://pamm-api.example.com/api/v1/investor/withdraw?login=146600&amount=1000&currency=USD&comment=CRM-WD-1208" \
  -H "Authorization: Bearer YOUR_CRM_API_KEY"
```

Reconcile these fields from the response:

| Field | Meaning |
| - | - |
| `requested_amount` | Amount requested by the CRM. |
| `effective_withdraw` | Amount actually withdrawn after fee processing. |
| `perf_fee_pending_at_request` | Pending fee observed before the withdrawal. |
| `available_after_perf_fee` | Capital remaining available after fee reservation. |
| `mt5_deal_id` | MT5 operation identifier used for reconciliation. |

`effective_withdraw` can be lower than `requested_amount`, or zero when no balance remains after the pending fee.

> [!WARNING]
>
> A direct MT5 withdrawal bypasses fee crystallization. The fee agent could later attempt collection and leave the Investor with debt or a negative balance.

Open Master positions can block the operation. If the HTTP result is uncertain, reconcile the balance and operation identifier before deciding whether to repeat the request.

> [card] [Previous: Investors](https://pamm-api.exuratech.com/guides/investors.md)
>
> Return to account provisioning and readiness.

> [card] [Next: Subscriptions](https://pamm-api.exuratech.com/guides/subscriptions.md)
>
> Assign and unassign Investors safely.


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