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 enigma, 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.

The rasa protocol has its own builder, buildRasaSubscribeMessage(addresses): one socket carries many SubAccounts, so its frame is just the full address list — { "address": ["0x…", …] }. watchNotifications manages that list for you; reach for the builder only when driving a raw socket yourself.

import { buildRasaSubscribeMessage, buildSubscribeMessage } from "@symmio/trading-core"; const frame = buildSubscribeMessage({ account: "0xaccount...", channel: "Hyper-EVM_Solver-Low-Cap_Production", protocol: "enigma", }); const rasaFrame = buildRasaSubscribeMessage(["0xaccount..."]); // '{"address":["0xaccount..."]}'

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