PMWallets

io.github.polymarketwallets由 GitHub 账号 polymarketwallets 发布v0.6.6更新于 Oct 25, 2026

Polymarket smart-money data: rank traders by on-chain PnL, follow them, read their fills.

已验证Streamable HTTP可网页运行金融数据与分析

概览

AI 生成的概览

PMWallets 为助手提供 Polymarket 聪明钱数据:按链上盈亏排名的盈利交易者排行榜、其成交记录以及交易历史导出。

可以做什么
查询 Polymarket 聪明钱排行榜,按胜率、交易风格、类别、状态或价格档位筛选交易者,并读取单个交易者记录与已解锁地址。关注钱包,并以有序、恰好一次、可补发缺口的实时流接收其成交,或轮询自上次调用以来的成交。用 HMAC-SHA256 签名校验 webhook 推送。购买并下载按钱包、按 UTC 日划分的交易历史 CSV 导出,并查看套餐、余额与订阅状态。
适用场景
当助手需要研究哪些 Polymarket 交易者盈利、关注特定钱包,或近乎实时地响应其成交时使用,例如起草跟单交易或提醒流程。它不是通用行情或下单服务器,交易功能属于另一个软件包。
运行要求
需要 PMWallets 账户和 API 密钥(PMW_API_KEY,pmw_ 前缀),在提供方的密钥页面创建。可作为远程端点运行,也可通过 npx pmwallets mcp(Node.js 20 及以上)或 Python 包在本地运行,密钥以环境变量传入。需要访问提供方 API 的网络;支持 HTTPS_PROXY。
安装前请注意
API 密钥是机密,可访问账户的订阅与余额。关注钱包按每个实体每小时计费,交易历史导出为付费购买;402 表示余额不足。每个账户只允许一个流,takeover: true 会强制断开当前持有者。watch --exec 模式每批最多交付一次,失败的批次不会重跑。提供方服务器位于英国,Polymarket 不接受来自英国、美国及若干欧盟国家的 API 订单。

安装

在 SourceWeft 中

  1. 打开 控制台中的 PMWallets,将其添加到工作区。
  2. 连接 所需的 凭据。它们会被私密存储,绝不会在公开页面上展示。
  3. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/io.github.polymarketwallets%2Fpmwallets/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。 客户端会在首次连接时完成 OAuth 登录。

{
  "mcpServers": {
    "pmwallets": {
      "type": "http",
      "url": "https://api.pmwallets.com/mcp"
    }
  }
}

README

pmwallets — Node.js SDK for PMWallets

[npm] [License: MIT] [Discord]

Official Node.js / TypeScript client for PMWallets: the Polymarket smart-money leaderboard computed from the Polygon chain, and the real-time fills of the Polymarket wallets you follow — delivered in order, exactly once, with every gap replayed.

中文说明 · Python SDK: pmwallets-python · Ready-to-run copy-trading bot built on it: polymarket-copy-trading-bot

Install

bash
npm install pmwallets     # Node.js ≥ 20

Create an API key on pmwallets.com/keys.

Usage

ts
import { PmwClient, FillStream, FileStateStore, verifyWebhook } from 'pmwallets';
const pmw = new PmwClient({ apiKey: process.env.PMW_API_KEY! });
// who is making money on Polymarket, and howconst board = await pmw.leaderboard({ minWinLo: 0.55, minEligible: 30, style: 'taker', status: 'active', limit: 50 });// only wallets whose address unlocks for free or for the $1 band (0 = free … 5; the ladder is board.pricing.bands)const cheap = await pmw.leaderboard({ bands: [0, 1], minWinLo: 0.55 });
// follow one (billed per entity per hour; 402 = balance too low, 409 = dormant)await pmw.subscribe({ entityId: board.rows[0].entityId, channels: ['ws'] });
// every fill of every entity you followconst stream = new FillStream({  client: pmw,  store: new FileStateStore('./stream.json'),    // a restart resumes exactly where it stopped  onFill: async (fill, { source }) => console.log(source, fill.side, fill.price, fill.tokenId),  onEvent: (e) => e.type === 'fatal' && console.error(e.error.message),   // e.g. another bot already holds the stream  // takeover: true,   // replace whichever API client holds this account's stream (it stops with `replaced`)});await stream.start();

What is in it

PmwClientleaderboard, entities, address unlocks (balance or plan), your unlocked addresses (myAddresses), plan and balance, subscriptions, webhook status and deliveries, fills replay (fills, fillsSince), trade-history exports
FillStreamWebSocket with reconnect and keep-alive; detects missed frames by session/seq and replays them from the last fill delivered; de-duplicates by eventId; anchors behind the chain head on first start; persisted cursor
verifyWebhook(rawBody, signature, secret)checks x-pmw-signature (HMAC-SHA256 of the raw body)

One stream per account:

  • An API-key connection takes priority over the pmwallets.com feed page (the page never takes the stream from it).
  • Between two API connections the first one keeps the stream. A second one — another key of the same account, or the same bot started twice — is refused: blocked, then fatal, and the stream stops. Pass takeover: true to replace the holder instead; the holder gets replaced, then fatal, and stops (it does not fight back).
  • A FillStream identifies itself with a random clientId, so its own reconnects after a network drop replace its own dead connection without needing takeover.
  • When the server restarts it closes the socket with 1012; the stream reconnects at once (event restarting) and replays anything it missed. HTTPS_PROXY: pass wsOptions: { agent } for the WebSocket and set a global fetch dispatcher.

PMWallets' servers are in the United Kingdom. A consumer that also trades on Polymarket should run from Ireland (AWS eu-west-1): Polymarket does not accept API orders from the UK, the US and several EU countries.

AI agents: command line and MCP

The package installs a pmwallets command that prints JSON — for scripts, and for AI agents (Claude Code, Codex, Gemini CLI, Cursor, WorkBuddy, …) that act on the fills of the traders you follow.

bash
export PMW_API_KEY=pmw_…npx pmwallets leaderboard --minWinLo 0.55 --category politics --limit 20npx pmwallets subscribe <handle>          # billed per hournpx pmwallets new-fills                   # fills since the previous call, each once (poll it)npx pmwallets watch                       # live: one JSON line per fill, with its market and decimal amountsnpx pmwallets watch --batch-sec 30 --exec 'claude -p "Fills from traders I follow are on stdin. …"'npx pmwallets mcp                         # the same as MCP toolsnpx pmwallets skill                       # the guide to give your agent (SKILL.md)
  • watch --exec runs the command once per batch, the fills on its stdin as JSON lines (and in $PMW_BATCH_FILE); fills that arrive while it runs make the next batch. A batch is handed over at most once: one whose command fails, times out or is interrupted is kept in pmw-watch/failed/ and never re-run — the agent may already have placed an order. Restarts resume from where the stream stopped.
  • To trade, give the agent pmwallets-copytrade: order buy <tokenId> --usdc 5 --key <eventId> (the same key never orders twice), market, balance, positions.
  • Platforms without a shell (Dify, Coze, n8n, GPT Actions): import openapi.json.
  • HTTPS_PROXY / NO_PROXY are honoured by the command line.

MCP config (Claude Desktop, Cursor, Windsurf, WorkBuddy, …):

json
{  "mcpServers": {    "pmwallets": {      "command": "npx",      "args": ["-y", "pmwallets", "mcp"],      "env": { "PMW_API_KEY": "pmw_..." }    }  }}

Trade-history exports

A purchase is access to files: one zstd-compressed CSV per wallet per UTC day, downloadable at once and again later.

ts
const order = await client.createExport({ entityIds: ['0x…'], from: '2026-09-01', to: '2026-09-30' });const { files } = await client.exportFiles(String(order.id));for (const f of files) {  const bytes = await client.downloadExportFile(f.wallet, f.day); // .csv.zst}

exportFileUrl(wallet, day) returns the short-lived link instead; the API key is never sent to the storage host.

Resources

Guides

License

MIT

来源:README.md,提交 993f9d8

工具

0
该服务器需要登录,因此 SourceWeft 无法在没有账号的情况下读取其工具,也未收录。已连接账号所能看到的内容可能因账号及其权限而异。

版本历史

2
  1. v0.6.6最新Oct 15, 2026
  2. v0.6.5Oct 14, 2026

评分

已满足适用检查项的 85%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分