explaingit

mila89/polymarket-trading-bot

Analysis updated 2026-05-18

254TypeScriptAudience · developerComplexity · 4/5Setup · hard

TLDR

A live-money TypeScript bot that trades Polymarket's short-window crypto UP/DOWN prediction markets using two configurable strategies.

Mindmap

mindmap
  root((polymarket-trading-bot))
    What it does
      Trades UP DOWN markets
      Polls order book
      Runs on Polygon
    Tech stack
      TypeScript
      Node.js
      Polymarket CLOB
    Strategies
      Exit only
      Entry and exit
      Emergency swap
    Requirements
      Funded wallet
      Private key
      Real USDC

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

Automatically trade Polymarket's Bitcoin, Ethereum, Solana, or XRP UP/DOWN markets on a set schedule.

USE CASE 2

Configure an exit-only strategy that sells a position once time or price thresholds are hit.

USE CASE 3

Configure an entry-and-exit strategy with an emergency swap when price reverses.

USE CASE 4

Monitor live bid and ask spreads and portfolio value from the terminal while the bot runs.

What is it built with?

TypeScriptNode.js

How does it compare?

mila89/polymarket-trading-botpawandeep-prog/snapframeni5arga/deanonymizer
Stars254254255
LanguageTypeScriptTypeScriptTypeScript
Setup difficultyhardeasymoderate
Complexity4/52/53/5
Audiencedeveloperdeveloperdeveloper

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

How do you get it running?

Difficulty · hard Time to first run · 1h+

Requires a funded Polygon wallet with real USDC and a signer private key, this trades with real money, not a simulator.

In plain English

This repository contains an automated trading bot for Polymarket, a prediction market platform where users bet on whether the price of a cryptocurrency will go up or down within a given time window. The bot is written in TypeScript and targets the UP/DOWN markets for Bitcoin, Ethereum, Solana, and XRP, with time windows ranging from 5 minutes to 24 hours. The bot connects to Polymarket's order book (called the CLOB) and checks the current bid and ask prices once every second. It then runs one of two configurable trading strategies and places real orders on the blockchain using a Polygon wallet that holds USDC. Orders are placed as fill-and-kill, meaning each order either fills immediately at the current market price or is cancelled, with no resting orders left open. The two built-in strategies are configured via a TOML file. The first strategy is exit-only: the bot watches an existing position and sells it when the time remaining in the market window drops below a threshold or when the price moves far enough from 50/50. The second strategy adds entry logic, buying whichever side (up or down) currently has the higher price when conditions are met, and optionally swapping to the opposite side if a quick reversal signal appears after an exit. To run the bot, a user provides a private key and a Polymarket proxy wallet address in an environment file, sets their preferred strategy and order size in the configuration file, and starts it with a single command. The bot then prints live market snapshots every few seconds showing the current price ratio, time remaining, position held, and portfolio value. The project requires Node.js 20.6 or newer and actual USDC funds on the Polygon network, so this is live-money trading software, not a simulator. The README is straightforward in describing the setup process, strategy logic, and what each part of the codebase does.

Copy-paste prompts

Prompt 1
Explain the difference between trade_1 and trade_2 strategies in this Polymarket bot.
Prompt 2
Walk me through setting up trade.toml for a 15-minute Ethereum UP/DOWN market.
Prompt 3
What wallet and funding do I need before running this bot live?
Prompt 4
Summarize the risk in running this bot with real USDC versus testing it first.

Frequently asked questions

What is polymarket-trading-bot?

A live-money TypeScript bot that trades Polymarket's short-window crypto UP/DOWN prediction markets using two configurable strategies.

What language is polymarket-trading-bot written in?

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

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

Setup difficulty is rated hard, with roughly 1h+ to a first successful run.

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.