Polymarket bots: trading, copy trading and arbitrage
Copy a wallet without writing code, or build your own bot on recorded markets, live trades and wallet positions. Your bot places its orders through Polymarket’s own SDK; this API gives it what to act on.
“Which Polymarket wallets are worth copying: best 30-day P&L with 20+ resolved markets?”
polymarket_leaderboard“What did wallet 0x… trade today, and is it in profit?”
polymarket_walletCopy a wallet with an alert
Pick a trader, get an e-mail when they trade. Nothing to install.
Follow a wallet
Paste a wallet from the leaderboard or any wallet page. Every time it buys or sells, you get the market, the side, the size and the price.
No wallet in mind? Pick one on the leaderboard.
Watch a market for whales
Pick a market and a size, from $1,000 up. You hear about every trade above it, with the wallet behind it.
Or press Create alert on any market page: the market is filled in for you.
Let Claude Code build the bot
Install the vike skill once, describe the bot in one sentence, and Claude Code writes and runs it on your key.
Describe the bot, Claude Code writes it
One install teaches Claude Code the Vike data, the stream and the CLI; then a sentence is enough.
- Needs
- Claude Code, Node.js 22.12+
- Skill
vike-data install --claude- Data
pm.positions,pm.trades, REST
How it works
- Install the CLI and save your key once.
- Install the vike skill where Claude Code reads it.
- Ask for the bot in plain words; Claude Code writes it, runs it and shows you the output.
The setup and the ask
npm install -g @vike-io/cli
vike-data init # paste your key once
vike-data install --claude # the vike skill for Claude Code
Build a Python copy-trading bot for Polymarket wallet 0x… on the Vike stream
(pm.positions). Print every position change with the market and price.
Do not place any orders yet.
4 bots, ready to run
Each one is a short script on a free key: change the wallet or market and run it.
Copy-trading bot
Follow wallets and mirror what each trade did to their position.
- Data
pm.positions- Filter
wallet(up to 1,000)- Delay
- about 5 minutes after the trade
- Orders
- Polymarket’s own SDK
How it works
- Subscribe to
pm.positionsfor the wallets you copy. - Each event says open, increase, reduce, close or flip, with shares before and after.
- Mirror it at your own size through Polymarket’s SDK.
The code
import json, os
from websockets.sync.client import connect
with connect("wss://stream.vike.io/v1/stream/polymarket",
additional_headers={"X-API-KEY": os.environ["VIKE_API_KEY"]}) as ws:
ws.send(json.dumps({"action": "subscribe", "id": "s1", "channel": "pm.positions",
"filter": {"wallet": ["0x…"]}}))
for message in ws:
frame = json.loads(message)
if frame["type"] == "ping":
ws.send(json.dumps({"action": "pong"}))
elif frame["type"] == "event":
e = frame["event"]
d = e["data"]
print(e["subject"]["title"], e["subject"]["outcome"], d["action"], d["side"], d["size"], "@", d["price"])
vike-data stream polymarket --channel pm.positions --filter wallet=0x…
Telegram bot for big trades
Forward every big trade in the markets you follow to your own Telegram chat.
- Data
pm.trades- Filter
market,min_usd- Delay
- about 5 minutes after the trade
- Sends
- your bot, your chat
How it works
- Subscribe to
pm.tradesfor your markets, from a dollar size up. - Post each trade to Telegram with your bot’s token.
The code
import json, os, requests
from websockets.sync.client import connect
with connect("wss://stream.vike.io/v1/stream/polymarket",
additional_headers={"X-API-KEY": os.environ["VIKE_API_KEY"]}) as ws:
ws.send(json.dumps({"action": "subscribe", "id": "s1", "channel": "pm.trades",
"filter": {"market": ["0x…"], "min_usd": 1000}}))
for message in ws:
frame = json.loads(message)
if frame["type"] == "ping":
ws.send(json.dumps({"action": "pong"}))
elif frame["type"] == "event":
e = frame["event"]
d = e["data"]
text = f"{e['subject']['title']} · {e['subject']['outcome']}: {d['side']} ${d['usd']:,.0f} @ {d['price']}"
requests.post(f"https://api.telegram.org/bot{os.environ['TG_TOKEN']}/sendMessage",
json={"chat_id": os.environ["TG_CHAT"], "text": text})
vike-data stream polymarket --channel pm.trades --filter market=0x… --filter min_usd=1000
Trading bot in Python
Find the 5-minute BTC market trading now, read its book, decide, and trade through Polymarket’s SDK.
- Data
/markets,/orderbook- Ids
- slug ends in the window start
- Backtest
/settlements/bulk- Orders
- Polymarket’s own SDK
How it works
- Find the market trading now: its slug ends in its start time.
- Read its order book and recent trades.
- Test the rule on how past markets settled, then send orders through Polymarket’s SDK.
The code
import os, time, requests
KEY = {"X-API-KEY": os.environ["VIKE_API_KEY"]}
start = int(time.time()) // 300 * 300 # this 5-minute window
m = requests.get("https://data.vike.io/v1/polymarket/markets",
params={"query": f"btc-updown-5m-{start}", "limit": 1}, headers=KEY).json()[0]
up, down = m["token_ids"]
book = requests.get("https://data.vike.io/v1/polymarket/orderbook",
params={"token_id": up, "depth": 5}, headers=KEY).json()
print(m["slug"], book[:4])
vike-data pm markets --view search --query btc-updown-5m-$(( $(date +%s) / 300 * 300 )) --limit 1
vike-data pm orderbook <up_token_id> --depth 5
Arbitrage bot: Up + Down under $1
Check whether both outcomes of one market can be bought for less than $1 together.
- Data
/orderbook× 2- Rule
- same
as_of_tson both books - Cost
- 2 requests a check
- Orders
- Polymarket’s own SDK
How it works
- Read both outcomes’ books of one market.
- Add the two best asks only when both snapshots carry the same
as_of_ts. - Walk both ladders against the taker fee before you call it an edge.
The code
import os, requests
KEY = {"X-API-KEY": os.environ["VIKE_API_KEY"]}
UP, DOWN = "…", "…" # the two token ids of one market, from /markets
def best_ask(token):
rows = requests.get("https://data.vike.io/v1/polymarket/orderbook",
params={"token_id": token, "depth": 1}, headers=KEY).json()
asks = [r for r in rows if r["side"] == "ask"]
return (asks[0]["price"], asks[0]["as_of_ts"]) if asks else (None, None)
(up_ask, t1), (down_ask, t2) = best_ask(UP), best_ask(DOWN)
if t1 == t2 and up_ask is not None and down_ask is not None and up_ask + down_ask < 1:
print("Up + Down =", up_ask + down_ask)
vike-data pm orderbook <up_token_id> --depth 1
vike-data pm orderbook <down_token_id> --depth 1
Polymarket bot FAQ
Can I build a Polymarket trading bot in Python?
How do I copy trade on Polymarket?
pm.positions for that wallet and mirror each open, increase, reduce or close.Is there a Polymarket arbitrage bot?
Can I get Polymarket trades in Telegram?
pm.trades and forward each trade to your chat.