Skip to Content

WS /ws/activity

Real-time activity stream with granular subscription filtering. Subscribe to activity by address, ENS name, club, or subscribe to all activity. Supports event type include/exclude filters.

Connection Example

wscat -c "wss://api.grails.app/ws/activity"

On connect, the server sends:

{ "type": "connected", "channel": "activity", "clientId": "req-1", "timestamp": "2026-04-08T00:00:00.000Z" }

Client Messages

Message TypeFieldsDescription
subscribe_allReceive all activity
unsubscribe_allStop receiving all activity
subscribe_addressaddress: stringWatch activity for an address
unsubscribe_addressaddress: stringStop watching an address
subscribe_namename: stringWatch activity for an ENS name
unsubscribe_namename: stringStop watching a name
subscribe_clubclub: stringWatch activity for a club (replaces previous)
unsubscribe_clubStop watching club activity
set_event_filterfilter_type: include|exclude, event_types: string[]Filter event types
clear_event_filterRemove event type filters
pingKeepalive

Server Messages

Message TypeDescription
connectedConnection established
subscribedSubscription confirmed (includes subscription_type)
unsubscribedUnsubscription confirmed
activity_eventActivity broadcast (includes event_type, data, timestamp)
filter_setEvent filter applied
filter_clearedEvent filter removed
pongKeepalive response
errorError message

Subscription Logic

An activity event is sent to a client if any of these match:

  • Client subscribed to all (subscribe_all)
  • Actor address matches a subscribed address
  • Counterparty address matches a subscribed address
  • ENS name matches a subscribed name
  • Activity’s club matches the subscribed club

Then event type filters are applied (include whitelist OR exclude blacklist).

Last updated on