Skip to main content

Which account moves?

Paths below are relative to /api/v1/mamx. Example body for a deposit or either API withdrawal:
Use a positive amount in account currency. 202 means accepted, not paid. Poll the operation to 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:
Example with gross HWM policy and a 20% fee: realized profit reaches 100, so the fee is 20 and the confirmed debit advances the HWM to 100. If cumulative profit falls to 70 there is no new fee. If it later reaches 130, the new fee is 6, not 26. Under the optional net-of-fees policy, both realized PnL and HWM are adjusted once on confirmed debit. The policy is fixed per master profile. Periods are 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. PENDING is not proof of a charge. DEBITED means the investor debit is confirmed. PAID means 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’s fee_id, debit_ticket and 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 call GET /leaders/{master_login}/payment-account/balance. The cached response contains fresh, observed_at and metrics; 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.
In the CRM, display “investor charged” and “master paid” as distinct states. Use signed webhooks for notifications and the GET endpoints for reconciliation.