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

# Overview

> Understand the PAMM account model, identifiers, and operating sequence.

The PAMM engine maintains the relationship between one trading **Master** and the **Investors** that follow it. The CRM identifies every MT5 account by login and uses only the documented financial endpoints to change balances or close a subscription.

## Core entities

| Entity           | Purpose                                                                                |
| ---------------- | -------------------------------------------------------------------------------------- |
| Master account   | Trades the strategy and reflects the aggregated operating capital of active Investors. |
| Investor account | Holds the customer's capital and receives all external deposits and withdrawals.       |
| Payment account  | A separate MT5 account that receives the Master's performance fees.                    |
| Subscription     | The PAMM relationship between one Investor and one Master.                             |

<Warning>
  The Master trading account and its payment account must be different accounts. The payment account receives fees; it is not Investor capital and must not trade the strategy.
</Warning>

## Identifiers

| Identifier              | Use                                                                                                           |
| ----------------------- | ------------------------------------------------------------------------------------------------------------- |
| `mt5_login`             | Operational MT5 account identifier used for funding, assignment, and most queries.                            |
| `id`                    | Internal PAMM record identifier. `GET` and `PATCH /master/{master_id}` require this value, not the MT5 login. |
| `payment_account_login` | Separate MT5 account that receives a Master's performance fees.                                               |
| `subscription.id`       | Internal Investor–Master relationship identifier returned when assigning an Investor.                         |

## Recommended sequence

<Steps>
  <Step title="Create the Master">
    Use `POST /api/v1/master/create`. The API creates both the trading account and its separate payment account.
  </Step>

  <Step title="Create the Investor">
    Use `POST /api/v1/investor/create` and store the returned MT5 login securely.
  </Step>

  <Step title="Fund the Investor">
    Credit initial capital through `POST /api/v1/investor/deposit`.
  </Step>

  <Step title="Assign the Investor">
    Subscribe the Investor to a Master and send the performance fee as a decimal from `0` to `1`.
  </Step>

  <Step title="Confirm asynchronous effects">
    Poll subscription and balance endpoints until the expected state is visible.
  </Step>

  <Step title="Reconcile every exit">
    Use the PAMM withdrawal or unassignment endpoints and record the returned MT5 and fee identifiers.
  </Step>
</Steps>

<CardGroup cols={2}>
  <Card title="Previous: PAMM API Integration" icon="arrow-left" href="/">
    Return to the portal introduction.
  </Card>

  <Card title="Next: Integration model" icon="arrow-right" href="/getting-started/integration-model">
    Separate the responsibilities of each system.
  </Card>
</CardGroup>
