Polymarket 5-Minute Bot: How to Automate Bitcoin Up or Down Markets

Step-by-step guide to running a bot on Polymarket's 5-minute Bitcoin Up or Down markets: setup, paper trading, risk limits and a go-live checklist.

Polymtradebot Team
14 min read
Polymarket 5-Minute Bot: How to Automate Bitcoin Up or Down Markets
Polymarket 5-Minute Bot: How to Automate Bitcoin Up or Down Markets

Automating Polymarket's 5-minute Bitcoin Up or Down markets comes down to a handful of jobs: find the new window every five minutes, read the price that actually settles it, decide, place and cancel orders within milliseconds, and stop when the rules say stop. This guide walks through each of them and through setting up a Polymarket trading bot for these windows, from the first paper session to the first live order, with the checks we run before trusting any bot with real USDC.

A bot is an automation layer, not a guaranteed-profit machine. It applies the rules you chose, faster and more consistently than a person, and if the rules are wrong it loses money faster too. The numbers behind good rules are in our 5-minute data study, which replays 34,559 windows; this article is about running the machine. Last updated September 26, 2026.

Key takeaways

  • A new 5-minute market opens every five minutes, 288 a day, so the first thing a bot automates is finding it. The market slug is simply the window's start time.
  • The market settles on a 60-second Chainlink average, not the last price. A bot has to read the Chainlink TWAP stream and judge the final minute on the running average, not on spot.
  • Takers pay a fee (1.75¢ per share at 50¢) and wait 150 ms before matching; makers pay nothing. Both decide what a bot can profitably do.
  • Paper trade on live markets first, then go live at the smallest size with hard limits: a daily loss stop, an exposure cap and a fixed size per window.
  • Your private key should never leave your machine. In 2026 several "Polymarket bots" published on GitHub were caught sending keys to their authors.

Table of contents

What a 5-minute bot actually automates

Strip away the marketing and every bot for these markets runs the same loop, once per window, around the clock:

  1. Find the window. Each market's slug is btc-updown-5m- followed by the Unix time the window opens, so the current one is the present time rounded down to a multiple of 300 seconds. Polymarket's public Gamma API returns its Up and Down token ids.
  2. Read the price that settles it. Resolution uses the Chainlink BTC/USD 60-second TWAP, and the price to beat is that TWAP at the bell. Since September 15, 2026 Polymarket streams it on its PolyBolt socket, which requires your CLOB API credentials.
  3. Read the order book. Best bid and ask for both outcome tokens, updated over the CLOB market socket rather than by polling.
  4. Decide. A rule that turns the lead, the time left, recent volatility and the ask into buy, quote or skip. That rule is the strategy, and it is the only part that is really yours.
  5. Place, cancel and replace orders. CLOB v2 orders are signed with your key; marketable orders wait 150 ms before matching; the minimum is 5 shares at a 1¢ tick.
  6. Settle and log. Read each result from Polymarket rather than computing it, book the P&L, write the log, send the report.
  7. Stop. On the daily loss limit, on the exposure cap, and whenever a feed goes quiet.

Each step is simple on its own. Automation means doing all seven reliably 288 times a day for weeks, through reconnects, API changes and your own absence.

How the 5-minute market works in 2026

RuleValue in September 2026
Schedulea new window every 5 minutes, 288 a day, titled with New York time
ResolutionUp if the closing 60-second Chainlink TWAP is at or above the price to beat (a tie is Up)
Price to beatthe same TWAP at the open, which is the average of the minute before trading starts
Taker feeshares × 0.07 × price × (1 − price), which is 1.75¢ per share at 50¢
Maker feenone, and makers share 20% of taker fees as daily rebates
Taker delay150 ms since September 4, 2026
Order limits1¢ tick, minimum 5 shares

If you are new to the product itself, read how the Up or Down markets work first, and the 5-minute versus 15-minute comparison if you are deciding which market to automate. The rule that matters most for a bot is the settlement average. Until August 2026 these markets were decided by a single closing print; now the final minute is averaged, and in our replay the old and new rules named different winners in 13.2% of 5-minute windows. Any bot, backtest or tutorial built before August 14 is playing a slightly different game.

What you need before you start

  • A machine that stays on. A laptop sleeps, loses Wi-Fi and reboots for updates, and every missed window is a missed decision or, worse, an open position nobody is watching. A small VPS is the usual answer; see running the bot on a private VPS.
  • Python 3.10 or newer and the bot's dependencies. An AI editor can install them for you.
  • A Polymarket account with funds in its wallet, and CLOB API credentials derived once from that wallet. The bot needs them to sign orders and to subscribe to the price socket.
  • A Telegram bot token, optional, for reports and alerts on your phone.
  • Money you can afford to lose. The minimum order is 5 shares, $2.50 at 50¢. With the sizing rule below, 1 to 2% of the bankroll per window, the smallest orders imply a bankroll of a few hundred dollars.

Step by step: from download to the first live order

This is the path with our bot; any serious bot follows the same shape.

  1. Get the code and open the folder in an AI editor such as Claude Code, Cursor or Windsurf, or in a terminal. You do not need to be a developer: type "help me start this bot" and the editor walks you through the rest.
  2. Install the dependencies. One command, which the editor can run for you.
  3. Put your private key and API credentials in the local .env file. It stays on your machine. Never commit it to a repository, never paste it into a chat, a form or a website, and never give it to code you have not read.
  4. Choose the markets and a strategy mode in the config file: BTC 5-minute, 15-minute or both, and the ETH, SOL and XRP versions if you want them.
  5. Start in paper trading mode. The bot trades the live markets with simulated money and fills against the real order book. Let it run for several days, through at least one New York morning and one quiet weekend.
  6. Read the logs. Entries, skipped windows, simulated P&L, and above all whether each decision is the one you meant the rule to make.
  7. Set the limits: a daily loss limit that halts the bot and cancels its orders, a cap on total exposure, and a fixed size per window.
  8. Switch to live at the smallest size. Watch the Telegram reports and the fills for a few days, compare the live win rate with the paper one, and scale only when they agree.

Choosing what the bot should do

Three families of rules cover almost every bot on these markets. Our 5-minute study has the numbers for each; here is what each asks of the software.

  • Directional: price the lead. Buy the side that is ahead when the market underprices how often that lead holds. The bot needs the price to beat at the bell, a live lead, recent volatility and the ask, and it must judge the final minute on the projected average. Execution speed matters less than discipline: most windows should end in "skip".
  • Maker: quote instead of taking. Rest limit orders and collect the fee you are not paying plus a share of the rebates. The bot must reprice or cancel within the 150 ms taker delay whenever spot moves, which is why this family only works in software.
  • Two-sided: own both sides for less than $1. One Up plus one Down share always pays $1, so a pair bought for less, fees included, is locked in. The pair is built in two legs, minutes apart, and the risk lives between them. The bot needs both books at once and the sense not to chase a second leg that no longer adds up.

Which of these makes money in practice? In our study of 2,500 always-on bot wallets, bots that filled mostly as makers and bots that traded both sides of a window were in profit about twice as often as pure takers.

Paper trading: what it proves and what it does not

Paper trading is the most useful hour you will spend on any bot, because 5-minute markets produce many examples quickly: price spikes, flat windows, reversals, thin books. Before going live it should answer:

  • Does the bot enter only when its conditions are met, and skip otherwise?
  • Does it avoid overtrading in noisy hours?
  • Are the order sizes what you set?
  • Are the logs clear enough to explain any trade after the fact?
  • Does it stop when a limit is hit?

What paper trading cannot prove is fills. A paper engine that fills every order at the mid price is fiction, and a bot that wins on paper that way will lose live. A paper mode is only worth trusting when it models the order queue and the fee, as ours does, and even then the first live week is the real test.

Risk rules for 288 windows a day

  1. Risk a fixed fraction per window, 1 to 2% of the bankroll, and never raise it after a loss.
  2. Stop the process on a daily loss limit. Not a number on a dashboard: cancel every open order, stop posting, and require a person to restart.
  3. Cap total exposure. The 5-minute and 15-minute markets and the ETH, SOL and XRP versions all move with Bitcoin, so ten open positions are one bet.
  4. Require an edge after fees, about three cents per share, and skip the windows that do not offer it. At 50¢ a taker needs to be right 51.75% of the time just to break even.
  5. Stop on silence. If the price feed or the order book socket goes quiet, trade nothing until it is back.

7 mistakes that ruin automated 5-minute trading

  1. Trading every window. Direction at the open is close to a coin flip, and 288 fee payments a day turn a small negative edge into a large loss.
  2. Ignoring the fee. A 50¢ entry needs a 51.75% win rate; a strategy that "wins 51%" is losing money.
  3. Reading spot in the final seconds. With five seconds left, the side spot says is winning still loses 6.8% of windows, because the close is a 60-second average. Track the projected average instead.
  4. Trusting old backtests. Before August 14 the rule was different for 13.2% of windows.
  5. Running on a laptop. Sleep, updates and dropped connections leave positions unmanaged.
  6. Martingale sizing. At a coin-flip win rate, a run of eight losses starts about once a day at this cadence. Doubling after losses turns a thin edge into a blow-up.
  7. Giving your key to code you have not read. In 2026 malicious "Polymarket bots" on GitHub and poisoned npm packages were caught reading .env files and sending wallet keys to their authors. Read the code, or use code you can read.

Checklist before going live

  • Paper traded for several days, including a volatile session and a weekend.
  • Private key only in the local .env file, which is in no repository and no cloud folder.
  • API credentials work: a read-only request returns your balance and open orders.
  • Daily loss limit set and tested: it halts the bot and cancels its orders.
  • Exposure cap set across every market the bot trades.
  • Size per window within 1 to 2% of the bankroll.
  • Telegram reports arrive, and you know within minutes when the bot stops reporting.
  • The machine keeps running when you close your laptop.
  • You know how to stop the bot in seconds.

Why source-code access matters

Owning the source code is about control. You can read the strategy, change a rule, add a log line, connect notifications, or ask an AI assistant to explain any function before you run it. It is also the only real protection against the malware problem above: a bot you can read is a bot you can check. None of this requires being a senior developer; modern AI editors handle installation, environment variables, dependency errors and simple edits.

That is how we built the Polymarket trading bot: a Python script you run on your own machine or VPS, for the 5-minute and 15-minute Bitcoin Up or Down markets and the ETH, SOL and XRP versions. It has directional, maker and two-sided strategy modes with every threshold in a config file you control, paper trading that fills against the real order book, a WebSocket engine that re-quotes on every book update, a daily-loss kill switch and exposure cap, Chainlink TWAP settlement support, and Telegram reports with CSV exports. Your private key stays in your local .env file; we never see it. The changelog lists every release. One payment, no subscription, full source code.

Polymarket automation

Run the Polymarket trading bot

Full Python source for 5m and 15m Bitcoin Up or Down markets — paper trade first, then go live.

Get the script

One-time purchase · No subscription

FAQ

Can you automate Polymarket's 5-minute Bitcoin markets?

Yes. Polymarket has a public API for market data and order placement, and many of the most active accounts in these markets are bots. Automation means running the whole loop on its own: finding each window, reading the Chainlink TWAP that settles it, deciding, placing and canceling orders, settling and logging, and stopping on its limits.

Do I need to know how to code?

Not to run a ready-made bot. Open the folder in an AI editor such as Claude Code, Cursor or Windsurf and ask it to start the bot; it installs the dependencies and runs the commands. Coding helps when you want to change the strategy, and even then an AI assistant can make simple edits for you.

How is paper trading different from live trading?

In paper mode the bot runs on the live markets and the real order book but sends no orders: fills are simulated and the money is not real. Live mode signs and sends real orders from your wallet. A good paper mode models the order queue and the fee, so paper results carry over, but switch to live at the smallest size and compare before scaling.

Can one bot trade the 5-minute and 15-minute markets, or ETH and SOL, at the same time?

Yes, if it is built for it; ours runs the 5-minute and 15-minute Bitcoin markets and the ETH, SOL and XRP versions together. Remember that all of them follow Bitcoin, so cap total exposure across them rather than per market.

Do Polymarket orders cost gas?

No. Orders on Polymarket's order book are signed messages matched by the exchange, so a bot does not pay a network fee per order. Takers pay the trading fee instead: shares × 0.07 × price × (1 − price).

Where should the bot run?

On a machine that never sleeps. A small VPS is the common choice; a desktop that stays on also works. Location matters most for maker strategies, which need to cancel quotes quickly, and much less for a bot that takes a few trades a day.

Sources

Polymarket predictions changelog (TWAP settlement, taker delay, PolyBolt socket); Polymarket trading fees; PolyBolt WebSocket; the BTC/USD 60-second TWAP stream named in the market rules.

This article is educational and is not financial advice. Prediction markets are risky and most short-term traders lose money. Polymarket is not available in every jurisdiction; check the rules where you live before trading.