explaingit

md0070/polymarket-arbitrage-trading-bot

Analysis updated 2026-05-18

79TypeScriptAudience · developerComplexity · 4/5LicenseSetup · moderate

TLDR

An automated bot that trades real crypto on short-term Bitcoin, Ethereum, Solana, and XRP price bets on Polymarket.

Mindmap

mindmap
  root((Polymarket Bot))
    What it does
      Trades crypto bets
      Uses real funds
      Polls prices every second
    Tech stack
      TypeScript
      Node.js
      Polygon
    Strategies
      Exit only mode
      Entry and exit mode
      Emergency swap
    Setup needs
      Wallet private key
      USDC on Polygon
      Config file
    Audience
      Developers
      Crypto traders

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

Automate short-term crypto up or down bets on Polymarket without watching prices manually.

USE CASE 2

Run a rules-based strategy that enters and exits fast prediction market trades.

USE CASE 3

Trade with a bot that reads live on-chain balances instead of in-memory accounting.

What is it built with?

TypeScriptNode.jsPolygon

How does it compare?

md0070/polymarket-arbitrage-trading-botalpha-vector-core/polymarket-arbitrage-trading-botalpha-vector-core/polymarket-trading-bot
Stars797979
LanguageTypeScriptTypeScriptTypeScript
Setup difficultymoderatemoderatemoderate
Complexity4/54/54/5
Audiencedeveloperdeveloperdeveloper

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

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires Node.js 20+, USDC on Polygon, and a signing private key.

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

In plain English

Polymarket is a blockchain-based prediction market where you can trade on yes/no outcomes, including whether a cryptocurrency will close above its current price within a short window. This TypeScript repository provides a production-oriented bot for those short-horizon crypto markets, covering Bitcoin, Ethereum, Solana, and XRP across time windows from 5 minutes to 24 hours. The bot authenticates with Polymarket's central limit order book, resolves the correct market for your chosen coin and window, and then polls prices every second. Orders are Fill-and-Kill, meaning they fill immediately at the best available price or cancel, with no partial fills left resting in the book. All balance data comes from the blockchain directly rather than from in-memory accounting. Two trading strategies are included. The first, trade_1, handles exits only. If you hold a UP or DOWN position, the bot sells when the market is close to its expiry time or when the price ratio moves far from the midpoint of 0.50. The second, trade_2, covers the full trade lifecycle. It enters once per window when both time elapsed and price deviation meet your configured thresholds, then exits when the price hits a target range. After a successful exit, an optional emergency swap can flip to the opposite token immediately. You configure the bot through a trade.toml file that sets strategy name, trade size in USD, coin, and window length, plus a .env file for your signing private key and funder wallet address. Node.js 20 or later and USDC on the Polygon blockchain are required. The five-minute window is currently available for Bitcoin only, the longer windows support all four coins. The repository is tagged with topics including arbitrage-bot and polymarket-trading-bot. The README is explicit that this is not a backtester, that it uses real money, and that automated prediction market trading can result in total loss of funds. The license is ISC.

Copy-paste prompts

Prompt 1
Explain how the trade_1 and trade_2 strategies in this Polymarket bot decide when to buy or sell.
Prompt 2
Help me set up my trade.toml and .env file for this Polymarket trading bot on Polygon.
Prompt 3
Walk me through the risks of running this bot with real USDC before I try it.
Prompt 4
Show me which coins and time windows this bot supports.

Frequently asked questions

What is polymarket-arbitrage-trading-bot?

An automated bot that trades real crypto on short-term Bitcoin, Ethereum, Solana, and XRP price bets on Polymarket.

What language is polymarket-arbitrage-trading-bot written in?

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

What license does polymarket-arbitrage-trading-bot use?

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

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

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

Who is polymarket-arbitrage-trading-bot for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.