Power your agent
คำสั่งของผู้เผยแพร่เอง ไม่ใช่เอนด์พอยต์ของ PlugMCP
Host a copy with our keys and logs.
npx -y [email protected]Claude Code ไม่มีลิงก์ติดตั้งสำหรับคำสั่งแบบโลคัล ให้คัดลอกคำสั่งด้านล่างแล้วรันในเทอร์มินัล
claude mcp add pmwallets-copytrade -- npx -y pmwallets-copytrade@0.4.1รันในเทอร์มินัล
{ "mcpServers": { "pmwallets-copytrade": { "command": "npx", "args": [ "-y", "[email protected]" ] } }}claude_desktop_config.json
URL แบบรีโมตหรือคำสั่งบนเครื่องของคุณ? การติดตั้งสองแบบต่างกันอย่างไร
รันบน PlugMCP
A new server you create. It is not this listing's official endpoint. Use the publisher install when you want their URL and their credentials.
เปิดจากผู้เผยแพร่
Ready-to-run Polymarket copy-trading bot: follows the wallets you subscribe to on PMWallets and mirrors their trades on the Polymarket CLOB, with dry-run, risk caps and exactly-once fill handling — plus order / positions / balance commands and an MCP serv
A ready-to-run Polymarket copy-trading bot built on PMWallets: it follows the traders you subscribe to and mirrors their fills on the Polymarket CLOB with your own account, inside the limits you set.
pmwallets-copytrade on npm · 中文说明 · Python version: polymarket-copy-trading-bot-python ·
SDK: pmwallets-node
session/seq) and
replayed from the last fill handled, including everything that happened while the bot was down.# Node.js ≥ 20
npm install -g pmwallets-copytrade
pmwallets-copytrade init # writes config.yaml
export PMW_API_KEY=pmw_... # https://pmwallets.com/keys
pmwallets-copytrade run # dry-run: logs every decision, trades nothing
When the dry-run log looks right, switch to live:
mode: live
polymarket:
privateKey: ${POLY_PRIVATE_KEY} # signs your orders
signatureType: 3 # see "Set up a Polymarket account for the bot"
funderAddress: ${POLY_FUNDER_ADDRESS} # your Polymarket profile address (holds the USDC)
pmwallets-copytrade status prints open positions, today's spend and any order still being confirmed. If the bot
cannot establish by itself whether an order filled, it keeps the order's reservation (no further BUY can exceed
your limits because of it) and asks you: check polymarket.com and run
pmwallets-copytrade reconcile <key> --none or --filled <shares> --usdc <usdc> with the bot stopped. Every decision — including each skip and its
reason — is appended to pmw-data/decisions.<mode>.jsonl, and everything the bot prints also goes to pmw-data/bot.<mode>.log.
Something went wrong? Run pmwallets-copytrade diagnose and email the pmw-diagnose-<time>.json.gz it writes to
[email protected], with a line about what happened. The file has the bot's version, the check result, your
config with the keys removed, the state files and the newest logs and decisions. It contains no private key or API
key (they are removed by name, then by value from the whole file), but it does show your wallet addresses, the traders
you copy, your trades and your machine's IP. Never send config.yaml or .env themselves.
The rules come from a copy-trading bot that ran live on Polymarket; each one is there because of a lost trade or a rejected order.
BUY (the trader bought)
maxFillAgeSec (a replay after downtime must not buy history), below
minTargetNotionalUsdc, or from a role you excluded;maxBuysPerOutcome buys into it
(DCA), maxOpenPositionsPerTarget / maxOpenPositions / maxDailySpendUsdc caps;minSecondsToEndDate;[minPrice, maxPrice], be at most maxSlippage above what the trader paid, and the
book must hold minBookDepthUsdc;orderSizeUsdc / ask), rounded so the
CLOB accepts it. Share-denominated on purpose — a USDC-budget market order can overfill.SELL (the trader sold)
sellMode: all exits everything the bot bought following that trader in that outcome. Shares booked to
another trader in the same outcome are never sold: the most it sells is your token balance minus what the other
traders hold. If that comes to nothing, it stops and asks you to reconcile;Polymarket V2 markets (canary markets now; every new market from 2026-11-02)
version, and it must agree
with the shape of the outcome id (a V2 position id is not a hash). If they disagree — or the CLOB does not say for
an id shaped like a V2 position — the BUY is skipped (skipped_market_version) and an exit is kept and retried:
the bot never guesses which exchange to sign for;skipped_combo);Safety
mode: live;reconcile;Where to run it. PMWallets' servers are in the United Kingdom, but Polymarket does not accept new API orders
from the UK, the US, Germany, France and several other countries
(Polymarket: geographic restrictions). Ireland (AWS
eu-west-1) is the nearest region where it does — close to our servers and to Polymarket's in London. check
reports whether your machine's region is allowed. Measured latency: https://pmwallets.com/latency.
One stream per account, and the bot comes first. PMWallets keeps one WebSocket per account. A connection made
with an API key (the bot) takes priority: the live-feed page on pmwallets.com never takes the stream from it — while
the bot is connected the page says so and stays off. Between two API connections the first one keeps the stream:
a second bot on the same account (another key, or the same bot started twice) is refused and stops with a clear error.
To move the stream to a new bot on purpose, set pmwallets.takeover: true on the new one — the old one is told it was
replaced and stops. A bot's own reconnects after a network drop never need this. When PMWallets restarts its stream
service the bot reconnects at once and replays anything it missed.
Besides run, the bot has one-off commands that print JSON, so an AI agent (or a script) can decide and trade by
itself — for example on the fills pmwallets watch --exec hands it. They use the same config; its mode decides:
dry-run simulates each order against the live order book and sends nothing, live trades.
pmwallets-copytrade market <tokenId> # question, outcomes, prices, order book
pmwallets-copytrade balance # USDC to trade, approvals
pmwallets-copytrade positions # open positions, value, PnL
pmwallets-copytrade trades --limit 20
pmwallets-copytrade order buy <tokenId> --usdc 5 --max-price 0.45 --key <eventId>
pmwallets-copytrade order sell <tokenId> --all --min-price 0.40 --key <eventId>:exit
pmwallets-copytrade mcp --config /abs/path/config.yaml # the same as MCP tools
--usdc is a ceiling (sized at the limit, so the order cannot cost more). SELL is
fill-and-kill, capped at what the account holds.--key makes retries safe: the key is written to dataDir before the order is sent, and the same key never sends
a second order. Use the fill's eventId.status: unknown (or verify: true) means the order may have filled — check trades before sending another.
Exit code 0 = filled or dry_run, 2 = not traded, 3 = unknown.pmwallets-copytrade init writes a commented config.yaml. ${NAME} in the file is replaced by the environment
variable NAME; a missing variable stops the bot at start-up. Invalid values are rejected at start-up, never
silently ignored.
Give the bot an account of its own, holding only what you are willing to let it trade. This is the setup we recommend and document; follow it step by step:
This setup has been tested with real money — a MetaMask (or other browser-wallet) account connected on polymarket.com, signing with that wallet's own private key. Accounts made with email or Google, the older Safe / Proxy accounts and plain wallets are supported by the code, but we have not run them live. If you can, make a new account as below rather than reusing one of those.
signatureType: 3.funderAddress — the account wallet address in the polymarket.com profile menu (not the MetaMask address);privateKey — the key of the MetaMask account from step 1 (MetaMask → Account details → Show private key).
Put it in an environment variable, never in config.yaml.signatureType: 3, privateKey: ${POLY_PRIVATE_KEY}, funderAddress: ${POLY_FUNDER_ADDRESS} and run
pmwallets-copytrade check. It places no order; it must show your balance and account may open positions.mode: dry-run until the decision log looks right, then switch to mode: live with a small
copy.orderSizeUsdc.Why a separate account: the private key the bot holds can move everything in that account, and copy trading should never be able to touch money you did not mean to put at risk. The key never leaves your machine.
polymarket.signatureType)The first row, for an account signed up by connecting MetaMask or another browser wallet, has been tested
live. The other rows follow Polymarket's documentation but are untested with this bot: run check, then
dry-run, then live with a very small copy.orderSizeUsdc, and tell [email protected] if anything fails.
The type decides which key signs your orders and which address holds the money (Polymarket: wallet types). It has no default — the bot refuses to trade until you set it, because signing as the wrong type gets every order rejected.
A plain wallet (type 0) must also approve Polymarket's exchange contracts on-chain before its first trade — the bot does not do this for you (see Polymarket's approval example). Accounts made on polymarket.com (types 1–3) are set up by Polymarket.
Polymarket V2 markets need two more approvals: the approvals above do not cover ExchangeV3
(0xe3333700cA9d93003F00f0F71f8515005F6c00Aa). To buy, pUSD (0xC011a7E12a19f7B1f670d46F03B03f3342E82DFB) must
approve ExchangeV3; to sell, PositionManager (0x006F54F7f9A22e0000CC2AB60031000000ae9fEF) must
setApprovalForAll(ExchangeV3, true) (Polymarket: V2 migration).
A plain wallet sends both itself (the example above does not include them yet); on an account made on
polymarket.com, accept the approval prompt polymarket.com shows. check reports the pUSD approval for ExchangeV3 on a
line of its own. It cannot see the PositionManager one: without it, SELLs in V2 markets are rejected and retried.
Whatever the type, run pmwallets-copytrade check before mode: live. A balance of $0 while polymarket.com shows
money means the type or the address is wrong. Polymarket also restricts trading from some regions; check reports
when the account may only close positions.
npm install
npm test
npm run build
The same config.yaml, state files and lock file work with the Python version. testdata/ holds the
contract cases both implementations must pass — keep it identical in both repositories.
Using PolymarketGateway as a library: buyFok, sellFak and tokenBalance take an optional last argument v2.
true trades a Polymarket V2 position through ExchangeV3; omitted or false keeps the CTF path, so code written before
V2 works unchanged for CTF tokens. A V2 position id without true, or a combo id with any value, is refused before
anything is signed or sent (tokenBalance throws). The Exchange interface carries the same optional argument.
Token ids must be canonical decimal strings — no hex, sign, whitespace or leading zeros: every gateway method refuses
any other form before a lookup or the SDK sees it, and the bot skips such a fill (skipped_invalid_token_id).
Guides
HTTPS_PROXY / HTTP_PROXY / NO_PROXY are honoured for the PMWallets API, the WebSocket and the Polymarket CLOB.
This software places real orders with real money when mode: live. A copied order is not the trader's order: the
price may have moved, fees apply and liquidity is shared. Past results do not predict future ones. PMWallets
provides data about what traders did, not advice. Use at your own risk; see LICENSE (MIT).
Ready-to-run Polymarket copy-trading bot: follows the wallets you subscribe to on PMWallets and mirrors their trades on the Polymarket CLOB, with dry-run, risk caps and exactly-once fill handling — pl
{ "mcpServers": { "pmwallets-copytrade": { "command": "npx", "args": [ "-y", "[email protected]" ] } }}ภาพรวม
Ready-to-run Polymarket copy-trading bot: follows the wallets you subscribe to on PMWallets and mirrors their trades on the Polymarket CLOB, with dry-run, risk caps and exactly-once fill handling — plus order / positions / balance commands and an MCP serv
เครื่องมือ
ยังไม่มีรายการเครื่องมือ เซิร์ฟเวอร์แบบรีโมตจะได้รายการหลังการตรวจสอบสถานะครั้งแรก
FAQ
คัดลอกคอนฟิก stdio สำหรับ Cursor, Claude Desktop, Claude Code หรือ VS Code ได้ในหน้านี้ คอนฟิกนี้ใช้การติดตั้งของผู้เผยแพร่ ไม่ใช่พร็อกซีของ PlugMCP
ระเบียนนี้ไม่ได้ระบุตัวแปรสภาพแวดล้อมที่จำเป็น
Pmwallets Copytrade ทำงานแบบโลคัลผ่าน stdio
ตรวจสอบล่าสุดเมื่อ 2026-10-28 Ready-to-run Polymarket copy-trading bot: follows the wallets you subscribe to on PMWallets and mirrors their trades on the Polymarket CLOB, with dry-run, risk caps and exactly-once fill handling — plus order / positions / balance commands and an MCP serv