Skip to main content
The Polymarket Real-Time Data Socket (RTDS) is a WebSocket-based streaming service that provides real-time updates for comments and crypto prices.

TypeScript client

Official RTDS TypeScript client (real-time-data-client).

Endpoint

wss://ws-live-data.polymarket.com
Some user-specific streams may require gamma_auth with your wallet address.

Subscribing

Send a JSON message to subscribe to data streams:
{
  "action": "subscribe",
  "subscriptions": [
    {
      "topic": "topic_name",
      "type": "message_type",
      "filters": "optional_filter_string",
      "gamma_auth": {
        "address": "wallet_address"
      }
    }
  ]
}
To unsubscribe, send the same structure with "action": "unsubscribe". Subscriptions can be added, removed, and modified without disconnecting. Send PING messages every 5 seconds to maintain the connection.
Only the subscription types documented below are supported.

Message Structure

All messages follow this structure:
{
  "topic": "string",
  "type": "string",
  "timestamp": "number",
  "payload": "object"
}
FieldTypeDescription
topicstringThe subscription topic (e.g., crypto_prices, comments)
typestringThe message type/event (e.g., update, reaction_created)
timestampnumberUnix timestamp in milliseconds when the message was sent
payloadobjectEvent-specific data object

Crypto Prices

Real-time cryptocurrency price data from two sources: Binance and Chainlink. No authentication required.

Binance Source

Subscribe to all symbols:
{
  "action": "subscribe",
  "subscriptions": [
    {
      "topic": "crypto_prices",
      "type": "update"
    }
  ]
}
Subscribe to specific symbols with a comma-separated filter:
{
  "action": "subscribe",
  "subscriptions": [
    {
      "topic": "crypto_prices",
      "type": "update",
      "filters": "solusdt,btcusdt,ethusdt"
    }
  ]
}
Symbols use lowercase concatenated format (e.g., solusdt, btcusdt). Solana price update:
{
  "topic": "crypto_prices",
  "type": "update",
  "timestamp": 1753314064237,
  "payload": {
    "symbol": "solusdt",
    "timestamp": 1753314064213,
    "value": 189.55
  }
}
Bitcoin price update:
{
  "topic": "crypto_prices",
  "type": "update",
  "timestamp": 1753314088421,
  "payload": {
    "symbol": "btcusdt",
    "timestamp": 1753314088395,
    "value": 67234.50
  }
}
Trading 15m Crypto Markets? Get a sponsored Chainlink API key with onboarding support from Chainlink. Fill out this form.
Subscribe to all symbols:
{
  "action": "subscribe",
  "subscriptions": [
    {
      "topic": "crypto_prices_chainlink",
      "type": "*",
      "filters": ""
    }
  ]
}
Subscribe to a specific symbol with a JSON filter:
{
  "action": "subscribe",
  "subscriptions": [
    {
      "topic": "crypto_prices_chainlink",
      "type": "*",
      "filters": "{\"symbol\":\"eth/usd\"}"
    }
  ]
}
Symbols use slash-separated format (e.g., eth/usd, btc/usd). Ethereum price update:
{
  "topic": "crypto_prices_chainlink",
  "type": "update",
  "timestamp": 1753314064237,
  "payload": {
    "symbol": "eth/usd",
    "timestamp": 1753314064213,
    "value": 3456.78
  }
}
Bitcoin price update:
{
  "topic": "crypto_prices_chainlink",
  "type": "update",
  "timestamp": 1753314088421,
  "payload": {
    "symbol": "btc/usd",
    "timestamp": 1753314088395,
    "value": 67234.50
  }
}

Price Payload Fields

FieldTypeDescription
symbolstringTrading pair symbol. Binance: lowercase concatenated (e.g., solusdt, btcusdt). Chainlink: slash-separated (e.g., eth/usd, btc/usd)
timestampnumberWhen the price was recorded, in Unix milliseconds
valuenumberCurrent price value in the quote currency

Supported Symbols

Binance Source — lowercase concatenated format:
  • btcusdt — Bitcoin to USDT
  • ethusdt — Ethereum to USDT
  • solusdt — Solana to USDT
  • xrpusdt — XRP to USDT
Chainlink Source — slash-separated format:
  • btc/usd — Bitcoin to USD
  • eth/usd — Ethereum to USD
  • sol/usd — Solana to USD
  • xrp/usd — XRP to USD

Comments

Real-time comment events on the Polymarket platform, including new comments, replies, reactions, and removals. May require Gamma authentication for user-specific data.

Subscribe

{
  "action": "subscribe",
  "subscriptions": [
    {
      "topic": "comments",
      "type": "comment_created"
    }
  ]
}

Message Types

TypeDescription
comment_createdA user creates a new comment or reply
comment_removedA comment is removed or deleted
reaction_createdA user adds a reaction to a comment
reaction_removedA reaction is removed from a comment

comment_created

Emitted when a user posts a new comment or replies to an existing one.
{
  "topic": "comments",
  "type": "comment_created",
  "timestamp": 1753454975808,
  "payload": {
    "body": "That's a good point about the definition.",
    "createdAt": "2025-07-25T14:49:35.801298Z",
    "id": "1763355",
    "parentCommentID": "1763325",
    "parentEntityID": 18396,
    "parentEntityType": "Event",
    "profile": {
      "baseAddress": "0xce533188d53a16ed580fd5121dedf166d3482677",
      "displayUsernamePublic": true,
      "name": "salted.caramel",
      "proxyWallet": "0x4ca749dcfa93c87e5ee23e2d21ff4422c7a4c1ee",
      "pseudonym": "Adored-Disparity"
    },
    "reactionCount": 0,
    "replyAddress": "0x0bda5d16f76cd1d3485bcc7a44bc6fa7db004cdd",
    "reportCount": 0,
    "userAddress": "0xce533188d53a16ed580fd5121dedf166d3482677"
  }
}
A reply to the above comment — note parentCommentID references the parent:
{
  "topic": "comments",
  "type": "comment_created",
  "timestamp": 1753454985123,
  "payload": {
    "body": "I agree, the resolution criteria should be clearer.",
    "createdAt": "2025-07-25T14:49:45.120000Z",
    "id": "1763356",
    "parentCommentID": "1763355",
    "parentEntityID": 18396,
    "parentEntityType": "Event",
    "profile": {
      "baseAddress": "0x1234567890abcdef1234567890abcdef12345678",
      "displayUsernamePublic": true,
      "name": "trader",
      "proxyWallet": "0x9876543210fedcba9876543210fedcba98765432",
      "pseudonym": "Bright-Analysis"
    },
    "reactionCount": 0,
    "replyAddress": "0x0bda5d16f76cd1d3485bcc7a44bc6fa7db004cdd",
    "reportCount": 0,
    "userAddress": "0x1234567890abcdef1234567890abcdef12345678"
  }
}

Comment Payload Fields

FieldTypeDescription
bodystringThe text content of the comment
createdAtstringISO 8601 timestamp when the comment was created
idstringUnique identifier for this comment
parentCommentIDstringID of the parent comment if this is a reply (null for top-level comments)
parentEntityIDnumberID of the parent entity (event, market, etc.)
parentEntityTypestringType of parent entity (Event, Market)
profileobjectProfile information of the comment author
reactionCountnumberCurrent number of reactions on this comment
replyAddressstringPolygon address for replies (may differ from userAddress)
reportCountnumberCurrent number of reports on this comment
userAddressstringPolygon address of the comment author

Profile Object Fields

FieldTypeDescription
baseAddressstringUser profile address
displayUsernamePublicbooleanWhether the username is displayed publicly
namestringUser’s display name
proxyWalletstringProxy wallet address used for transactions
pseudonymstringGenerated pseudonym for the user

Comment Hierarchy

Comments support nested threading:
  • Top-level comments: parentCommentID is null or empty
  • Reply comments: parentCommentID contains the ID of the parent comment
  • All comments are associated with a parentEntityID and parentEntityType (Event or Market)

Troubleshooting

Send PING messages every 5 seconds to keep the connection alive. Connection errors will trigger automatic reconnection attempts.
Verify your subscription message is valid JSON with the correct action, topic, and type fields. Invalid subscription messages may result in connection closure.
If subscribing to user-specific streams, ensure your gamma_auth object includes a valid wallet address. Authentication failures will prevent subscription to protected topics.