Trade Stream¶
Trade 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 | "o" |
string | Event marker for order / trade |
| 1 | order |
int | Trade order ID |
| 2 | login |
int | Account login |
| 3 | symbol |
string | Trade symbol |
| 4 | cmd |
int | Trade command |
| 5 | volume |
int | Trade volume |
| 6 | open_price |
double | Open price |
| 7 | close_price |
double | Close price |
| 8 | open_time |
int64 | Open timestamp |
| 9 | close_time |
int64 | Close timestamp |
| 10 | tp |
double | Take Profit |
| 11 | sl |
double | Stop Loss |
| 12 | state |
int | Trade state |
| 13 | storage |
double | Swap / storage value |
| 14 | commission |
double | Commission |
| 15 | profit |
double | Profit |
| 16 | comment |
string | Trade comment |
| 17 | code |
int | Event code |
Example¶
[
"o",
100739,
100020,
"EURUSD",
0,
100,
1.1001,
0.0,
1775481000,
0,
0.0,
0.0,
0,
0.0,
-1.2,
15.8,
"manual trade",
1
]
Notes¶
- The same marker
"o"is also used for calculated trade updates. - Clients should interpret the payload using the current trade state and event code.
- Trade events are account-scoped, not symbol-channel scoped.