You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The error comes from the fact that the subscriptions both return arrays of arrays and you guys pass it into their respective constructors Level2 and Trade which decodes them only as a single array.
Change this
new Trade(JSON.parse(o)));
To this
JSON.parse(o).map((t) => new Trade(t));
Understandable mistake to make when Level2UpdateEvent and TradeDataUpdateEvent imply singularity.
Going from the documentation the following should return a Level2 Event
apex.Level2.subscribe(console.log);
Instead you get this garbled mess
The text was updated successfully, but these errors were encountered: