Skip to Content
Symmio Trading-SDK — the SDK surface for builders on HyperEVM
CoreNotificationsparseNotificationFrame

parseNotificationFrame

Parse an inbound socket frame into a RawPositionNotification, or null when the frame is not a notification (control/ack frames, malformed JSON, or a missing payload — all skipped silently by the caller).

For defilytics, the notification is unwrapped from its { data, address } envelope and the top-level address is hoisted onto the frame.

import { parseNotificationFrame } from "@symmio/trading-core"; const raw = parseNotificationFrame(event.data, "defilytics"); if (raw) { // a real notification frame }

Parameters

dataunknownrequired

The raw event.data — a JSON string, or an already-parsed object.

protocolSymmioNotificationsProtocolrequired

The endpoint’s wire protocol.

Returns

The parsed raw frame, or null for control/ack frames, malformed JSON, or a missing payload.

Last updated on