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

buildSubscribeMessage

Build the subscribe frame to send on (re)connect for a notifications endpoint.

For defilytics, this is a channel_patterns frame scoped to the account with wildcard identifiers (every quote id for the account). The frame is returned as a JSON string, ready to send.

import { buildSubscribeMessage } from "@symmio/trading-core"; const frame = buildSubscribeMessage({ account: "0xaccount...", channel: "Hyper-EVM_Solver-Low-Cap_Production", protocol: "defilytics", });

Parameters

The single argument is a BuildSubscribeMessageParameters object:

accountAddressrequired

SubAccount address to subscribe for.

channelstringrequired

Channel / app_name configured for the endpoint.

protocolSymmioNotificationsProtocolrequired

Wire protocol the endpoint speaks.

Returns

string

The frame serialized as a JSON string, ready to send. Throws a SymmError for an unsupported protocol.

Last updated on