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

# Performance fee endpoints

> Contracts for fee configuration, payment-account credits, and Investor-level reconciliation.

## Read Investor configuration

`GET /api/v1/investor/{investor_login}/performance-fee`

| Path parameter | Type | Required | Description |
| - | - | - | - |
| `investor_login` | string | Yes | Investor MT5 login. |

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "investor_id": 410,
  "investor_login": "146600",
  "rate": "0.300000",
  "enabled": true,
  "effective_since": "2026-07-21T13:20:00",
  "created_at": "2026-07-21T13:20:00",
  "updated_at": "2026-07-21T13:20:00"
}
```

The route returns `404` when the Investor does not exist or has no fee configuration.

### Configuration response fields

| Field | Type | Meaning |
| - | - | - |
| `investor_id` | integer | Internal Investor ID. |
| `investor_login` | string | Investor MT5 login. |
| `rate` | decimal string | Persisted rate fraction; `"0.300000"` is 30%. |
| `enabled` | boolean | Whether collection is enabled; a zero rate still produces no fee. |
| `effective_since` | datetime | Stored configuration validity timestamp, not an HWM reset. |
| `created_at`, `updated_at` | datetime | Configuration creation and last update. |

## Update Investor configuration

`POST /api/v1/investor/perf-fee/update`

| Body field | Type | Required | Description |
| - | - | - | - |
| `investor_login` | string | Yes | Investor MT5 login. |
| `rate` | decimal or null | No | Fraction `0..1`. Omitted/null retains an existing rate; if no setting exists, the fallback is `0.20`. Send explicitly to avoid that fallback. |
| `enabled` | boolean or null | No | Omitted/null retains an existing flag; if no setting exists, defaults to `true`. |
| `effective_since` | datetime or null | No | ISO 8601 validity timestamp. Omitted/null writes the current operational time, including for an existing setting. |
| `upsert` | boolean | No | Schema default `true`. The current handler does not inspect this flag; `false` does not enforce update-only behavior. |

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "investor_login": "146600",
  "rate": 0.30,
  "enabled": true,
  "effective_since": "2026-07-21T13:20:00"
}
```

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "investor_id": 410,
  "investor_login": "146600",
  "rate": "0.300000",
  "enabled": true,
  "effective_since": "2026-07-21T13:20:00",
  "created_at": "2026-07-21T13:20:00",
  "updated_at": "2026-07-29T18:00:00"
}
```

The response uses the configuration fields above. Changing this configuration does not reset the HWM or modify already executed fees. Eligible accumulated profit above the unchanged HWM can still be charged at the next crystallization; this endpoint is not a future-profit-only reset.

Invalid rate fractions return `422`; unknown Investors return `404`. This endpoint changes configuration only and does not execute an immediate fee debit or credit.

## List payment-account credits

`GET /api/v1/perf-fee/transactions`

| Query parameter | Type | Required | Description |
| - | - | - | - |
| `master_login` | string | Yes | Master trading login; the API resolves its payment account. |
| `limit` | integer | No | From 1 to 100; defaults to 5. |
| `offset` | integer | No | Defaults to `0`; minimum `0`. Skip this many records; increase by the returned item count. |

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl "https://pamm-api.example.com/api/v1/perf-fee/transactions?master_login=146512&limit=5&offset=0" \
  -H "Authorization: Bearer YOUR_CRM_API_KEY"
```

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "payment_account_login": "146513",
  "items": [
    {
      "id": 2203,
      "master_payment_login": "146513",
      "investor_mt5_login": "146600",
      "kind": "PF",
      "amount": 18.72,
      "currency": "USD",
      "mt5_op_id": 991100,
      "mt5_ts": "2026-07-26T00:00:10",
      "created_at": "2026-07-26T00:00:11"
    }
  ],
  "next_cursor": null,
  "has_more": false,
  "total": 1
}
```

`investor_mt5_login` can be `null` for aggregate credits whose unique key does not identify one Investor.

### Payment credit response fields

| Field | Type | Meaning |
| - | - | - |
| `payment_account_login` | string | Resolved Master payment account. |
| `items` | array | Credits on this offset page, newest ID first. |
| `items[].id` | integer | Stable credit record identifier. |
| `items[].master_payment_login` | string | Account that received the credit. |
| `items[].investor_mt5_login` | string or null | Individual payer when identifiable; null for aggregate credits. |
| `items[].kind` | string | `PF`. |
| `items[].amount` | number | Credited amount. |
| `items[].currency` | string | Credit currency. |
| `items[].mt5_op_id` | integer or null | MT5 balance-operation identifier. |
| `items[].mt5_ts`, `created_at` | datetime | MT5 operation time and record creation. |
| `total` | integer | Matching credit count. |
| `has_more` | boolean | Whether another offset page exists. |
| `next_cursor` | null | Legacy compatibility field; do not use it for this endpoint. |

## List Investor-level payments

`GET /api/v1/perf-fee/master/{master_login}/investor-payments`

| Parameter | Type | Required | Description |
| - | - | - | - |
| `master_login` | string | Yes | Master trading MT5 login in the path. |
| `limit` | integer | No | From 1 to 500; defaults to 100. |
| `cursor` | integer | No | Returns IDs lower than the cursor. Use `next_cursor`. |
| `group_by` | enum | No | `investor` returns unpaginated per-Investor totals; ignores `limit` and `cursor`. Omit for individual payments. |

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "master_login": "146512",
  "payment_account_login": "146513",
  "items": [
    {
      "id": 901,
      "run_id": 44,
      "run_status": "EXECUTED",
      "run_period_start": "2026-07-26T00:00:00",
      "run_period_end": "2026-07-26T00:00:00",
      "investor_id": 410,
      "investor_mt5_login": "146600",
      "amount": 18.72,
      "currency": "USD",
      "status": "EXECUTED",
      "mt5_transfer_id": 7412,
      "mt5_op_id": 991100,
      "executed_at": "2026-07-26T00:00:10",
      "cashflow_id": 2203,
      "cashflow_unique_key": "PF:146600:146512:44:MAS",
      "created_at": "2026-07-26T00:00:01"
    }
  ],
  "next_cursor": null,
  "has_more": false
}
```

Only executed items with a fee greater than zero are returned. Deduplicate by `id` and use the Investor-level detail when distributing fees across a sponsor or IB network.

### Investor payment response fields

| Field | Type | Meaning |
| - | - | - |
| `master_login` | string | Master trading login. |
| `payment_account_login` | string or null | Fee recipient login. |
| `items` | array | Individual executed payments; empty in grouped mode. |
| `items[].id` | integer | Stable fee item identifier; use for deduplication. |
| `items[].run_id`, `run_status` | integer, string | Fee run identity and state. |
| `items[].run_period_start`, `run_period_end` | datetime | Run accounting period boundaries. |
| `items[].investor_id`, `investor_mt5_login` | integer, string | Internal Investor identity and MT5 login. |
| `items[].amount`, `currency` | number, string | Fee charged and its currency. |
| `items[].status` | string | `EXECUTED` for the listed items. |
| `items[].mt5_transfer_id` | integer or null | Internal transfer ID, not an MT5 ticket. |
| `items[].mt5_op_id` | integer or null | MT5 balance-operation identifier. |
| `items[].executed_at`, `created_at` | datetime or null, datetime | Execution time and record creation. |
| `items[].cashflow_id`, `cashflow_unique_key` | integer or null, string or null | Associated settled credit identity. |
| `next_cursor` | integer or null | Cursor for older individual items. |
| `has_more` | boolean | More individual items exist; false in grouped mode. |
| `totals` | array or null | Populated only with `group_by=investor`. |
| `totals[].investor_mt5_login` | string | Investor whose executed fees are summed. |
| `totals[].total_amount`, `currency` | number, string | Executed fee total and currency. |
| `totals[].count` | integer | Number of executed fee items in the total. |

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl "https://pamm-api.example.com/api/v1/perf-fee/master/146512/investor-payments?group_by=investor" \
  -H "Authorization: Bearer YOUR_CRM_API_KEY"
```

Grouped mode returns `items=[]`, `next_cursor=null`, `has_more=false`, and the full `totals` array. It is not a page of individual payments.

> [card] [Previous: Financial operations](https://pamm-api.exuratech.com/reference/operations.md)
>
> Return to deposit, withdrawal, and balance contracts.


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