Skip to content

Function: isWsFormattedUserDataEvent() ​

ts
function isWsFormattedUserDataEvent(data: WsFormattedMessage): data is WsUserDataEvents;

Works for both the listen key & WS API user data stream workflows.

  • For the listen key workflow, uses the wsKey to identify the connection dedicated to the user data stream.
  • For the WS API user data stream, uses the eventType to identify user data events from a known list (EVENT_TYPES_USER_DATA).

Parameters ​

ParameterType
dataWsFormattedMessage

Returns ​

data is WsUserDataEvents

Built by Siebly. Open source SDKs for exchange APIs.