explaingit

voidsignals/polymarket-trading-bot

Analysis updated 2026-05-18

146JavaScriptAudience · developer

TLDR

A Node.js bot that arbitrages and copy-trades Polymarket's 5-minute Bitcoin Up/Down prediction markets on Polygon.

Mindmap

mindmap
  root((BTC Updown Bot))
    What it does
      Arbitrages Up Down markets
      Copy trades a wallet
      Redeems after resolution
    Tech stack
      Node.js
      Polygon
      Polymarket CLOB
    Use cases
      Automated arbitrage
      Wallet mirroring
      Risk capped trading
    Audience
      Traders
      Developers
    Setup
      npm install
      Configure env keys
      Set risk limits

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

Run an automated arbitrage strategy on Polymarket's recurring 5-minute BTC Up/Down markets.

USE CASE 2

Mirror a chosen wallet's trades on Polymarket through a dedicated copy trading module.

USE CASE 3

Apply configurable risk caps like max spend per market and hourly loss limits to automated trading.

USE CASE 4

Merge matched Up and Down positions back into USDC and redeem winnings after market resolution.

What is it built with?

Node.jsJavaScriptPolygonPolymarket CLOBWebSocket

How does it compare?

voidsignals/polymarket-trading-botfrank-masciopinto/no-kingsmo-tunn/openguider
Stars146146144
LanguageJavaScriptJavaScriptJavaScript
Setup difficultyeasy
Complexity2/5
Audiencedevelopergeneralgeneral

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

In plain English

This is a Node.js trading bot built for Polymarket's short duration Bitcoin Up or Down prediction markets, which repeat every 5 minutes on the Polygon blockchain. It combines an arbitrage strategy with copy trading, meaning it can both trade on its own price logic and mirror the trades of a chosen wallet. The main arbitrage engine watches for the next 5 minute BTC Up or Down market to open, then places buy orders for both the Up and Down side at several price levels, forming a ladder. It tracks the live order book over a WebSocket connection, with a backup method if that connection drops. When the combined price of the best Up and Down offers falls low enough to guarantee a profit margin, the bot buys both sides together. Once it holds a large enough matched position on both outcomes, it merges them back into USDC, the stablecoin used as collateral. As the market's 5 minute window nears its end, the bot stops adding new positions, cancels any orders still open, waits for the market to resolve, and then redeems whatever winning positions it holds. Alongside the arbitrage engine, the repository includes two separate copy trading paths: one built into the main program that starts mirroring a target wallet's new purchases once you set that wallet's address, and a separate, dedicated copy trading module that watches Polymarket's public trade feed directly and reacts quickly to a target wallet's fresh buys, with its own filters for trade age, price limits, and spending caps. The bot includes several built in risk controls, such as caps on spend per market, limits on how much can be taken in a single trade, limits on how imbalanced the bot's Up versus Down position can get, and an hourly loss limit, along with logic to stop trading and shut down gracefully when needed. Setup requires Node.js, a wallet private key, a proxy wallet address, and a Polygon RPC connection, configured through an environment file before running the bot. The README states plainly that running it places real blockchain transactions and market orders, and should only be used by someone who understands the strategy, the wallet setup, and the risks involved.

Copy-paste prompts

Prompt 1
Explain what MAX_SPEND_PER_MARKET and COMBINED_ASK_STOP control in this bot's configuration.
Prompt 2
Walk me through setting up the .env file for this Polymarket bot with a proxy wallet.
Prompt 3
What is the difference between the integrated copy watcher and the dedicated copy trader in src/copy/.
Prompt 4
How does this bot decide when to merge matched Up and Down positions back into USDC.

Frequently asked questions

What is polymarket-trading-bot?

A Node.js bot that arbitrages and copy-trades Polymarket's 5-minute Bitcoin Up/Down prediction markets on Polygon.

What language is polymarket-trading-bot written in?

Mainly JavaScript. The stack also includes Node.js, JavaScript, Polygon.

Who is polymarket-trading-bot for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.