Meta Fiver – API Overview
These APIs let you subscribe MT5 accounts once, automatically sync & normalize data, and then query terminal-accurate reports anytime via REST.
Authentication & Base
- Authentication: API key via
Authorization: Bearer <API_KEY> - Base URL:
http://localhost:4000 - Sync behavior: Scheduled background sync after subscription
Create API keys in Dashboard → API Keys (after login). Keep your key secret.
1. Subscribe an Account
Endpoint: POST /api/v1/subscribe
Registers an MT5 account for tracking and reporting. Adds the account to the sync queue. Accepts MT5 login (account number), password, server (broker), and optional label. No broker-specific integration required. Initial status starts as pending.
Request body
{
"login": 12345678,
"password": "your_password",
"server": "YourBroker",
"label": "Optional label"
}curl -X POST http://localhost:4000/api/v1/subscribe \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"login": 12345678, "password": "your_password", "server": "YourBroker", "label": "Optional label"}'Response (201)
{
"id": "...",
"accountNumber": 12345678,
"status": "pending",
"message": "Account queued for sync"
}2. Get Account Report
Endpoint: GET /api/v1/accounts/:number
Fetch complete report data for a subscribed MT5 account. Full trade history, terminal-accurate metrics, precomputed analytics (daily/monthly/cumulative P&L, drawdowns). Last sync timestamp included.
curl -X GET "http://localhost:4000/api/v1/accounts/12345678" \
-H "Authorization: Bearer YOUR_API_KEY"Response (200)
{
"success": true,
"data": {
"report": {
"_id": "6980326539ecc0a1203f1e22",
"account": 123456789,
"name": "Dummy Account",
"currency": "USD",
"type": "demo",
"broker": "Dummy Broker Ltd",
"digits": 2,
"summary": {
"gain": 0.104755,
"activity": 0.005169,
"deposit": [
2000,
1
],
"withdrawal": [
0,
0
],
"dividend": 0,
"correction": 0,
"credit": 0
},
"summaryIndicators": {
"sharp_ratio": 0.859309,
"profit_factor": 17.522871,
"recovery_factor": 19.115876,
"drawdown": 0.005105,
"deposit_load": 0.180044,
"trades_per_week": 8,
"hold_time": 284
},
"balance": {
"balance": 2209.51,
"equity": 2209.51,
"period": 10800,
"chart": [
[
{
"x": 1770130800,
"y": [
0
]
},
{
"x": 1770141600,
"y": [
0
]
},
{
"x": 1770152400,
"y": [
0
]
}
]
],
"table": {
"years": [
{
"year": 2026,
"months": {
"1": 0.104755
},
"yearly": 0.104755
}
],
"total": 0.104755
}
},
"dividend": {
"dividend": 0,
"correction": 0,
"credit": 0,
"period": 10800,
"chart": [
{
"x": 1770141600,
"y": [
0
]
},
{
"x": 1770152400,
"y": [
0
]
},
{
"x": 1770163200,
"y": [
0
]
}
],
"table": {
"years": [
{
"year": 2026,
"months": {},
"yearly": 0
}
],
"total": 0
}
},
"profitTotal": {
"profit": 222.19,
"profit_gross": 222.19,
"profit_dividend": 0,
"profit_swap": 0,
"loss": -12.68,
"loss_gross": -12.68,
"loss_commission": -1.76
},
"profitMoney": {
"period": 10800,
"profit": [
{
"x": 1770163200,
"y": [
0
]
},
{
"x": 1770174000,
"y": [
0
]
},
{
"x": 1770184800,
"y": [
16.42
]
}
],
"loss": [
{
"x": 1770141600,
"y": [
0
]
},
{
"x": 1770152400,
"y": [
0
]
},
{
"x": 1770163200,
"y": [
0
]
}
],
"table": {
"years": [
{
"year": 2026,
"months": {
"1": 209.51
},
"yearly": 209.51
}
],
"total": 209.51
}
},
"profitDeals": {
"period": 10800,
"profit": [
{
"x": 1769742000,
"y": [
0
]
},
{
"x": 1769752800,
"y": [
0
]
},
{
"x": 1769763600,
"y": [
0
]
}
],
"loss": [
{
"x": 1769742000,
"y": [
0
]
},
{
"x": 1769752800,
"y": [
0
]
},
{
"x": 1769763600,
"y": [
0
]
}
],
"table": {
"years": [
{
"year": 2026,
"months": {
"1": 16
},
"yearly": 16
}
],
"total": 16
}
},
"profitDaily": {
"chart": [
{
"x": 0,
"y": [
190.22,
-12.24
]
},
{
"x": 1,
"y": [
15.55,
-0.22
]
},
{
"x": 2,
"y": [
16.42,
-0.22
]
}
]
},
"profitType": {
"robot": {
"x": 0,
"y": [
0,
0
]
},
"manual": {
"x": 0,
"y": [
222.19,
-12.68
]
},
"signals": {
"x": 0,
"y": [
0,
0
]
}
},
"longShortTotal": {
"long": 4,
"short": 4
},
"longShort": {
"period": 10800,
"long": [
{
"x": 1770141600,
"y": [
0
]
},
{
"x": 1770152400,
"y": [
0
]
},
{
"x": 1770163200,
"y": [
0
]
}
],
"short": [
{
"x": 1770098400,
"y": [
1
]
},
{
"x": 1770109200,
"y": [
1
]
},
{
"x": 1770120000,
"y": [
0
]
}
],
"all": [
{
"x": 2,
"y": [
0,
1
]
},
{
"x": 3,
"y": [
0,
0
]
},
{
"x": 4,
"y": [
0,
0
]
}
]
},
"longShortIndicators": {
"netto_pl": [
126.9,
82.61
],
"average_pl": [
31.725,
20.6525
],
"average_pl_percent": [
0.015254,
0.010026
],
"commissions": [
-0.55,
-1.21
],
"average_profit": [
34.5925,
20.955
],
"average_profit_percent": [
0.016683,
0.010173
],
"trades": [
4,
4
],
"win_trades": [
2,
4
]
},
"tradeTypeTotal": {
"robots": 0,
"manual": 8,
"signals": 0
},
"symbolMoney": {
"period": 10800,
"chart": [
[
"XAUUSD",
[
{
"x": 1769990400,
"y": [
0
]
},
{
"x": 1770001200,
"y": [
-10.85
]
},
{
"x": 1770012000,
"y": [
40.89
]
}
]
]
]
},
"symbolDeals": {
"period": 10800,
"chart": [
[
"XAUUSD",
[
{
"x": 1769990400,
"y": [
0
]
},
{
"x": 1770001200,
"y": [
1
]
},
{
"x": 1770012000,
"y": [
1
]
}
]
]
]
},
"symbolIndicators": {
"profit_factor": [
[
"XAUUSD",
17.522871
]
],
"netto_profit": [
[
"XAUUSD",
209.51
]
],
"fees": [
[
"XAUUSD",
-1.76
]
]
},
"symbolsTotal": {
"total": [
[
"XAUUSD",
209.51,
8
]
]
},
"symbolTypes": {
"type": [
[
"Currency",
8
]
]
},
"drawdown": {
"drawdown": 0,
"deposit_load": 0,
"period": 10800,
"chart": [
[
{
"x": 1769747700,
"y": [
0
]
},
{
"x": 1769752800,
"y": [
0
]
},
{
"x": 1769763600,
"y": [
0
]
}
]
]
},
"risksIndicators": {
"profit": [
76.86,
-10.74
],
"max_consecutive_trades": [
5,
1
],
"max_consecutive_profit": [
170.34,
-10.74
]
},
"risksMfeMaePercent": {
"max_avg_profit_ratio": 0.011708,
"max_avg_mfe_ratio": 0.011708,
"min_avg_loss_ratio": 0,
"min_avg_mae_ratio": 0,
"period": 10800,
"chart": [
[
{
"x": 1769796000,
"y": [
0,
0,
0,
0
]
},
{
"x": 1769806800,
"y": [
0,
0,
0,
0
]
},
{
"x": 1769817600,
"y": [
0,
0,
0,
0
]
}
]
]
},
"risksMfeMaeMoney": {
"max_avg_profit": 25.68,
"max_avg_mfe": 25.68,
"min_avg_loss": 0,
"min_avg_mae": 0,
"period": 10800,
"chart": [
[
{
"x": 1770055200,
"y": [
0,
0,
0,
0
]
},
{
"x": 1770066000,
"y": [
0,
0,
0,
0
]
},
{
"x": 1770076800,
"y": [
0,
0,
0,
0
]
}
]
]
},
"tradeHistory": {
"fromDate": "2026-02-02T05:13:08.718000+00:00",
"toDate": "2026-02-04T06:43:34.991422+00:00",
"fetchedAt": "2026-02-04T06:43:35.012416+00:00",
"totalDeals": 7,
"deals": [
{
"ticket": 1572962202,
"order": 0,
"time": 1770013265,
"time_msc": 1770013265668,
"time_iso": "2026-02-02T06:21:05+00:00",
"type": 0,
"type_name": "BUY",
"entry": 1,
"entry_name": "OUT",
"magic": 0,
"position_id": 1676948613,
"reason": 5,
"volume": 0.01,
"price": 4497.53,
"commission": 0,
"swap": 0,
"profit": 51.85,
"fee": 0,
"symbol": "XAUUSD",
"comment": "[tp 4497.53000]",
"external_id": "proactive"
},
{
"ticket": 1574595039,
"order": 0,
"time": 1770028390,
"time_msc": 1770028390660,
"time_iso": "2026-02-02T10:33:10+00:00",
"type": 1,
"type_name": "SELL",
"entry": 1,
"entry_name": "OUT",
"magic": 0,
"position_id": 1678717539,
"reason": 4,
"volume": 0.03,
"price": 4681.264,
"commission": 0,
"swap": 0,
"profit": -0.18,
"fee": 0,
"symbol": "XAUUSD",
"comment": "[sl 4681.77100]",
"external_id": "proactive"
},
{
"ticket": 1574709115,
"order": 1678845582,
"time": 1770029577,
"time_msc": 1770029577992,
"time_iso": "2026-02-02T10:52:57+00:00",
"type": 1,
"type_name": "SELL",
"entry": 1,
"entry_name": "OUT",
"magic": 0,
"position_id": 1678827926,
"reason": 1,
"volume": 0.03,
"price": 4696.701,
"commission": 0,
"swap": 0,
"profit": 61.51,
"fee": 0,
"symbol": "XAUUSD",
"comment": "",
"external_id": ""
}
],
"summary": {
"totalProfit": 222.01,
"totalCommission": 0,
"totalSwap": 0,
"totalFee": 0,
"netProfit": 222.01,
"winningTrades": 6,
"losingTrades": 1,
"totalClosedTrades": 7,
"winRate": 85.71,
"symbolsTraded": [
"XAUUSD"
]
}
},
"createdAt": "2026-02-02T05:13:09.187Z",
"updatedAt": "2026-02-04T13:34:24.254Z"
}
}
}3. Update Account Credentials
Endpoint: PATCH /api/v1/subscribe/:number
Update MT5 login or password when broker credentials change. Applies to already subscribed accounts. Next sync automatically uses updated credentials. Keeps historical data intact.
Request body
{
"login": "new_mt5_login",
"password": "new_password"
}curl -X PATCH http://localhost:4000/api/v1/subscribe/12345678 \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"login": "new_mt5_login", "password": "new_password"}'Response (200)
{
"accountNumber": 12345678,
"status": "updated",
"message": "Credentials updated. Next sync will use new credentials."
}4. Get All Subscribed Accounts
Endpoint: GET /api/v1/accounts
List all MT5 accounts under your API key. Paginated results (limit & offset). Shows account number, broker, status, last sync time per account.
curl -X GET "http://localhost:4000/api/v1/accounts?limit=20&offset=0" \
-H "Authorization: Bearer YOUR_API_KEY"Response (200)
{
"accounts": [
{ "accountNumber": 12345678, "broker": "BrokerA", "status": "active", "lastSyncedAt": "..." },
{ "accountNumber": 87654321, "broker": "BrokerB", "status": "active", "lastSyncedAt": "..." }
],
"total": 2,
"limit": 20,
"offset": 0
}5. Unsubscribe an Account
Endpoint: DELETE /api/v1/subscribe/:number
Stop syncing and remove an MT5 account. Halts future data updates. Account reports become unavailable. Clean removal from sync pipeline.
curl -X DELETE "http://localhost:4000/api/v1/subscribe/12345678" \
-H "Authorization: Bearer YOUR_API_KEY"Response (200)
{
"accountNumber": 12345678,
"status": "unsubscribed",
"message": "Account removed from sync"
}6. Subscribe Bulk Accounts
Endpoint: POST /api/v1/subscribe/bulk
Register multiple MT5 accounts in one request. Accepts a list of accounts with credentials. Each account is queued independently. Returns per-account subscription status. Ideal for prop firms or large client onboarding.
Request body
{
"accounts": [
{ "login": 12345678, "password": "pass1", "server": "BrokerA", "label": "Optional" },
{ "login": 87654321, "password": "pass2", "server": "BrokerB" }
]
}curl -X POST http://localhost:4000/api/v1/subscribe/bulk \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"accounts": [{"login": 12345678, "password": "pass1", "server": "BrokerA", "label": "Optional"}, {"login": 87654321, "password": "pass2", "server": "BrokerB"}]}'Response (201)
{
"subscribed": [
{ "accountNumber": 12345678, "id": "...", "status": "pending" },
{ "accountNumber": 87654321, "id": "...", "status": "pending" }
],
"count": 2,
"message": "Accounts queued for sync"
}7. Unsubscribe Bulk Accounts
Endpoint: POST /api/v1/unsubscribe/bulk
Remove multiple subscribed accounts at once. Accepts a list of account numbers. Fast cleanup for churned or expired accounts. Confirms which accounts were removed.
Request body
{
"accountNumbers": [12345678, 87654321]
}curl -X POST http://localhost:4000/api/v1/unsubscribe/bulk \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"accountNumbers": [12345678, 87654321]}'Response (200)
{
"unsubscribed": [12345678, 87654321],
"count": 2,
"message": "Accounts removed from sync"
}