Skip to main content
WSS
The snekfun-api-provider WebSocket uses Protocol v2: JSON text frames, explicit subscribe / unsubscribe envelopes (messageType, clientId, requestId, topic, optional data), plus connect / ping / pong for lifecycle. Auth: Public for most topics. Restricted flows (e.g. per-address history) may require appropriate subscription data — follow product security guidance.

Connection

  • Typical public URL: wss://analytics.snek.fun/websocket/ws
  • Application path: GET /ws on the WebSocket server port.
After connecting, send subscription messages. Outgoing frames wrap payloads in DefaultOutgoingMessage with event, messageType, and optional data (JSON mirrors server code: MainPage, PoolsFeed, KOTH, LiveOrdersFeed, UserHistoryByAddress, UserHistoryByAddressAndAsset).

Topics (subscribe topic field)

PoolFeed data type is FeedByAssetData; live orders use the same shape.

Subscribe example

Unsubscribe

Connect / heartbeat

Use connect (messageType: connect) with clientId and requestId, and ping / pong (messageType: ping | pong) per the shared protocol implementation.

HTTP first

Fetch the matching initial state over HTTP (main page, pools feed, orders feed, or user history), then subscribe — see Main page, Pools feed, Orders feed, User history.
Server message
type:object
Subscribe
type:object

Protocol v2 subscribe

Unsubscribe
type:object
Connect
type:object
Ping
type:object