Get stat by group
GetStatsByGroupMask¶
Description:
Fetches aggregated statistics for accounts and trades filtered by a specified group mask. Used primarily in management dashboards to quickly assess financial and operational performance across groups.
Access Control¶
🛡️ Access Level Required:
SESSION_MANAGER,SESSION_ADMIN,SESSION_DEALER
Endpoint¶
This method is routed internally as GetStatsByGroupMask.
Request Parameters¶
| Name | Type | Required | Description |
|---|---|---|---|
| group_mask | string | Yes | Wildcard mask of groups to filter |
Request Example¶
{
"group_mask": "IB-*"
}
Response Example¶
{
"total_accounts": 124,
"total_balance": 205000.50,
"total_margin": 14300.20,
"total_balance_accounts": 110,
"total_credit": 3500.00,
"total_trades": 720,
"total_profitable_trades": 310,
"total_pnl": 15700.00,
"total_commission": -560.00,
"total_swap": -120.00
}
Fields in Response¶
| Field | Type | Description |
|---|---|---|
| total_accounts | int | Number of accounts in filtered groups |
| total_balance | double | Combined balance of all accounts |
| total_margin | double | Total used margin across all accounts |
| total_balance_accounts | int | Accounts with non-zero balance |
| total_credit | double | Sum of credits assigned to accounts |
| total_trades | int | Number of trades in all accounts |
| total_profitable_trades | int | Trades that closed with profit |
| total_pnl | double | Total profit/loss across trades |
| total_commission | double | Combined commission paid |
| total_swap | double | Total swap charges applied |
Error Responses¶
Validation Error¶
{
"error": "INVALID_DATA",
"message": "group_mask is required"
}
Group Lookup Failure¶
{
"error": "GROUP_NOT_FOUND",
"message": "Unable to resolve group mask to valid group names"
}