WSSUBSCRIBE#
Add channels to the per-connection subscription set. Idempotent. Wildcards (*@swaps, solana@*) are accepted.
Request
{ "method": "SUBSCRIBE",
"params": ["solana@swaps", "mainnet@erc20_transfers"],
"id": 1 }Reply
{ "result": null, "id": 1 }A single bad selector rejects the whole command — the existing set is unchanged. The wrap_envelope mode is fixed at upgrade time and is not affected by SUBSCRIBE.
WSUNSUBSCRIBE#
Remove channels from the subscription set. Silently ignores unknown selectors.
{ "method": "UNSUBSCRIBE",
"params": ["mainnet@erc20_transfers"],
"id": 2 }To remove a wildcard subscription pass the exact wildcard form — *@swaps removes the wildcard entry, not the individual streams it currently matches.
WSLIST_SUBSCRIPTIONS#
Inspect the current subscription set. Order preserved, wildcards returned verbatim.
{ "method": "LIST_SUBSCRIPTIONS", "id": 3 }
// →
{ "result": ["solana@swaps", "mainnet@*"], "id": 3 }WSSET_FILTER#
Drop non-matching events from the wire before delivery. String equality only; fields AND; values OR; missing-field counts as a miss. Filters apply per explicit network@stream selector — wildcards always pass through.
{ "method": "SET_FILTER",
"params": [
"solana@swaps",
{ "protocol": "raydium_cpmm", "user": ["a", "b"] }
],
"id": 1 }block_num, network, module_hash) are not filterable — only keys inside events[*].WSCLEAR_FILTER#
Drop the filter for the listed selectors. Silently ignores selectors without a filter.
{ "method": "CLEAR_FILTER", "params": ["solana@swaps"], "id": 2 }