GetCopyTradeMasterTradesByFilter¶
Endpoint¶
GET /copytrade/master/trades
Authorization¶
Requires an authenticated session. The endpoint is public for authorized users, but only for copy masters that explicitly enabled trade-history display.
Description¶
Returns a table of trading records for the requested copy master account.
The request must include login. The server verifies that this login belongs to
a copy trading master and that the master has show_trade_history = 1. If the
master is disabled or did not allow history display, the endpoint returns 403.
The response intentionally exposes only trading fields. Private account fields
such as group, account name, and trade comment are not returned and cannot
be used in public filters or sorting.
Financial balance operations are excluded from the result even when
tradeType = 0 is requested. Only market and pending trading commands are
included.
Request Parameters¶
| Name | Type | Required | Description |
|---|---|---|---|
login |
int | Yes | Copy master account login |
limit |
int | Yes | Page size. Maximum 50000 |
offset |
int | Yes | Page offset |
tradeType |
int | Yes | 0 all trading records, 1 open trades, 2 closed trades, 3 pending trades, 4 finance trades. Finance records are still excluded by this endpoint |
where |
array | No | Standard where filters |
whereNot |
array | No | Standard negative filters |
whereIn |
array | No | Standard include-by-list filters |
whereNotIn |
array | No | Standard exclude-by-list filters |
whereBetween |
array | No | Standard range filters |
whereNotBetween |
array | No | Standard negative range filters |
orderBy |
array | No | Sort definition |
Available Fields¶
The same field list is used for response columns, filtering and sorting.
| Field | Type |
|---|---|
order |
int |
login |
int |
cmd |
int |
state |
int |
symbol |
string |
reason |
int |
volume |
int |
open_time |
int64 |
close_time |
int64 |
open_price |
number |
close_price |
number |
sl |
number |
tp |
number |
profit |
number |
net_profit |
number |
commission |
number |
storage |
number |
digits |
int |
expiration |
int64 |
Not available: group, name, comment.
Request Example¶
{
"login": 100001,
"tradeType": 2,
"whereBetween": [
["close_time", [1777564800, 1780156800]]
],
"orderBy": ["close_time", "desc"],
"limit": 50,
"offset": 0
}
Response¶
{
"structure": [
"order",
"login",
"cmd",
"state",
"symbol",
"reason",
"volume",
"open_time",
"close_time",
"open_price",
"close_price",
"sl",
"tp",
"profit",
"net_profit",
"commission",
"storage",
"digits",
"expiration"
],
"rows": [
[
345001,
100001,
0,
3,
"EURUSD",
0,
100,
1778160000,
1778246400,
1.0845,
1.0912,
1.078,
1.092,
67.0,
61.5,
-3.5,
-2.0,
5,
0
]
],
"count": 1,
"total_profit": 67.0,
"total_net_profit": 61.5,
"total_storage": -2.0,
"total_commission": -3.5,
"total_volume": 100
}
Rows follow the order defined in structure.
Errors¶
| HTTP | Error | Description |
|---|---|---|
400 |
INVALID_DATA |
Request validation failed or a private field was used in filter/sort |
400 |
INVALID_USER |
Master account was not found |
403 |
TRADE_HISTORY_NOT_PUBLIC |
Master is disabled or did not allow public trade-history display |
404 |
MASTER_NOT_FOUND |
login is not a copy trading master |