explaingit

shadowspread/polymarket-auto-trading

Analysis updated 2026-05-18

252TypeScriptAudience · developerComplexity · 3/5LicenseSetup · moderate

TLDR

A TypeScript bot that copies another Polymarket trader's positions automatically, with monitor-only and dry-run modes before risking real funds.

Mindmap

mindmap
  root((polymarket-auto-trading))
    What it does
      Monitors target wallet
      Mirrors trades
      Dry run mode
    Tech stack
      TypeScript
      Node.js
      Polymarket CLOB
    Use cases
      Watch only mode
      Copy trading
      Guardrails
    Limitations
      In memory state
      Polling delay

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Watch a target Polymarket wallet's open positions from the terminal without placing any trades.

USE CASE 2

Automatically mirror a target trader's buy and sell orders with your own funds.

USE CASE 3

Test copy-trading logic in dry-run mode before enabling real order submission.

USE CASE 4

Set minimum and maximum trade size guardrails to limit exposure per trade.

What is it built with?

TypeScriptNode.js

How does it compare?

shadowspread/polymarket-auto-tradingvtraha/bybit-trading-botrasoir0591/crosshair-x
Stars252252251
LanguageTypeScriptTypeScriptTypeScript
Setup difficultymoderatehardeasy
Complexity3/53/51/5
Audiencedeveloperdevelopergeneral

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Copy trading requires a funded Polygon wallet private key, monitoring-only mode needs no funds.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

In plain English

This is a copy trading bot for Polymarket, a prediction market platform. The idea behind copy trading is straightforward: the bot watches another user's account and automatically places the same trades. When the target account opens a position, the bot opens a matching one in the user's own wallet. When the target closes or exits a position, the bot does the same. The bot is written in TypeScript and runs as a background process. It polls the target account every two seconds by default, compares the current open positions to the previous snapshot, and then submits buy or sell orders to Polymarket's order book when something changes. Users configure it through environment variables in a .env file, specifying the target wallet address, their own private key (if copy trading is enabled), and limits on how large each trade can be in US dollars. There is also a monitoring-only mode that does not place any orders. In this mode, the bot simply prints a formatted list of the target account's open positions every few seconds, showing the market question, share quantity, and current price. A dry-run mode sits between these two: it simulates what orders would be placed without actually submitting them to the blockchain, which is useful for validating behavior before committing real funds. The README is transparent about the tool's current limitations. State is kept only in memory, so restarting the bot may cause it to treat already-open positions as new and resubmit buy orders. A slippage tolerance setting exists in the configuration but is not yet applied to the actual orders posted. Monitoring is done by polling rather than via a live connection, so there is a delay between when the target makes a trade and when the bot detects it. The project requires Node.js 18 or newer and a Polygon wallet with funds to trade. It is released under an MIT license.

Copy-paste prompts

Prompt 1
Explain how this bot detects when the target account opens or closes a position.
Prompt 2
Walk me through setting up dry-run mode to test copy trading safely.
Prompt 3
What are the current limitations of this bot's in-memory position tracking?
Prompt 4
Show me how to configure MAX_TRADE_SIZE and MIN_TRADE_SIZE guardrails.

Frequently asked questions

What is polymarket-auto-trading?

A TypeScript bot that copies another Polymarket trader's positions automatically, with monitor-only and dry-run modes before risking real funds.

What language is polymarket-auto-trading written in?

Mainly TypeScript. The stack also includes TypeScript, Node.js.

What license does polymarket-auto-trading use?

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is polymarket-auto-trading to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is polymarket-auto-trading for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.