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 分