Skip to content

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


πŸ“‘ Outgoing Message Format

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 brand string Assigned brand name
15 otp_secret string OTP secret
16 access_backoffice int BackOffice/trading scope flag. Admins always have this scope
17 access_crm int CRM/sales scope flag. Admins always have this scope

CRM access rights

All CRM access flags are integers (0 = no access, 1 = allowed).

Index Field Description
18 see_customers View customers
19 set_customers Create/update customers
20 del_customers Delete customers
21 export_customers Export customers
22 see_all_customers View all customers in allowed CRM scope
23 see_leads View leads
24 set_leads Create/update leads
25 del_leads Delete leads
26 convert_leads Convert leads to customers
27 assign_leads Assign/reassign leads
28 export_leads Export leads
29 see_all_leads View all leads in allowed CRM scope
30 see_notes View notes
31 set_notes Create/update notes
32 del_notes Delete notes
33 see_customer_contacts View customer contact fields
34 set_customer_contacts Update customer contact fields
35 see_finance View CRM finance
36 set_finance Create/update finance requests
37 approve_finance Approve finance requests
38 decline_finance Decline finance requests
39 export_finance Export finance records
40 see_deposits View deposits
41 set_deposits Create/update deposits
42 see_withdrawals View withdrawals
43 set_withdrawals Create/update withdrawals
44 see_credits View credits
45 set_credits Create/update credits
46 see_bonuses View bonuses
47 set_bonuses Create/update bonuses

πŸ” Access rights

All access flags are integers (0 = no access, 1 = allowed).

Index Field Description
48 see_accounts View accounts
49 set_accounts_balance Change account balance
50 see_accounts_balance View balance
51 del_accounts_balance Delete balance
52 see_accounts_online View online accounts
53 dealer_trades Dealer trades
54 set_trades Manage trades
55 admin Administrator
56 logs View logs
57 reports View reports
58 del_trades Delete trades
59 market_watch Market Watch
60 email_right Email access
61 see_accounts_detail Account details
62 see_trades View trades
63 set_accounts Manage accounts
64 plugins Plugins
65 server_reports Server reports
66 techsupport Technical support
67 del_accounts Delete accounts
68 see_export Export data

πŸ•’ System fields

Index Field Type Description
69 sort_index int Sorting index
70 create_time int64 Creation time (Unix timestamp)
71 last_login_time int64 Last login time (Unix timestamp)

🌐 IP filtering

Index Field Type Description
72 ipfilter int IP filter enabled
73 ip_from uint64 Allowed IP range start
74 ip_to uint64 Allowed IP range end

πŸ‘₯ Managed groups

Index Field Type Description
75 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",
  "default",
  "",
  1,
  1,
  1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
  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)