Comments Channel (WebSocket)
Overview
Section titled “Overview”This channel delivers comment events from the Openfish Gamma server. It runs on a separate service (port 3001) and does not require authentication. By default, every new comment across all markets is broadcast to connected clients.
Server: wss://gamma.openfish.fun/ws/comments (port 3001)
Subscribe
Section titled “Subscribe”Direction: Client -> Server
No subscription message is strictly necessary — connecting is enough to start receiving the full comment firehose. To narrow the stream to specific markets, send a filter message:
| Field | Type | Required | Description |
|---|---|---|---|
markets | array of strings | No | Condition IDs to filter. Omit for all. |
type | string | Yes | Must be "comments" |
{ "markets": ["0xbd31dc8a..."], "type": "comments"}Heartbeat
Section titled “Heartbeat”Send PING every 10 seconds. Server responds with PONG.
Events
Section titled “Events”Comment Event
Section titled “Comment Event”Emitted whenever a new comment is posted on any subscribed market.
| Field | Type | Required | Description |
|---|---|---|---|
event_type | string | Yes | "comment" |
id | string | Yes | Comment ID |
market | string | Yes | Condition ID |
author | string | Yes | Author address or username |
body | string | Yes | Comment text |
parent_id | string | No | Parent comment ID (for replies) |
created_at | string | Yes | ISO 8601 timestamp |
Sample Message:
{ "event_type": "comment", "id": "c1d2e3f4-a5b6-7890-cdef-123456789012", "market": "0xbd31dc8a...", "author": "0x6e0c80c9...", "body": "I think this will resolve Yes.", "parent_id": null, "created_at": "2026-04-09T15:30:00Z"}