GetCopyTradeMasterStats¶
Endpoint¶
GET /copytrade/master/stats
Authorization¶
Requires an authenticated customer, manager, dealer, or CRM session.
For SESSION_CUSTOMER, the requested master must be visible to the customer:
public masters are available, and private masters are available only to the
customer who owns the master account.
Description¶
Returns full statistics for one copy trading master and one selected period.
The request must include login and period. The server verifies that login
belongs to an enabled copy trading master. Statistics are calculated from the
backend master statistics cache, using closed market trades and daily equity
snapshots.
PNL metrics use net realized PNL: profit + commission + storage.
pnl_history is cumulative by day. For example, if the master closes a trade
with PNL 20 on day 1 and another trade with PNL 12 on day 2, the graph
points are 20, then 32.
ROI is calculated against the first available daily equity snapshot in the selected period. Max drawdown is calculated from daily equity snapshots and does not represent intraday drawdown.
Request Parameters¶
| Name | Type | Required | Description |
|---|---|---|---|
login |
int | Yes | Copy master account login |
period |
string | Yes | Statistics period. Allowed values: 7D, 30D, 90D, 365D |
Request Example¶
{
"login": 100001,
"period": "30D"
}
Response¶
{
"login": 100001,
"period": "30D",
"currency": "USD",
"pnl": 1250.75,
"roi": 18.42,
"equity_start": 10000,
"equity_end": 11250.75,
"trades": 42,
"profit_trades": 28,
"loss_trades": 14,
"win_rate": 66.67,
"avg_pnl_per_trade": 29.78,
"max_drawdown": 8.15,
"followers": 12,
"weekly_trades": 7,
"avg_holding_time": 3600,
"last_trade_time": 1777564800,
"sharp_ratio": 0.3,
"sortino_ratio": 0.2,
"profit_per_symbol": [
{
"symbol": "EURUSD",
"profit": 820.5,
"orders": 12,
"volume": 1500
},
{
"symbol": "XAUUSD",
"profit": -120.25,
"orders": 4,
"volume": 300
}
],
"pnl_history": [
{
"time": 1777564800,
"pnl": 0,
"roi": 0
},
{
"time": 1777651200,
"pnl": 150.25,
"roi": 1.5
}
]
}
Response Fields¶
| Field | Type | Description |
|---|---|---|
login |
int | Copy master account login |
period |
string | Selected statistics period |
currency |
string | Master account group currency |
pnl |
number | Net realized PNL for the selected period |
roi |
number | PNL as percent of starting equity |
equity_start |
number | First available daily equity snapshot in the selected period |
equity_end |
number | Last available daily equity snapshot in the selected period, or equity_start + pnl when no later snapshot exists |
trades |
int | Closed market trades in the selected period |
profit_trades |
int | Closed market trades with positive net PNL |
loss_trades |
int | Closed market trades with negative net PNL |
win_rate |
number | profit_trades / trades * 100 |
avg_pnl_per_trade |
number | pnl / trades |
max_drawdown |
number | Max drawdown percent from daily equity snapshots |
followers |
int | Active unique followers for the master |
weekly_trades |
int | Closed market trades during the last 7 days inside the selected period |
avg_holding_time |
int | Average holding time in seconds for closed market trades |
last_trade_time |
int64 | Close time of the latest closed market trade in the selected period |
sharp_ratio |
number | Daily PNL mean divided by daily PNL standard deviation |
sortino_ratio |
number | Daily PNL mean divided by downside deviation |
profit_per_symbol |
array | Net PNL grouped by symbol |
pnl_history |
array | Cumulative daily PNL curve with day start time and ROI |
pnl_history contains one point per calendar day in the selected period. The
array length is 7, 30, 90, or 365 depending on period. Days without closed
trades repeat the previous cumulative PNL value.
Errors¶
| HTTP | Error | Description |
|---|---|---|
400 |
INVALID_DATA |
Request validation failed |
400 |
INVALID_PERIOD |
period is not one of 7D, 30D, 90D, 365D |
403 |
MASTER_DISABLED |
The copy trading master is disabled |
403 |
MASTER_NOT_PUBLIC |
Customer session cannot access this master |
404 |
MASTER_NOT_FOUND |
login is not a copy trading master |