explaingit

predictiveflow-labs/polymarket-arbitrage-bot

Analysis updated 2026-05-18

197TypeScriptAudience · developerComplexity · 4/5LicenseSetup · hard

TLDR

A TypeScript bot that polls Polymarket's order book for short crypto Up/Down markets and places automated orders based on configurable rules.

Mindmap

mindmap
  root((Polymarket Bot))
    What it does
      Polls order book prices
      Applies entry/exit rules
      Places automated orders
    Config
      .env for secrets
      trade.toml for strategy
      trade_1 and trade_2 modes
    Tech stack
      TypeScript
      Node.js
      Polymarket CLOB API
    Caveats
      Not paired-leg arbitrage
      Requires funded wallet
      Risk disclaimer

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 rule-based entry and exit trading on Polymarket's short 5-minute or 15-minute BTC markets

USE CASE 2

Build on top of the Polymarket CLOB API for your own trading experiments

USE CASE 3

Run small-size trading experiments with configurable retry and cooldown controls

What is it built with?

TypeScriptNode.js

How does it compare?

predictiveflow-labs/polymarket-arbitrage-botalbert-weasker/niubi_guardgordensun/learningcell
Stars197199200
LanguageTypeScriptTypeScriptTypeScript
Setup difficultyhardmoderateeasy
Complexity4/53/52/5
Audiencedeveloperdevelopergeneral

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 a private key and funder address, plus USDC balance for live trading experiments.

ISC license: use, modify, and redistribute freely, including commercially, as long as you keep the copyright notice.

In plain English

This repository is a TypeScript trading bot that operates on Polymarket, a prediction market platform where users trade on the outcomes of real-world events. Specifically, it targets short-duration Up/Down markets tied to cryptocurrency prices, such as whether Bitcoin will finish higher or lower within a 5-minute or 15-minute window. The bot uses the official Polymarket order book API to poll prices, apply configurable entry and exit rules, and place orders automatically. The bot is built on Node.js 20 or newer and is configured through two files: a .env file for secrets like your wallet private key and funding address, and a trade.toml file where you set the market (coin and time window), the strategy to use, how much to trade per order, retry limits, and cooldown periods. Two strategy modes are available, called trade_1 and trade_2, which differ in their entry conditions and exit behavior. The bot runs one market window at a time. Running two separate processes with two different configs is the suggested approach for anyone wanting to watch both 5-minute and 15-minute windows simultaneously. The README is explicit that this is not a risk-free arbitrage system and that the word "arbitrage" in the name reflects search terminology rather than a strict financial definition. The bot does not implement a paired dual-leg arbitrage engine that trades two correlated windows simultaneously. It is described as automation scaffolding for experimentation, suited to developers building on top of the Polymarket CLOB API or traders running small-size experiments with strict risk controls. On the technical side, the codebase is organized into services for authentication and API access, a pricing module that polls quotes, a decision module that applies the strategy rules, and an execution module that submits orders with retry logic and human-readable error messages. Startup validates required environment variables before doing anything else. The project is licensed under ISC. The README includes a safety and compliance section noting that users are responsible for checking whether their activities comply with applicable laws and Polymarket's terms of service. The full README is longer than what was shown.

Copy-paste prompts

Prompt 1
Help me set up the .env and trade.toml files for this Polymarket bot on testnet-scale funds
Prompt 2
Explain the difference between the trade_1 and trade_2 strategy modes in this repo
Prompt 3
Walk me through how the CLOB L1 and L2 authentication flow works in this codebase
Prompt 4
Help me run two separate instances of this bot to watch both the 5-minute and 15-minute windows

Frequently asked questions

What is polymarket-arbitrage-bot?

A TypeScript bot that polls Polymarket's order book for short crypto Up/Down markets and places automated orders based on configurable rules.

What language is polymarket-arbitrage-bot written in?

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

What license does polymarket-arbitrage-bot use?

ISC license: use, modify, and redistribute freely, including commercially, as long as you keep the copyright notice.

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

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

Who is polymarket-arbitrage-bot for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.