# Polymarket

Comprehensive Polymarket skill covering prediction markets, API, trading, market data...

- Repository: https://github.com/2025Emma/vibe-coding-cn (23122 stars)
- Category: Engineering
- License: MIT
- Last updated: 2025-12-17
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add 2025Emma/vibe-coding-cn --skill polymarket -g -a claude-code -y`
Codex: `npx skills add 2025Emma/vibe-coding-cn --skill polymarket -g -a codex -y`
Cursor: `npx skills add 2025Emma/vibe-coding-cn --skill polymarket -g -a cursor -y`
Gemini CLI: `npx skills add 2025Emma/vibe-coding-cn --skill polymarket -g -a gemini-cli -y`

## Description

Comprehensive Polymarket skill covering prediction markets, API, trading, market data, and real-time WebSocket data streaming. Build applications with Polymarket services, monitor live trades, and integrate market predictions.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Polymarket Comprehensive Skill

Complete assistance with Polymarket development - covering the full platform (API, trading, market data) and the real-time data streaming client (WebSocket subscriptions for live market activity).

## When to Use This Skill

This skill should be triggered when:

**Platform & API:**
- Working with Polymarket prediction markets
- Using Polymarket API for market data
- Implementing trading strategies
- Building applications with Polymarket services
- Learning Polymarket best practices

**Real-Time Data Streaming:**
- Connecting to Polymarket's WebSocket service
- Building prediction market monitoring tools
- Processing live trades, orders, and market updates
- Monitoring market comments and social reactions
- Tracking RFQ (Request for Quote) activity
- Integrating crypto price feeds

## Quick Reference

### Real-Time Data Client Setup

**Installation:**
```bash
npm install @polymarket/real-time-data-client
```

**Basic Usage:**
```typescript
import { RealTimeDataClient } from "@polymarket/real-time-data-client";

const onMessage = (message: Message): void => {
    console.log(message.topic, message.type, message.payload);
};

const onConnect = (client: RealTimeDataClient): void => {
    client.subscribe({
        subscriptions: [{
            topic: "activity",
            type: "trades"
        }]
    });
};

new RealTimeDataClient({ onMessage, onConnect }).connect();
```

### Supported WebSocket Topics

**1. Activity (`activity`)**
- `trades` - Completed trades
- `orders_matched` - Order matching events
- Filters: `{"event_slug":"string"}` OR `{"market_slug":"string"}`

**2. Comments (`comments`)**
- `comment_created`, `comment_removed`
- `reaction_created`, `reaction_removed`
- Filters: `{"parentEntityID":number,"parentEntityType":"Event"}`

**3. RFQ (`rfq`)**
- Request/Quote lifecycle events
- No filters, no auth required

The rest: https://github.com/2025Emma/vibe-coding-cn/blob/HEAD/i18n/zh/skills/polymarket/SKILL.md
