explaingit

md0070/polymarket-trading-bot

Analysis updated 2026-05-18

163TypeScriptAudience · developerComplexity · 4/5Setup · hard

TLDR

An automated crypto prediction market trading bot for Polymarket that buys and sells UP/DOWN positions on live on-chain order books.

Mindmap

mindmap
  root((polymarket-trading-bot))
    What it does
      Trades UP/DOWN crypto markets
      Watches order book every second
    Tech stack
      TypeScript
      Node.js
      Polygon network
    Use cases
      Automated exits
      Automated entries and exits
      Multi-asset trading
    Audience
      Crypto traders
      Developers

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 Bitcoin, Ethereum, Solana, or XRP UP/DOWN markets on Polymarket.

USE CASE 2

Run an exit-only strategy that closes positions based on time or price movement.

USE CASE 3

Run an entry-and-exit strategy that picks a favorable side and flips positions near the deadline.

What is it built with?

TypeScriptNode.jsPolygonTOML

How does it compare?

md0070/polymarket-trading-botpython-telegrambot/ai-auto-tradingtsukamg/polymarket-weather-trading-engine
Stars163163168
LanguageTypeScriptTypeScriptTypeScript
Setup difficultyhardhardmoderate
Complexity4/55/54/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 Polymarket signer key, it places real, not simulated, orders.

In plain English

This is an automated trading bot for Polymarket, a prediction market platform where you can bet on whether a cryptocurrency price will be higher or lower at the end of a time window. The bot focuses specifically on the UP/DOWN crypto markets for Bitcoin, Ethereum, Solana, and XRP across intervals ranging from 5 minutes to 24 hours. The bot connects to Polymarket's order book, checks the current buy and sell prices for the UP and DOWN positions every second, and then applies one of two configurable trading strategies. The first strategy is exit-only: it holds a position and sells when either enough time has passed in the window or the price has moved far enough from 50 cents. The second strategy also handles entries: it waits for the right time and price window to buy whichever side looks more favorable, then exits based on price movement, with an optional step to immediately flip to the opposite position if the timing looks right. The bot uses real on-chain balances on the Polygon network and submits actual orders, not simulated ones. You need a Polymarket signer key and a proxy wallet funded with USDC on Polygon to run it. Configuration is done through a TOML file where you set the strategy, order size in dollars, which cryptocurrency and time window to trade, and the numeric thresholds that trigger entries and exits. To start it, you install dependencies with npm, create an environment file with your private key and wallet address, edit the trade.toml configuration file with your strategy settings, and run npm run dev. The bot then logs a market snapshot every few seconds showing the current price spread, your position, account balance, and whether the order engine is busy or idle. The project is written in TypeScript and requires Node.js 20.6 or later. No license information is mentioned in the README.

Copy-paste prompts

Prompt 1
Walk me through configuring trade.toml to trade the Bitcoin 5-minute UP/DOWN market with this bot.
Prompt 2
Explain the difference between the exit-only and entry-and-exit trading strategies in this bot.
Prompt 3
Help me set up a Polymarket signer key and a Polygon proxy wallet funded with USDC to run this bot.
Prompt 4
What do the market snapshot logs from this bot tell me about my open position and account balance?

Frequently asked questions

What is polymarket-trading-bot?

An automated crypto prediction market trading bot for Polymarket that buys and sells UP/DOWN positions on live on-chain order books.

What language is polymarket-trading-bot written in?

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

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.