Skip to content

block-pulse-tech/lab-stack-2715

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Polymarket Copy Trading Bot

Follow a trader you trust. Let the bot mirror their public Polymarket activity into your account-sized the way you want, with clear limits and no custody of your funds.

This project is a TypeScript automation that watches a chosen profile’s trade feed, skips anything it has already seen, and posts limit orders on the same markets at the same prices (with your multiplier and caps applied). The goal is practical: transparent copy trading, readable code, and room to tune risk. Profits are never guaranteed-markets are risky-but the tool is built for people who prefer automation with guardrails and who like the idea of learning and earning alongside others, not in isolation.

Powered by Trusted Projects

Ideas and patterns here sit on top of work the ecosystem has already proven. If you want deeper context, start with these references:

Source Link
Polymarket Analytics (PolyGun - Copy Trade) polymarketanalytics.com/copy-trade#features
QuickNode (Polymarket Copy Trading Bot Guide) quicknode.com/guides/defi/polymarket-copy-trading-bot

My profile

On Polymarket: @SMCAOMCRL

Polymarket profile @SMCAOMCRL


What you get

You choose one target-either their Polymarket username or their proxy wallet (0x…). On each poll, the bot:

  1. Pulls that account’s latest TRADE activity from Polymarket’s public data.
  2. Ignores duplicates so the same fill is not copied twice.
  3. Applies your size rules (multiplier and optional per-order dollar cap).
  4. Reads the market’s tick size from the order book so prices stay valid.
  5. Submits a Good-Till-Cancelled (GTC) limit order for you at the same side and price as the copied trade, with your adjusted size.

Funds and settlement stay in the normal Polymarket flow: non-custodial, on-chain settlement. The bot does not hold your assets; it signs orders through Polymarket’s CLOB (central limit order book) using your configured wallet credentials.

Popular targets (examples)

These are illustrative profiles people sometimes use for copy trading. Past performance does not predict future results. Use the username or proxy in your config (COPY_TARGET_USER or COPY_TARGET_PROXY).

Name Proxy (short) All-time P/L (snapshot) Profile
0x8dxd @0x8dxd 0x63ce…ba9a $2.21M Open on Polymarket →
GamblingIsAllYouNeed @GamblingIsAllYouNeed 0x507e…beae $4.46M Open on Polymarket →
VeryLucky888 @VeryLucky888 0x6d3c…d294 $200.9K Open on Polymarket →
swisstony @swisstony 0x204f…e14 $5.52M Open on Polymarket →
MEPP @MEPP 0x6d9f…7990 $299.3K Open on Polymarket →

Full proxy values (paste into COPY_TARGET_PROXY if you prefer addresses over usernames):

  • 0x63ce342161250d705dc0b16df89036c8e5f9ba9a · 0x507e52ef684ca2dd91f90a9d26d149dd3288beae · 0x6d3c5bd13984b2de47c3a88ddc455309aab3d294 · 0x204f72f35326db932158cba6adff0b9a1da95e14 · 0x6d9fc316c3b8377060a44b852ba664adbfd59790

How it works

Detection

Trades come from Polymarket’s public Data API (activity filtered to TRADE only). The bot polls on a fixed interval-for example, every 15 seconds, depending on your settings. Each event is treated as unique using transaction hash, asset, and side, so repeated signals do not spawn duplicate copies.

Execution

Copied orders are sent to the CLOB as GTC limit orders at the same price as the source trade. Your size is derived from the target’s size, scaled by COPY_SIZE_MULTIPLIER, then optionally capped by COPY_MAX_ORDER_USD. Tick size is fetched from the book so submitted prices respect the market’s increments.

Resolving a username to a wallet

If you set a username (for example alice) instead of a raw 0x address, the bot resolves it once at startup (via the public profile page and embedded proxy data). After that, all polling uses the resolved proxy address.

Safety levers

  • Sizing: COPY_SIZE_MULTIPLIER and COPY_MAX_ORDER_USD keep each copied order within the envelope you define.
  • Scope: Only TRADE activity is copied; other activity types are ignored.

End-to-end flow (quick reference)

Step What happens
1. Startup Resolve username → proxy if needed; validate environment, wallet, and API-related settings.
2. Poll Request recent activity for the target (TRADES only, newest first).
3. Dedupe Skip anything already recorded (in-memory keys: transaction hash, asset, side).
4. Size Compute size: target size × multiplier; apply COPY_MAX_ORDER_USD if set.
5. Order Load tick size for the token; create and post a GTC limit at the same price.

Configuration

Everything runs from environment variables. Copy .env.example to .env and edit there.

Area Variables
Who to copy COPY_TARGET_USER or COPY_TARGET_PROXY - one is required.
Copy behavior COPY_POLL_INTERVAL_MS, COPY_ACTIVITY_LIMIT, COPY_SIZE_MULTIPLIER, COPY_MAX_ORDER_USD, COPY_TRADES_ONLY
Wallet & API POLYMARKET_PRIVATE_KEY, POLYMARKET_ADDRESS (your Polymarket proxy / funder). Optional: POLYMARKET_API_KEY, POLYMARKET_API_SECRET, POLYMARKET_API_PASSPHRASE - if omitted, the bot can derive API credentials where supported.

What you need

  • A Polymarket account and a wallet that can sign for your proxy / funder address.
  • A target defined as either a Polymarket username or a proxy wallet (0x…).

How to run

You do not need to write code-only install tools, configure .env, and run a few commands.

1. Install Node.js

Install Node.js 20 or newer from nodejs.org. Open a terminal (Command Prompt on Windows, Terminal on macOS/Linux) and confirm:

node --version

You should see v20.x.x or higher.

2. Get this project

With Git:

git clone <this-repo-url>
cd <project-folder>

Use the folder name Git creates (often the repository name).

Or download the repository as a ZIP, unpack it, and open a terminal in that folder.

3. Create your .env

From the project folder:

  • Windows (Command Prompt): copy .env.example .env
  • macOS / Linux: cp .env.example .env

Open .env in a text editor and set at least:

  • Target: COPY_TARGET_USER=username or COPY_TARGET_PROXY=0x… (exactly one approach).
  • Your wallet: POLYMARKET_PRIVATE_KEY and POLYMARKET_ADDRESS for the address that should sign orders.

Optional: tune COPY_SIZE_MULTIPLIER, COPY_MAX_ORDER_USD, and related flags.

4. Install dependencies

npm install

5. Start the bot

npm start

The process resolves the target, then polls and copies according to your settings. Stop anytime with Ctrl+C in the terminal. npm start compiles TypeScript first.


About

polymarket copy trading Bot polymarket copytrading Bot polymarket copy trading Bot polymarket copytrading Bot polymarket copy trading Bot polymarket copy trading Bot polymarket copy trading Bot polymarket copy trading Bot polymarket copytrading Bot polymarket copytrading Bot polymarket copytrading Bot polymarket copytrading Bot polymarket copytrade

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • TypeScript 100.0%