Get Accounts List
GetUsersByFilter¶
Description: Returns a paginated table of accounts filtered by groupFilter. Supports optional where, whereNot, and orderBy rules and returns aggregate totals for the full matched set before pagination.
Access Control¶
🛡️ Access Level Required:
SESSION_USER,SESSION_MANAGER,SESSION_ADMIN,SESSION_DEALER
Endpoint¶
GET /accounts
Request Parameters¶
| Name | Type | Required | Description |
|---|---|---|---|
groupFilter |
string | Yes | Group mask used to select accounts, for example STD-* or * |
limit |
int | Yes | Maximum number of rows to return |
offset |
int | Yes | Row offset for pagination |
where |
array | No | Additional filter rules |
whereNot |
array | No | Negated filter rules |
whereIn |
array | No | Inclusion filter rules in [[field, [value1, value2, ...]], ...] format |
whereNotIn |
array | No | Exclusion filter rules in [[field, [value1, value2, ...]], ...] format |
whereBetween |
array | No | Range filter rules in [[field, [from, to]], ...] format |
whereNotBetween |
array | No | Negative range filter rules in [[field, [from, to]], ...] format |
orderBy |
array | No | Sort rule in [field, "ASC" \| "DESC"] format |
Supported Filter Keys¶
where:[[field, operator, value], ...]whereNot:[[field, value], ...]whereIn:[[field, [value1, value2, ...]], ...]whereNotIn:[[field, [value1, value2, ...]], ...]whereBetween:[[field, [from, to]], ...]whereNotBetween:[[field, [from, to]], ...]
Supported where Operators¶
===!=><>=<=like
Request Example¶
{
"groupFilter": "STD-*",
"limit": 100,
"offset": 0,
"where": [
["enable", "=", 1]
]
}
Response Parameters¶
| Name | Type | Description |
|---|---|---|
structure |
array | Column order used in rows |
rows |
array | Account rows |
count |
int | Total number of matched accounts |
total_balance |
double | Total balance across matched accounts |
total_credit |
double | Total credit across matched accounts |
total_profit |
double | Total gross floating profit across matched accounts |
total_net_profit |
double | Total net profit across matched accounts: profit + storage + commission |
total_storage |
double | Total storage/swap across matched accounts |
total_commission |
double | Total commission across matched accounts |
total_margin |
double | Total used margin across matched accounts |
total_margin_free |
double | Total free margin across matched accounts |
total_equity |
double | Total equity across matched accounts |
total_prevbalance |
double | Total previous-day balance across matched accounts |
total_prevmonthbalance |
double | Total previous-month balance across matched accounts |
Totals are calculated across all accounts matched by groupFilter and all filter rules, before offset and limit are applied.
Row Fields¶
loginenableenable_read_onlyenable_change_passwordleveragecurrencygroupemailcountryphonecommentaddresscityzipcodenameregdateprevbalanceprevmonthbalancebalancecreditmarginmargin_freemargin_levelequityprofitnet_profitstoragecommissiononlinemagiccustomer_id
Response Example¶
{
"structure": [
"login", "enable", "enable_read_only", "enable_change_password",
"leverage", "currency", "group", "email", "country", "phone",
"comment", "address", "city", "zipcode", "name", "regdate",
"prevbalance", "prevmonthbalance", "balance", "credit",
"margin", "margin_free", "margin_level", "equity", "profit", "net_profit", "storage", "commission", "online", "magic", "customer_id"
],
"rows": [
[
1001, 1, 0, 1, 100, "USD", "STD-1", "[email protected]", "CY", "+35700000000",
"", "Street 1", "Limassol", "3010", "John Doe", 1713000000,
1200.5, 1100.0, 1500.0, 0.0, 250.0, 1250.0, 600.0, 1500.0, 0.0, -1.6, -0.4, -1.2, 1, 0, 0
]
],
"count": 1,
"total_balance": 1500.0,
"total_credit": 0.0,
"total_profit": 0.0,
"total_net_profit": -1.6,
"total_storage": -0.4,
"total_commission": -1.2,
"total_margin": 250.0,
"total_margin_free": 1250.0,
"total_equity": 1500.0,
"total_prevbalance": 1200.5,
"total_prevmonthbalance": 1100.0
}