Listing filters
The listing supportsstatus, can_be_leader, can_be_follower, search, cursor or page, limit, and sorting. Use the /query endpoint when you need to send a large set of account_logins.
Register existing accounts
POST /accounts/add registers an account that already exists in MT5. Behavior depends on the requested role:
The import runs in the background. Retrieve
/history-sync and wait for COMPLETED before subscribing investors to the leader.
Promote to leader
PATCH /accounts/{account_login} automatically starts the history import when can_be_leader changes from false to true. Updating other fields on an account that was already a leader does not import history again.
POST /accounts/create does not start a history import, even when the new account is registered as a leader, because it has just been created in MT5 and has no previous trades.
Sensitive responses
GET /accounts/{account_login} and POST /accounts/create may include stored or generated credentials. Do not send these responses to a web client or retain them in logs.
Financial operations
The shared body for deposits and withdrawals is:History synchronization
The body ofPOST /accounts/{account_login}/history-sync accepts:
Without dates,
sync_mode is FULL; with at least one date it is RANGE. The response includes status, cursor_at, last_deal_id, attempt_count, deals_seen, deals_created, error_message, started_at, and completed_at.
MT5 balance reconciliation
POST /accounts/{account_login}/balance-transactions/sync-mt5 accepts lookback_hours as a query parameter and optional from_at/to_at. It records deposits as EXTERNAL_DEPOSIT and withdrawals as EXTERNAL_WITHDRAWAL, with a reference to the MT5 deal. Already reconciled deals are skipped.
