Skip to content

Margin State event

Margin State Events

Back-office TCP sessions can subscribe to margin state transitions.

{
  "command": "Subscribe",
  "data": {
    "chanels": ["account.margin_state:*"]
  }
}

The wildcard subscription is scoped by the manager's account visibility. The server only delivers events for accounts visible through the manager's group and brand permissions.

Compact Format

["mc", 10001, 48.25, 965.12, 2000.00, -1034.88, 1]
["so", 10001, 28.10, 562.00, 2000.00, -1438.00, 1]
Index Type Description
0 string mc for margin call, so for stop out
1 int Account login
2 double Margin level
3 double Equity
4 double Margin
5 double Free margin
6 int Event code

Events are emitted only when level_type changes into margin call or stop out. Repeated recalculations with the same state do not produce duplicate mc or so events.