Managers
Manager events are sent automatically to all connected clients when a manager record is added, updated, deleted, or otherwise changed.
They are used for:
- Manager creation / update
- Permission changes
- Account administration
- Audit and synchronization between clients
Sent as a JSON array.
The protocol is positional β the order of fields is strictly fixed.
General structure
[
"m",
<manager fields...>,
<code>
]
| Index |
Field |
Type |
Description |
| 0 |
"m" |
string |
Event marker (Manager) |
| 1 |
id |
int |
Manager ID |
| 2 |
enable |
int |
Enabled flag (1 = enabled, 0 = disabled) |
| 3 |
name |
string |
Manager name |
| 4 |
password |
string |
Password |
| 5 |
email |
string |
Email |
| 6 |
phone |
string |
Phone |
| 7 |
country |
string |
Country |
| 8 |
city |
string |
City |
| 9 |
address |
string |
Address |
| 10 |
position |
string |
Role / position |
| 11 |
messengers |
string |
Messengers |
| 12 |
social_networks |
string |
Social networks |
| 13 |
language |
string |
Language |
| 14 |
otp_secret |
string |
OTP secret |
π Access rights
All access flags are integers (0 = no access, 1 = allowed).
| Index |
Field |
Description |
| 15 |
see_accounts |
View accounts |
| 16 |
set_accounts_balance |
Change account balance |
| 17 |
see_accounts_balance |
View balance |
| 18 |
del_accounts_balance |
Delete balance |
| 19 |
see_accounts_online |
View online accounts |
| 20 |
dealer_trades |
Dealer trades |
| 21 |
set_trades |
Manage trades |
| 22 |
admin |
Administrator |
| 23 |
logs |
View logs |
| 24 |
reports |
View reports |
| 25 |
del_trades |
Delete trades |
| 26 |
market_watch |
Market Watch |
| 27 |
email_right |
Email access |
| 28 |
see_accounts_detail |
Account details |
| 29 |
see_trades |
View trades |
| 30 |
set_accounts |
Manage accounts |
| 31 |
plugins |
Plugins |
| 32 |
server_reports |
Server reports |
| 33 |
techsupport |
Technical support |
| 34 |
del_accounts |
Delete accounts |
| 35 |
see_export |
Export data |
π System fields
| Index |
Field |
Type |
Description |
| 36 |
sort_index |
int |
Sorting index |
| 37 |
create_time |
int64 |
Creation time (Unix timestamp) |
| 38 |
last_login_time |
int64 |
Last login time (Unix timestamp) |
π IP filtering
| Index |
Field |
Type |
Description |
| 39 |
ipfilter |
int |
IP filter enabled |
| 40 |
ip_from |
uint64 |
Allowed IP range start |
| 41 |
ip_to |
uint64 |
Allowed IP range end |
π₯ Managed groups
| Index |
Field |
Type |
Description |
| 42 |
groups |
string |
Comma-separated group list |
β‘ Event code
enum EventRecordType {
EV_RECORD_ADD = 0,
EV_RECORD_UPDATE,
EV_RECORD_DELETE,
EV_RECORD_RESTORE,
EV_RECORD_ARCHIVE,
EV_RECORD_ACTIVATE_TRADE,
EV_RECORD_CLOSE_TRADE
};
| Code |
Event |
Description |
| 0 |
ADD |
New manager added |
| 1 |
UPDATE |
Manager updated |
| 2 |
DELETE |
Manager deleted |
| 3 |
RESTORE |
Manager restored |
| 4 |
ARCHIVE |
Manager archived |
| 5 |
ACTIVATE_TRADE |
Trade activated |
| 6 |
CLOSE_TRADE |
Trade closed |
π¦ Example message
[
"m",
12,
1,
"admin",
"******",
"[email protected]",
"+123456789",
"DE",
"Berlin",
"Street 1",
"Administrator",
"",
"",
"en",
"",
1,1,1,0,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,0,1,
0,
1700000000,
1700100000,
1,
3232235521,
3232235775,
"admins,dealers",
1
]
π§ Client parsing tips
- Always check
arr[0] === "m"
- Use fixed indexes, not field names
code is always the last element
- Time fields are Unix timestamps (UTC)
- Rights flags are binary (
0 / 1)