Account events
A TP/SL is held in a separate service, not on the exchange itself, so it does not appear on the TRADING channel. When one of its levels is reached, the close orders it places are ordinary orders, reported on TRADING.
Lifecycle: PENDING → ACTIVE → TRIGGERED → COMPLETE, and any of the first three → CANCELLED. data.status is the TP/SL's status after the event. Levels are sent as numbers; amounts are decimal strings.
Private. Events about your account, such as changes of state of your take profit / stop loss orders (TP/SLs). One subscription covers your main account and every subaccount; each message carries the account_id it belongs to. The channel sends no snapshot, and messages are not replayed after a reconnect: use Get Exotic Orders (TP/SL) on the REST API to read the current state.
apiTokenAuthorizationBearer <token>API token sent in the AUTHENTICATE message (not as a header). Generate it in the One Trading UI with the Trade permission; a valid token authorises all private channels for the connection.
const socket = new WebSocket("wss://streams.fast.onetrading.com/");socket.addEventListener("message", (event) => { console.log(event.data);});