Polymarket provides a Typescript client for interacting with this streaming service. Download and view it’s documentation here
Overview
The comments subscription provides real-time updates for comment-related events on the Polymarket platform. This includes new comments being created, as well as other comment interactions like reactions and replies.Subscription Details
- Topic: 
comments - Type: 
comment_created(and potentially other comment event types likereaction_created) - Authentication: May require Gamma authentication for user-specific data
 - Filters: Optional (can filter by specific comment IDs, users, or events)
 
Subscription Message
Message Format
When subscribed to comments, you’ll receive messages with the following structure:Message Types
comment_created
Triggered when a user creates a new comment on an event or in reply to another comment.comment_removed
Triggered when a comment is removed or deleted.reaction_created
Triggered when a user adds a reaction to an existing comment.reaction_removed
Triggered when a reaction is removed from a comment.Payload Fields
| Field | Type | Description | 
|---|---|---|
body | string | The text content of the comment | 
createdAt | string | ISO 8601 timestamp when the comment was created | 
id | string | Unique identifier for this comment | 
parentCommentID | string | ID of the parent comment if this is a reply (null for top-level comments) | 
parentEntityID | number | ID of the parent entity (event, market, etc.) | 
parentEntityType | string | Type of parent entity (e.g., “Event”, “Market”) | 
profile | object | Profile information of the user who created the comment | 
reactionCount | number | Current number of reactions on this comment | 
replyAddress | string | Polygon address for replies (may be different from userAddress) | 
reportCount | number | Current number of reports on this comment | 
userAddress | string | Polygon address of the user who created the comment | 
Profile Object Fields
| Field | Type | Description | 
|---|---|---|
baseAddress | string | User profile address | 
displayUsernamePublic | boolean | Whether the username should be displayed publicly | 
name | string | User’s display name | 
proxyWallet | string | Proxy wallet address used for transactions | 
pseudonym | string | Generated pseudonym for the user | 
Parent Entity Types
The following parent entity types are supported:Event- Comments on prediction eventsMarket- Comments on specific markets- Additional entity types may be available
 
Example Messages
New Comment Created
Reply to Existing Comment
Comment Hierarchy
Comments support nested threading:- Top-level comments: 
parentCommentIDis null or empty - Reply comments: 
parentCommentIDcontains the ID of the parent comment - All comments are associated with a 
parentEntityIDandparentEntityType 
Use Cases
- Real-time comment feed displays
 - Discussion thread monitoring
 - Community sentiment analysis
 
Content
- Comments include 
reactionCountandreportCount - Comment body contains the full text content
 
Notes
- The 
createdAttimestamp uses ISO 8601 format with timezone information - The outer 
timestampfield represents when the WebSocket message was sent - User profiles include both primary addresses and proxy wallet addresses