Quick start
- Activate a pricing package (sets MT5 account / copy profile limits).
- Buy the Trade Copier API add-on from Wallet.
- Generate a key at Settings → Trade Copier API (copy it once).
- Call the base URL below with
X-Api-Key.
Base URL
https://myforexcopier.com/api/v1/partner
Authentication
Every request must include your partner key. Prefer the dedicated header:
X-Api-Key: mfc_your_secret_key
Also accepted:
Authorization: Bearer mfc_your_secret_key
- Keys begin with
mfc_ and are hashed at rest.
- Revoked keys and expired/inactive API add-ons return
401.
- Up to 5 active keys per partner workspace.
Integration flow
POST /users — map your platform user id.
POST /accounts — add master and/or follower MT5 logins for that user.
POST /accounts/{id}/connect — open the runtime session (use /test first if you want).
- Publish with
POST /masters or pick an approved desk via GET /masters/directory.
POST /routes — bind follower account → master (same social-copy engine).
- Control with
/pause, /resume, /unfollow.
Your customers stay on your UI. MyForexCopier runs accounts, masters, and copy execution under your partner tenancy.
Workspace status
GET /me
Returns package status, API add-on status, end-user count, and active key count.
curl -s https://myforexcopier.com/api/v1/partner/me \
-H "X-Api-Key: mfc_your_key"
Users
Each of your customers needs an externalUserId (your own id, max 120 chars). Create once, then reuse.
GET /users
List all mapped end-users for this partner.
POST /users
Create or update.
{
"externalUserId": "client-42",
"displayName": "Client Desk",
"email": "optional@yourdomain.com"
}
email is optional. If omitted, a private partner-local address is assigned. Emails must be unique when provided.
MT5 accounts
GET /brokers/search?q=
Search broker companies and MT5 server names. Response includes reachable and latencyMs measured from our copy server (TCP). Raw IP endpoints are never returned — store the server name on the account; we resolve the best endpoint when connecting.
GET /accounts?externalUserId=
Optional filter by end-user. Response includes id, login, role, connection flags (never the password).
POST /accounts
{
"externalUserId": "client-42",
"label": "Follower A",
"server": "Broker-Demo",
"login": "12345678",
"role": "Follower",
"secretKey": "mt5-password"
}
role examples: Source, Target, Follower, Both. Counts against your active package account limit across all API users.
Lifecycle
- POST
/accounts/{id}/test
- POST
/accounts/{id}/connect
- POST
/accounts/{id}/disconnect
Masters & stats
Every master list/detail response includes a social-trade style stats object so you can render leaderboards on your own platform.
"stats": {
"growthPercent": 18.4,
"equityUsd": 125000,
"balanceUsd": 120000,
"floatingPnlUsd": 2400.5,
"openPositions": 3,
"profitFactor": 1.85,
"winRatePercent": 62.5,
"drawdownPercent": 8.2,
"trades": 410,
"signals": 38,
"followerAmountUsd": 50000,
"followers": 12,
"activeRoutes": 9,
"activeLinks": 3,
"updatedUtc": "2026-08-09T12:00:00Z"
}
GET /masters/directory
Approved public masters available to follow (includes stats).
GET /masters?externalUserId=
Masters owned by your API end-users (includes stats).
GET /masters/{id}
One master (your tenant or approved public) with full profile + stats.
PUT /masters/{id}/stats
Push live/social stats for a master you own. Does not re-submit the master for approval — safe for frequent updates from your backend.
{
"growthPercent": 18.4,
"equityUsd": 125000,
"balanceUsd": 120000,
"floatingPnlUsd": 2400.5,
"openPositions": 3,
"profitFactor": 1.85,
"followerAmountUsd": 50000,
"winRatePercent": 62.5,
"drawdownPercent": 8.2,
"trades": 410,
"signals": 38
}
POST /masters
Create or update a publishable master for an end-user. Published masters go through backoffice approval before they appear in the public directory. You may include published stats on create.
{
"externalUserId": "master-7",
"displayName": "Gold Momentum Desk",
"slug": "gold-momentum-desk",
"sourceType": "Mt5Master",
"sourceAccountId": 101,
"strategySummary": "Intraday gold, controlled risk",
"riskLevel": "Balanced",
"isPublished": true,
"publishedGrowthPercent": 18.4,
"publishedEquityUsd": 125000,
"publishedBalanceUsd": 120000,
"publishedFloatingPnlUsd": 2400.5,
"publishedOpenPositions": 3,
"publishedProfitFactor": 1.85,
"publishedWinRatePercent": 62.5,
"publishedDrawdownPercent": 8.2,
"publishedTrades": 410,
"publishedSignals": 38,
"performanceFeeMode": "None",
"performanceFeeValue": 0,
"performanceFeeSettlementInterval": "Monthly",
"performanceFeeMinEscrowUsd": 0
}
Fee modes: None, Fixed, PerTrade, HighWaterMark (percent capped at 50%). For signal-feed masters use sourceType: "SignalFeed" and externalSourceRef.
Copy routes (master → follower)
GET /routes?externalUserId=
Lists follow records with followId, master, status, target account, and copy profile id.
POST /routes
{
"followerExternalUserId": "client-42",
"publicMasterId": 15,
"targetAccountId": 204,
"copyTemplateId": null
}
Creates the social copy route. Master must be published + approved (or already in directory). Follower account must belong to that end-user and be a follower/target-capable role. Performance-fee escrow rules still apply when the master charges fees.
Control
- POST
/routes/{followId}/pause
- POST
/routes/{followId}/resume
- POST
/routes/{followId}/unfollow
Errors & limits
| HTTP | When | Body |
| 401 | Missing / invalid / revoked key, or API package inactive | {"error":"..."} |
| 400 | Validation or business rule (limits, missing user, fee rules) | {"error":"..."} |
| 404 | Account/route not in your partner tenant | {"error":"..."} |
- MT5 account and copy-profile caps come from your active Packages plan, counted across all API end-users.
- Published masters need admin approval before followers can bind via directory.
- Never log API keys or MT5 passwords in client-side apps — call the API from your backend.
Full examples
1. Provision follower + account
# Create end-user
curl -s -X POST https://myforexcopier.com/api/v1/partner/users \
-H "X-Api-Key: mfc_your_key" \
-H "Content-Type: application/json" \
-d "{\"externalUserId\":\"client-42\",\"displayName\":\"Client Desk\"}"
# Add follower MT5
curl -s -X POST https://myforexcopier.com/api/v1/partner/accounts \
-H "X-Api-Key: mfc_your_key" \
-H "Content-Type: application/json" \
-d "{\"externalUserId\":\"client-42\",\"label\":\"Follower A\",\"server\":\"Broker-Demo\",\"login\":\"12345678\",\"role\":\"Follower\",\"secretKey\":\"secret\"}"
# Connect (replace 204 with returned id)
curl -s -X POST https://myforexcopier.com/api/v1/partner/accounts/204/connect \
-H "X-Api-Key: mfc_your_key"
2. Follow an approved master
curl -s https://myforexcopier.com/api/v1/partner/masters/directory \
-H "X-Api-Key: mfc_your_key"
curl -s -X POST https://myforexcopier.com/api/v1/partner/routes \
-H "X-Api-Key: mfc_your_key" \
-H "Content-Type: application/json" \
-d "{\"followerExternalUserId\":\"client-42\",\"publicMasterId\":15,\"targetAccountId\":204}"
3. Node.js sketch
const base = "https://myforexcopier.com/api/v1/partner";
const headers = {
"X-Api-Key": process.env.MFC_API_KEY,
"Content-Type": "application/json"
};
await fetch(`${base}/users`, {
method: "POST",
headers,
body: JSON.stringify({
externalUserId: "client-42",
displayName: "Client Desk"
})
}).then(r => r.json());
Need the product pitch?
See the Trade Copier API feature page, then return here when you integrate.