polymarket by 2025emma/vibe-coding-cn
npx skills add https://github.com/2025emma/vibe-coding-cn --skill polymarket为 Polymarket 开发提供全面协助——涵盖完整平台(API、交易、市场数据)和实时数据流客户端(用于实时市场活动的 WebSocket 订阅)。
在以下情况应触发此技能:
平台与 API:
实时数据流:
安装:
npm install @polymarket/real-time-data-client
基本用法:
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();
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
1. 活动 (activity)
trades - 已完成的交易orders_matched - 订单匹配事件{"event_slug":"string"} 或 {"market_slug":"string"}2. 评论 (comments)
comment_created, comment_removedreaction_created, reaction_removed{"parentEntityID":number,"parentEntityType":"Event"}3. RFQ (rfq)
4. 加密货币价格 (crypto_prices, crypto_prices_chainlink)
update - 实时价格源{"symbol":"BTC"}(可选)5. CLOB 用户 (clob_user) ⚠️ 需要认证
order - 用户的订单更新trade - 用户的交易执行6. CLOB 市场 (clob_market)
price_change - 价格变动agg_orderbook - 聚合订单簿last_trade_price - 最新价格market_created, market_resolvedclient.subscribe({
subscriptions: [{
topic: "clob_user",
type: "*",
clob_auth: {
key: "your-api-key",
secret: "your-api-secret",
passphrase: "your-passphrase"
}
}]
});
监控特定市场:
client.subscribe({
subscriptions: [{
topic: "activity",
type: "trades",
filters: `{"market_slug":"btc-above-100k-2024"}`
}]
});
跟踪多个市场:
client.subscribe({
subscriptions: [{
topic: "clob_market",
type: "price_change",
filters: `["100","101","102"]`
}]
});
监控事件评论:
client.subscribe({
subscriptions: [{
topic: "comments",
type: "*",
filters: `{"parentEntityID":12345,"parentEntityType":"Event"}`
}]
});
此技能包含 references/ 目录下的全面文档:
平台文档:
实时客户端:
使用 view 命令阅读特定参考文件以获取详细信息。
平台能力: ✅ 预测市场创建和结算 ✅ 交易 API(REST 和 WebSocket) ✅ 市场数据查询 ✅ 用户投资组合管理 ✅ 事件和市场发现
实时流: ✅ 基于 WebSocket 的持久连接 ✅ 基于主题的订阅 ✅ 动态订阅管理 ✅ 支持过滤器以获取目标数据 ✅ 用户认证以获取私有数据 ✅ 具有完整类型安全的 TypeScript ✅ 连接时的初始数据转储
onConnect 回调进行订阅disconnect() 进行清理"*")对于初学者: 从 getting_started.md 开始了解基础概念。
对于 API 集成: 使用 api.md 和 trading.md 获取 REST API 详细信息。
对于实时数据: 使用 README.md 进行 WebSocket 客户端实现。
对于 LLM 集成: 使用 llms.md 和 llms-full.md 处理 AI/ML 用例。
此综合技能结合了 Polymarket 平台专业知识与实时数据流能力!
每周安装数
295
仓库
GitHub 星标数
13.7K
首次出现
2026年1月21日
安全审计
安装于
opencode218
codex214
gemini-cli211
github-copilot187
claude-code177
cursor170
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).
This skill should be triggered when:
Platform & API:
Real-Time Data Streaming:
Installation:
npm install @polymarket/real-time-data-client
Basic Usage:
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();
1. Activity (activity)
trades - Completed tradesorders_matched - Order matching events{"event_slug":"string"} OR {"market_slug":"string"}2. Comments (comments)
comment_created, comment_removedreaction_created, reaction_removed{"parentEntityID":number,"parentEntityType":"Event"}3. RFQ (rfq)
4. Crypto Prices (crypto_prices, crypto_prices_chainlink)
update - Real-time price feeds{"symbol":"BTC"} (optional)5. CLOB User (clob_user) ⚠️ Requires Auth
order - User's order updatestrade - User's trade executions6. CLOB Market (clob_market)
price_change - Price movementsagg_orderbook - Aggregated order booklast_trade_price - Latest pricesmarket_created, market_resolvedclient.subscribe({
subscriptions: [{
topic: "clob_user",
type: "*",
clob_auth: {
key: "your-api-key",
secret: "your-api-secret",
passphrase: "your-passphrase"
}
}]
});
Monitor Specific Market:
client.subscribe({
subscriptions: [{
topic: "activity",
type: "trades",
filters: `{"market_slug":"btc-above-100k-2024"}`
}]
});
Track Multiple Markets:
client.subscribe({
subscriptions: [{
topic: "clob_market",
type: "price_change",
filters: `["100","101","102"]`
}]
});
Monitor Event Comments:
client.subscribe({
subscriptions: [{
topic: "comments",
type: "*",
filters: `{"parentEntityID":12345,"parentEntityType":"Event"}`
}]
});
This skill includes comprehensive documentation in references/:
Platform Documentation:
Real-Time Client:
Use view to read specific reference files for detailed information.
Platform Capabilities: ✅ Prediction market creation and resolution ✅ Trading API (REST & WebSocket) ✅ Market data queries ✅ User portfolio management ✅ Event and market discovery
Real-Time Streaming: ✅ WebSocket-based persistent connections ✅ Topic-based subscriptions ✅ Dynamic subscription management ✅ Filter support for targeted data ✅ User authentication for private data ✅ TypeScript with full type safety ✅ Initial data dumps on connection
onConnect callback for subscriptionsdisconnect() when done"*") sparinglyFor Beginners: Start with getting_started.md for foundational concepts.
For API Integration: Use api.md and trading.md for REST API details.
For Real-Time Data: Use README.md for WebSocket client implementation.
For LLM Integration: Use llms.md and llms-full.md for AI/ML use cases.
This comprehensive skill combines Polymarket platform expertise with real-time data streaming capabilities!
Weekly Installs
295
Repository
GitHub Stars
13.7K
First Seen
Jan 21, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykFail
Installed on
opencode218
codex214
gemini-cli211
github-copilot187
claude-code177
cursor170
飞书OpenAPI Explorer:探索和调用未封装的飞书原生API接口
7,500 周安装