Get Trades By Filter
MngGetTradesByFilter
Description: Returns a filtered list of trades for managers. Supports pagination, trade type filtering, and conditional filters (where, whereNot).
Request Parameters
| Name |
Type |
Required |
Description |
| groupFilter |
string |
Yes |
Group mask to filter trades (e.g., "*" for all) |
| limit |
int |
Yes |
Max number of records to return (1–50000) |
| offset |
int |
Yes |
Number of records to skip (for pagination) |
| tradeType |
int |
No |
Type of trade filter (e.g., open, closed) |
| where |
array |
No |
Additional conditions for filtering trades |
| whereNot |
array |
No |
Exclusion conditions for filtering trades |
bases tradeType
TRD_ALL_TRADES = 0, // All trades
TRD_OPEN_TRADES = 1, // Open trades
TRD_CLOSE_TRADES = 2, // Close trades
TRD_PENDING_TRADES = 3, // Pending trades
TRD_FINANCE_TRADES = 4 // Finance trades
Request Example
{
"groupFilter": "*",
"limit": 100,
"offset": 0,
"tradeType": 1,
"where": [],
"whereNot": []
}
Response Parameters
| Name |
Type |
Description |
| structure |
array |
List of trade fields in the result |
| rows |
array |
List of trades (each trade is an array of values) |
| count |
int |
Total number of trades matched |
| total_profit |
double |
Cumulative profit across all matched trades |
| total_storage |
double |
Cumulative storage charges |
| total_commission |
double |
Cumulative commission charges |
| total_volume |
int |
Cumulative volume across all trades |
Response Example
{
"structure": ["order", "login", "cmd", "state", "symbol", "..."],
"rows": [
[1001234, 123456, 0, 1, "EURUSD", "..."]
],
"count": 1,
"total_profit": 150.5,
"total_storage": -2.3,
"total_commission": -5.0,
"total_volume": 1000
}