Skip to content

Balance Stream

Balance events are pushed automatically to all active WebSocket sessions of the authenticated account.

Outgoing Message Format

Sent as a JSON array:

Index Field Type Description
0 "b" string Event marker for balance
1 login int Account login
2 balance double Account balance
3 margin double Used margin
4 margin_free double Free margin
5 margin_level double Margin level
6 equity double Account equity
7 credit double Account credit
8 level_type int Margin level type
9 profit double Floating profit
10 code int Event code

Example

[
  "b",
  100020,
  12500.0,
  850.0,
  11650.0,
  1470.58,
  12610.3,
  0.0,
  0,
  110.3,
  1
]

Notes

  • Balance events are not channel-based.
  • They are routed by account login.
  • The payload is intended as a real-time delta/update event, not a full account profile document.