• Pure: classify + normalise an inbound message into an LTP or Depth event. Payload fields live under data per the protocol, but the parser also tolerates a flat shape for resilience across broker adapters.

    Parameters

    • raw: unknown

    Returns
        | { event: LtpEvent; kind: "ltp" }
        | { depth: MarketDepth; exchange: string; kind: "depth"; symbol: string }
        | null