Poly Research & Robotics
TUTORIAL · 7 steps · 60 to 90 minutes

How to Build a Spread-Capture Bot for Polymarket 5-Minute BTC Markets

A step-by-step technical guide to building the core logic behind a market-making bot that profits by accumulating both sides of a binary market on their separate price dips, so its blended cost across the pair lands below $1.00 - even though the two sides never trade below $1.00 combined at the same instant.

By Poly Research & Robotics Research7 steps~60 to 90 minutes
How to Build a Spread-Capture Bot for Polymarket 5-Minute BTC Markets
Welcome

This guide walks you through the core mechanics, entry logic, sizing, and execution patterns behind a both-sides spread-capture bot for Polymarket 5-minute BTC Up/Down markets. You will build the brain of the bot, not a plug-and-play system that prints money.

Estimated time: 60 to 90 minutes Format: Step-by-step
What you'll learn
  • Why accumulating both Up and Down on their separate dips can lock profit regardless of Bitcoin's direction, even though you can never buy both sides under $1.00 at the same instant
  • How to read the CLOB order book and compute the paired cost gate
  • How to size positions using inverse-weighted allocation to minimize blended cost
  • How to buy each leg on its own dips while keeping your blended cost across the pair under the ceiling
  • Why there is no exit management and what happens if you add one
  • How to schedule sessions, monitor edge longevity, and respect capacity limits
What you'll need
  • Basic Python and async/await programming knowledge
  • A Polymarket account with USDC funded on Polygon
  • The py-clob-client-v2 SDK installed and authenticated
  • Familiarity with binary prediction markets and how they settle
Warning

This is not a ready-made profitable bot

This tutorial teaches the fundamental logic and mechanics that underlie a spread-capture or market-making bot. Following these steps does not guarantee a profitable system out of the box. Real profitability depends on execution latency, fee structure, market conditions, capital size, and your own implementation quality. Treat everything here as the conceptual and technical foundation, not a finished product.

Join Discord