polymarket-ws-streaming

Polymarket WebSockets Architecture

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "polymarket-ws-streaming" with this command: npx skills add lubluniky/polyclaude/lubluniky-polyclaude-polymarket-ws-streaming

Polymarket WebSockets Architecture

You are an AI agent setting up real-time data streaming for Polymarket. The system has two distinct WebSocket servers. Choose the right one for the task.

Step 1: Choose the WSS Endpoint

  • Option A (CLOB WS): wss://ws-subscriptions-clob.polymarket.com/ws/market — Use for subscribing to specific orderbooks (book ), granular price changes, and the private user channel (user fills). Max 500 assets.

  • Option B (RTDS WS): wss://ws-live-data.polymarket.com — Use for broad feeds (crypto_prices , activity , aggregated clob_market ).

Step 2: Connection Management (Critical Architecture)

CLOB WS LIMITATION: CLOB WS does not support unsubscribe.

Heuristic: If the trading bot needs to switch the tracked market on CLOB WS, you MUST tear down the current TCP connection and open a new one with the new assets_ids list. Do not attempt to send an unsubscribe command.

Step 3: Heartbeat (Ping/Pong)

  • CLOB WS: Send the string message "PING" exactly every 10 seconds.

  • RTDS WS: Send a standard WebSocket PING frame every 5 seconds.

Step 4: Parsing price_change

When listening to CLOB WS, expect incremental updates.

Note: Format changed since September 2025. Messages now contain a price_changes[] array where each asset has current best_bid and best_ask . Update the local orderbook cache based on these deltas.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

polymarket-clob-auth-trade

No summary provided by upstream source.

Repository SourceNeeds Review
General

polymarket-market-discovery

No summary provided by upstream source.

Repository SourceNeeds Review
General

image-gen

Generate AI images from text prompts. Triggers on: "生成图片", "画一张", "AI图", "generate image", "配图", "create picture", "draw", "visualize", "generate an image".

Archived SourceRecently Updated
General

explainer

Create explainer videos with narration and AI-generated visuals. Triggers on: "解说视频", "explainer video", "explain this as a video", "tutorial video", "introduce X (video)", "解释一下XX(视频形式)".

Archived SourceRecently Updated