What Is Polymarket Trading Bot?
Polymarket Trading Bot is an open-source TypeScript trading bot built by ShinyaTomitsuka for automated UP/DOWN crypto prediction-market execution on the Polymarket CLOB, with 1-second order-book polling and support for 5m–24h market windows. Polymarket Trading Bot is one of the best Prediction Market Trading Bots tools for quant developers, indie hackers, and small trading teams on Polymarket who want real on-chain balances, FAK execution, and market rotation without a paper-trading layer.
The repo is opinionated toward live trading, not simulation. It pulls balances from Polygon, uses @polymarket/clob-client-v2 for auth and order flow, and rotates between market windows by resolving the next slug rather than freezing on a single contract.
Quick Overview
| Attribute | Details |
|---|---|
| Type | Prediction Market Trading Bots |
| Best For | quant developers, indie hackers, and small trading teams on Polymarket |
| Language/Stack | TypeScript, Node.js 20.6+, Polymarket CLOB client (@polymarket/clob-client-v2), Polygon, Zod, TOML |
| License | ISC |
| GitHub Stars | N/A in scraped page text as of Feb 2026 |
| Pricing | Open-Source |
| Last Release | N/A in scraped page text as of Feb 2026 |
Who Should Use Polymarket Trading Bot?
- Indie hackers testing market timing logic who want a narrow live-trading loop instead of a full research stack.
- Quant developers who need a TypeScript codebase with explicit strategy branches and deterministic order handling.
- Operators using funded proxy wallets or EOAs who need the bot to authenticate against the Polymarket CLOB and spend real USDC on Polygon.
- Small teams trading short-horizon event windows such as 5m, 15m, 1h, 4h, or 24h crypto prediction markets.
Not ideal for:
- Backtesting-heavy workflows where you need historical fills, slippage models, and hyperparameter sweeps.
- Multi-venue market making across CEXs and perps; this bot is scoped to Polymarket CLOB execution.
- Users without Polygon USDC on the funding wallet, because the engine is built around real settlement.
Key Features of Polymarket Trading Bot
- Market slug resolution — The bot builds the active market slug from coin plus time window, then fetches UP/DOWN
clobTokenIdsfrom Gamma. That means it can roll from one market window to the next without manual contract hunting. - 1-second price polling — It polls the CLOB
/pricesendpoint every second for BUY and SELL quotes, with timeout, retry, and last-good cache fallback. That keeps the engine responsive when the venue is noisy or the API stalls. - On-chain portfolio checks — Portfolio state comes from real
CONDITIONALandCOLLATERALbalances on Polygon, not simulated PnL. This matters because fill decisions depend on actual funds and current positions. - FAK order execution — Orders are submitted as Fill-and-Kill market orders, which makes the bot behave like an execution engine instead of a passive signal generator. The code then polls balances after each trade to confirm settlement.
- Two strategy modes —
trade_1is exit-only, whiletrade_2supports entry, exit, and an optional emergency swap. That split keeps the logic readable and makes the risk profile explicit intrade.toml. - Signature fallback logic — The auth path supports proxy and EOA signature modes, and it can try
POLY_PROXYbeforeEOAwhen the config is not pinned. That reduces setup friction for teams using funded proxy wallets or direct signers. - Operator-friendly runtime output — The terminal shows market state, position state, trend, and engine status in real time. If you want better observability on top of that, pair Polymarket Trading Bot with OpenTrace for request-level tracing or djevops for repeatable host setup.
Polymarket Trading Bot vs Alternatives
| Tool | Best For | Key Differentiator | Pricing |
|---|---|---|---|
| Polymarket Trading Bot | Live Polymarket UP/DOWN execution | Market slug resolution, on-chain balance checks, and FAK order flow tied to short market windows | Open-Source |
| Hummingbot | Multi-exchange market making | Broader venue support and mature market-making patterns across CEXs | Open-Source |
| Freqtrade | Crypto strategy research | Backtesting, hyperopt, and exchange execution for more traditional crypto pairs | Open-Source |
| Custom Node.js bot | Bespoke execution logic | Total control over data flow, but you own every retry, auth, and risk check | Depends |
Pick Hummingbot when you need exchange coverage and classic liquidity provision rather than Polymarket-specific execution. Pick Freqtrade when your first job is backtesting and signal optimization instead of live CLOB market rotation.
Choose Polymarket Trading Bot when you want a narrow, auditable flow for prediction markets. If you are wiring a one-off strategy, a custom Node.js bot may be enough, but you will rebuild the auth, retry, and balance checks that this repo already ships.
How Polymarket Trading Bot Works
Polymarket Trading Bot centers on a simple runtime model: trade.toml defines the strategy, .env defines signing and funding, and the engine loops over a market window until the end timestamp. The code validates config with Zod, derives or creates CLOB API credentials, resolves the current slug from the configured coin and period, and then fetches token IDs from Gamma before it starts trading.
The architecture is intentionally thin. It does not introduce a database, a queue, or a separate worker pool, because the core abstraction is a single market loop that polls quotes, evaluates a strategy, and places FAK orders when thresholds fire. That keeps the failure modes easy to reason about: bad config fails at startup, auth failures fail early, and quote fetch issues fall back to the last known price instead of producing undefined behavior.
git clone <your-fork-url>
cd polymarket-arbitrage-trading-bot
npm install
cp .env.example .env
npm run dev
That command path boots the dev runner after dependencies are installed and environment variables are in place. Once the process starts, the bot prints the active market, the current position, and the live trend while it keeps polling prices and sending orders as conditions match. If you want to harden deployment, run the compiled build with npm run build and npm start on a host that already has Polygon USDC and a valid signer.
The two strategy branches encode the risk model. trade_1 is exit-only and waits for time or price stress before closing a position, while trade_2 can enter once per window, exit on price conditions, and optionally re-enter through an emergency swap if the opposite side becomes attractive. That design keeps the strategy surface small and makes it easy to audit how the bot behaves during a fast-moving 5-minute market.
Pros and Cons of Polymarket Trading Bot
Pros:
- Live, not simulated — It reads actual on-chain balances and submits real orders, so the output reflects the account state you will settle against.
- Fast polling loop — A 1-second quote cadence is enough for short-horizon prediction markets where window drift matters.
- Narrow strategy surface — Two explicit strategy modes are easier to review than a sprawling plugin system.
- Config-first operation — Most behavior is driven by
trade.tomland environment variables, which makes the runtime predictable. - Polymarket-native flow — Slug resolution, Gamma token lookup, and CLOB execution are aligned with the venue’s own data model.
Cons:
- No backtesting layer — The repo does not ship a historical simulator, so you cannot evaluate a strategy offline from the same codepath.
- Single-venue scope — It is built for Polymarket only, so it is not a general crypto bot framework.
- Limited strategy vocabulary —
trade_1andtrade_2are useful, but they are not a full research environment. - Operational dependency on Polygon USDC — If the funding wallet is underfunded or misconfigured, the bot cannot execute.
- Short-window bias — The design is optimized for 5m–24h prediction markets, not long-duration portfolio management.
Getting Started with Polymarket Trading Bot
git clone <your-fork-url>
cd polymarket-arbitrage-trading-bot
npm install
cp .env.example .env
# edit .env with POLYMARKET_PRIVATE_KEY and POLYMARKET_FUNDER_ADDRESS
# edit trade.toml with strategy and market window
npm run dev
After the first run, Polymarket Trading Bot expects a valid signer, a funded wallet on Polygon, and a trade.toml that matches the market you want to trade. If you are using a proxy wallet, set POLYMARKET_FUNDER_ADDRESS or PROXY_WALLET_ADDRESS; if you want to force a signature path, set POLYMARKET_SIGNATURE_TYPE explicitly. The bot fails fast on invalid config, which is the right behavior for live order routing.
For a production pass, verify that the wallet has USDC, confirm that the strategy parameters are sane, and check that the market period matches the slug family you want to trade. The repo’s default flow is designed to be edited once, then run repeatedly with minimal operator input.
Verdict
Polymarket Trading Bot is the strongest option for live Polymarket execution when you care more about on-chain settlement and deterministic order flow than about backtesting breadth. Its main strength is a tight CLOB loop with market rollover and FAK orders; the caveat is its narrow venue scope. Use it for production-style prediction market automation, not research-heavy portfolio modeling.



