Which account moves?
Paths below are relative to/api/v1/mamx.
Example body for a deposit or either API withdrawal:
DONE and store the confirmed MT5 deal ID where returned. After timeout, retry the same endpoint, login, amount and key. Do not send a second deposit through the broker’s own funding system for the same transaction. Deposits do not count as trading profit.
An investor withdrawal can return 409 if a close or transfer is pending. An accepted withdrawal checks free cash excluding credit against the requested amount plus applicable PF, waits for the fee debit and payment credit, then checks funds again. Insufficient preflight funds can yield REJECTED without a new fee or withdrawal debit. performance_fee_charged in the withdrawal result is the newly charged fee for this request, not all historical fees.
High watermark (HWM)
Fees use the allocation’s cumulative realized trading PnL, not deposits, withdrawals, or all deals whose displayed MT5 date falls inside a week. At crystallization:OFF, MINUTELY, HOURLY, DAILY, WEEKLY (Sunday boundary), SEMIMONTHLY (1st and 16th) and MONTHLY, in UTC. Calendar boundaries trigger evaluation of the realized balance over HWM. Investor withdrawal, unsubscribe and fee-term changes can also require crystallization.
Reconcile both sides of payment
GET /allocations/{allocation_id}/fees: fee ID, amount, HWM and status.PENDINGis not proof of a charge.DEBITEDmeans the investor debit is confirmed.PAIDmeans the payment credit is confirmed.GET /leaders/{leader_id}/performance-fees/credit-batches: use the internal leader ID. One credit can cover several investor debits for a master, period, currency and payment login. Match each member’sfee_id,debit_ticketand amount to the batch total; do not expect one payment ticket per investor.POST /leaders/{master_login}/payment-account/balance/refresh: use the MT5 master login. Wait for the resulting operation to finish, then callGET /leaders/{master_login}/payment-account/balance. The cached response containsfresh,observed_atandmetrics; metrics is null until there is a reading. It includes balance, equity, credit, margin, free margin and withdrawable cash. Fresh lasts 15 seconds; the withdrawal itself performs a new MT5 check.

