PMWallets
中文

How to set up a Polymarket copy-trading bot

A step-by-step setup for the open-source PMWallets copy-trading bot: a separate Polymarket account, the right region, the traders to follow, a dry run, and the limits that keep it safe.

What you need

Node.js 20 or newer (or Python 3.10 or newer), a PMWallets API key, a Polymarket account for the bot with a small balance, and a machine in a region Polymarket accepts orders from. The bot is free and open source (MIT); your private key never leaves that machine.

1. Run it where Polymarket accepts orders

Polymarket does not accept new API orders from some countries, including the United Kingdom, the United States, Germany and France. Run the bot in a region it does accept — and where you are allowed to trade. PMWallets' servers are in the United Kingdom; Ireland (AWS eu-west-1) is the nearest accepted region. The bot's check command reports whether a machine's region is allowed.

2. Give the bot an account of its own

Create a new account in MetaMask (or another browser wallet) used for nothing else, sign up on polymarket.com by connecting it, and deposit only what you are willing to let the bot trade. Accounts created this way are Deposit Wallet accounts (signatureType 3) — the setup tested with real money. Copy the account address from the polymarket.com profile menu (funderAddress) and keep the wallet's private key in an environment variable, never in the config file.

3. Pick traders worth following

On the leaderboard, filter on the lower bound of the win-rate confidence interval with a floor on decided markets, keep traders with profit left after their single best market, prefer active takers (a taker's fill can be followed; a maker's is a different trade when you take liquidity after it), then subscribe to them with your API key.

4. Install and dry-run

The bot starts in dry-run: it receives every fill, decides, and logs each decision with its reason, but places no order. Run it until the decisions look right.

shell
npm install -g pmwallets-copytrade     # or: pip install pmwallets-copytrade
pmwallets-copytrade init               # writes config.yaml
export PMW_API_KEY=pmw_...
pmwallets-copytrade check              # places no order
pmwallets-copytrade run                # dry-run: logs every decision, trades nothing

5. Set the limits

The rules that matter: skip fills older than a set age — a minute by default — so a replay after downtime does not buy history, a price band and maximum slippage against what the trader paid, a minimum order-book depth, no markets about to settle, caps on open positions and daily spend. Buys are fill-or-kill orders for an exact number of shares; exits are fill-and-kill orders when the trader sells, retried until the position is gone.

6. Go live small

Set mode: live with a small order size. status shows open positions and today's spend; if the bot cannot establish whether an order filled, it keeps the reservation and asks you to reconcile rather than guessing. diagnose writes a file for support with the keys removed.

What it costs

The bot is free. Following a trader's fills is $0.01 per trader per hour, or included in a plan: Base $10 a month covers 3 traders, Pro 10, Max 30. Polymarket's own trading fees apply to your orders.

Questions

Is the Polymarket copy-trading bot free?

Yes, it is open source under the MIT licence. The data it follows — the real-time fills of the traders you subscribe to — costs $0.01 per trader per hour, or comes with a PMWallets plan.

Does PMWallets get my private key?

No. The bot runs on your machine and signs orders locally. PMWallets only delivers fills; it never sees your key and never places orders.

Does copying a trader reproduce their results?

No. By the time you see a fill the price may have moved, and your order competes for the same order book, so the trade you get is not the trade they got. The bot's limits exist to skip the copies that would be worse.

Related