86% Return? How to Use a Bot to 'Earn Passively' on Polymarket

marsbitPublicado a 2025-12-30Actualizado a 2025-12-30

Resumen

This article details the development and backtesting of an automated trading bot for the "BTC 15-minute UP/DOWN" market on Polymarket. The author identified market inefficiencies and automated a manual strategy to exploit them. The bot operates in two modes. In manual mode, users can directly place orders. In auto mode, it runs a two-leg cycle: First, it observes the market for a set time after a round begins. If either the "UP" or "DOWN" side drops by a specified percentage (e.g., 15%) within seconds, it triggers "Leg 1" and buys the crashed side. It then waits for "Leg 2," a hedging trade on the opposite side, which is only executed if the sum of the Leg 1 entry price and the opposite ask price meets a target threshold (e.g., ≤ 0.95). Due to a lack of historical market data from Polymarket's API, the author created a custom backtesting system by recording 6 GB of live price snapshots over four days. A conservative backtest with parameters of a 15% crash threshold and a 0.95 sum target showed an 86% ROI, turning $1,000 into $1,869. An aggressive parameter set resulted in a -50% loss, highlighting the critical role of parameter selection. The author acknowledges significant limitations of the backtesting, including its short data period, failure to model order book depth, partial fills, variable network latency, and the market impact of the bot's own orders. Future improvements include rewriting the bot in Rust for performance, running a dedicated node, and deploying on a ...

A few weeks ago, I decided to build my own Polymarket bot. The full version took me a few weeks to complete.

I was willing to invest this effort because there are indeed inefficiencies on Polymarket. Although there are already some bots exploiting these inefficiencies for profit, it's far from enough. The opportunities in this market still far outnumber the bots.

Bot Construction Logic

The bot's logic is based on a strategy I previously executed manually. To improve efficiency, I automated it. This bot runs on the "BTC 15-minute UP/DOWN" market.

The bot runs a real-time monitoring program that can automatically switch to the current BTC 15-minute round, stream the best bid/ask via WebSocket, display a fixed terminal UI, and allow full control via text commands.

In manual mode, you can place orders directly.

buy up / buy down : Buy a specific USD amount.

buyshares up / buyshares down : Purchase an exact number of shares using user-friendly LIMIT + GTC (Good-Til-Cancelled) orders, filled at the current best ask price.

Automatic mode runs a repeating two-leg cycle.

First, it only observes price fluctuations within the first windowMin minutes after each round starts. If either side drops sufficiently fast (a drop of at least movePct within about 3 seconds), it triggers "Leg 1," buying the side that just crashed.

After completing Leg 1, the bot will never buy the same side again. It waits for "Leg 2 (the hedge)" and only triggers it when the following condition is met: leg1EntryPrice + oppositeAsk <= sumTarget.

When this condition is met, it buys the opposite side. After Leg 2 is completed, the cycle ends, and the bot returns to the observation state, waiting for the next crash signal using the same parameters.

If the round changes during the cycle, the bot abandons the open cycle and restarts with the same settings in the next round.

The parameters for automatic mode are set as follows: auto on [sum=0.95] [move=0.15] [windowMin=2]

· shares: The position size used for both legs of the trade.

· sum: The threshold allowed for hedging.

· move (movePct): The crash threshold (e.g., 0.15 = 15%).

· windowMin: The duration from the start of each round during which Leg 1 is allowed to execute.

Backtesting

The bot's logic is simple: wait for a violent price drop, buy the side that just finished dropping, then wait for the price to stabilize and hedge by buying the opposite side, while ensuring: priceUP + priceDOWN < 1.

But this logic needed testing. Does it really work in the long run? More importantly, the bot has many parameters (shares, sum, move percentage, window minutes, etc.). Which parameter set is optimal and maximizes profit?

My first thought was to let the bot run live for a week and observe the results. The problem was that this would take too long and only test one parameter set, while I needed to test many.

My second thought was to backtest using historical data from the Polymarket CLOB API. Unfortunately, for the BTC 15-minute UP/DOWN market, the historical data endpoint kept returning empty datasets. Without historical price ticks, the backtest couldn't detect "a crash within about 3 seconds," couldn't trigger Leg 1, and would yield 0 cycles and 0% ROI regardless of parameters.

After further investigation, I found other users encountered the same issue fetching historical data for certain markets. I tested other markets that did return historical data and concluded that for this specific market, historical data simply isn't retained.

Due to this limitation, the only reliable way to backtest this strategy was to create my own historical dataset by recording the real-time best-ask prices while the bot was running.

The logger writes snapshots to disk containing:

· Timestamp

· Round identifier (round slug)

· Seconds remaining

· UP/DOWN token IDs

· UP/DOWN best ask prices

Subsequently, the "recorded backtest" replays these snapshots and deterministically applies the same automatic logic. This guarantees access to the high-frequency data needed to detect crashes and hedging conditions.

I collected 6 GB of data over 4 days in total. I could have recorded more, but I deemed it sufficient for testing different parameter sets.

I started testing this parameter set:

· Initial balance: $1,000

· 20 shares per trade

· sumTarget = 0.95

· Crash threshold = 15%

· windowMin = 2 minutes

I also applied a constant 0.5% fee and a 2% spread to stay in a conservative scenario.

The backtest showed an ROI of 86%, turning $1,000 into $1,869 in just a few days.

Then I tested a more aggressive parameter set:

· Initial balance: $1,000

· 20 shares per trade

· sumTarget = 0.6

· Crash threshold = 1%

· windowMin = 15 minutes

Result: -50% ROI after 2 days.

This clearly shows that parameter selection is the most critical factor. It can make you a lot of money or lead to significant losses.

Limitations of Backtesting

Even with fees and spreads included, backtesting has its limitations.

· First, it only used a few days of data, which might not be enough for a comprehensive market perspective.

· It relies on recorded best-ask snapshots; in reality, orders might be partially filled or filled at different prices. Furthermore, order book depth and available volume are not modeled.

· Micro-fluctuations below the second level are not captured (data is sampled once per second). The backtest has 1-second timestamps, but a lot can happen between seconds.

· In the backtest, slippage is constant, and variable latency (e.g., 200–1500 ms) or network spikes are not simulated.

· Each leg of the trade is considered "instantly" executed (no order queuing, no pending orders).

· Fees are charged uniformly, whereas in reality fees might depend on: market/token, maker vs. taker, fee tier, or conditions.

To be pessimistic (prudent), I applied a rule: if Leg 2 fails to execute before the market closes, Leg 1 is considered a total loss.

This is deliberately conservative but doesn't always match reality:

· Sometimes Leg 1 can be closed early,

· Sometimes it ends in-the-money (ITM) and wins,

· Sometimes the loss can be partial rather than total.

While losses might be overestimated, this provides a practical "worst-case" scenario.

Most importantly, backtesting cannot simulate the impact of your large orders on the order book or attracting other traders to hunt you. In reality, your orders can:

· Disturb the order book,

· Attract or repel other traders,

· Cause non-linear slippage.

The backtest assumes you are a pure price taker with no influence.

Finally, it does not simulate rate limits, API errors, order rejections, suspensions, timeouts, reconnections, or the bot being busy and missing signals.

Backtesting is extremely valuable for identifying good parameter ranges, but it is not a 100% guarantee, as some real-world effects cannot be modeled.

Infrastructure

I plan to run this bot on a Raspberry Pi to avoid consuming resources on my main machine and maintain 24/7 operation.

But there is still significant room for improvement:

· Using Rust instead of JavaScript would provide far superior performance and processing times.

· Running a dedicated Polygon RPC node would further reduce latency.

· Deploying on a VPS close to Polymarket's servers would also significantly reduce latency.

There are certainly other optimizations I haven't discovered yet. Currently, I am learning Rust as it is becoming an indispensable language in Web3 development.

Preguntas relacionadas

QWhat is the core strategy used by the Polymarket trading bot described in the article?

AThe bot's core strategy is to wait for a sharp price drop (a 'flash crash') in the BTC 15-minute UP/DOWN market, buy the side that just crashed (Leg 1), and then wait to hedge by buying the opposite side once the combined price of UP and DOWN tokens meets a specific threshold, ensuring that priceUP + priceDOWN < 1.

QWhy couldn't the author perform a backtest using historical data from the Polymarket API?

AThe author couldn't perform a backtest using the Polymarket CLOB API's historical data because, for the specific BTC 15-minute UP/DOWN market, the historical data endpoint consistently returned empty datasets. No historical price ticks were available, which are required to detect the rapid price movements the strategy relies on.

QHow did the author create a dataset to backtest the bot's strategy despite the lack of historical API data?

AThe author created their own historical dataset by running a custom logger alongside the bot. This logger recorded real-time snapshots of the best-ask prices, timestamps, round identifiers, and other market data. These snapshots were then replayed in a 'recorded backtest' to deterministically apply the bot's logic.

QWhat was the result of the backtest using the conservative parameter set (sumTarget=0.95, movePct=15%, windowMin=2)?

AThe backtest using the conservative parameter set (20 shares per trade, sumTarget=0.95, movePct=15%, windowMin=2 minutes) showed a return on investment (ROI) of 86%, turning an initial $1,000 into $1,869 over a few days, even after applying a constant 0.5% fee and 2% spread.

QWhat are some key limitations of the backtesting method mentioned by the author?

AKey limitations include: using only a few days of data; relying on best-ask snapshots without modeling order book depth or partial fills; not capturing sub-second micro-fluctuations; assuming constant slippage and instant order execution; not simulating the market impact of large orders; and not accounting for API errors, network latency, or rate limits.

Lecturas Relacionadas

Silicon Valley 'Startup Guru' Steve Hoffman: Web3 + AI Could Be a Trap

Silicon Valley investor and "Godfather of Startups" Steve Hoffman warns that combining Web3 with AI is likely a trap, not a promising venture. In an interview, Hoffman argues that while AI is a foundational technology touching all industries, Web3 adds complexity, friction, and regulatory risk without solving mainstream consumer or business needs. He advises founders to focus on deep, specialized applications where startups can out-iterate giants, rather than on generic features easily replicated by large tech companies. Hoffman observes that Silicon Valley will lead foundational AI research, while China excels at rapid, large-scale application and commercialization, particularly in robotics. He stresses that AI-driven autonomous agents capable of collaborative, multi-step tasks are 2-4 years away, which will cause significant job displacement. The solution is not to slow AI but to redesign business models around human-AI collaboration and reform social systems like education and retraining. For startups, Hoffman recommends focusing on vertical, expertise-heavy domains to build defensibility. He sees major opportunities in AI fraud detection and cybersecurity. Key founder mindsets include systemic thinking over feature-focus, relentless customer centricity, building adaptive teams, and deeply understanding AI's capabilities and limits. Hoffman is also leading a non-profit initiative to establish university centers aimed at training future leaders in responsible, human-value-aligned AI innovation.

marsbitHace 5 min(s)

Silicon Valley 'Startup Guru' Steve Hoffman: Web3 + AI Could Be a Trap

marsbitHace 5 min(s)

Token Inefficient, Economy Tokenless

The article "Tokens Aren't Economical, Economics Aren't Tokenized" analyzes a pivotal shift in the AI industry from a technology-driven narrative to one dominated by capital efficiency. It highlights two concurrent trends: a severe capital shortage due to the exorbitant and recurring costs of compute (e.g., OpenAI's high burn rate) and a wave of corporate spin-offs where major tech companies are separating their AI units (like Kuaishou's Kling and Baidu's Kunlunxin). The core argument is that AI's "anti-internet" business model, where user growth increases costs rather than profits, has created a disconnect between high valuations and actual cash flow. Spin-offs address this by allowing AI assets to be valued independently. Within a parent company, they are seen as cost centers, but as standalone entities, they are priced based on their growth potential and scarcity in the primary market, leading to massive valuation premiums (e.g., Kling's estimated value tripling post-spin-off). The industry is at an inflection point, moving from "model worship" to "value realization." The competition is evolving from a pure compute (GPU) race to a broader focus on systemic efficiency and full-stack engineering (involving CPUs and orchestration) to achieve viable commercialization. The year 2026 is framed as a critical moment where the industry must definitively answer how to economically translate AI capability into tangible business value, reshaping the sector's future power structure.

marsbitHace 10 min(s)

Token Inefficient, Economy Tokenless

marsbitHace 10 min(s)

Crossing the 'Memory Wall': The Wafer-Level Revolution and Computing Power Routes in the AI Inference Era

In 2026, a historic shift occurred in AI as major cloud providers' inference spending surpassed training spending for the first time, signaling a move from "building large models" to "using large models." This shifts the core challenge from computing power to the "memory wall"—the bottleneck of data movement (model weights, activations, KV Cache) between external DRAM and processors, where energy and latency from data transfer far exceed computation itself. Companies like Nvidia face GPU idle time due to bandwidth limits. In contrast, Cerebras Systems adopts a radical "wafer-scale" approach with its Wafer-Scale Engine (WSE). Instead of cutting a silicon wafer into many chips, Cerebras uses almost the entire wafer as one massive chip (WSE-3). This design provides 44GB of on-chip SRAM, delivering memory bandwidth thousands of times higher than traditional HBM (e.g., 21 PB/s vs. Nvidia B200). For LLM inference, weights are streamed layer-by-layer from external MemoryX storage to the chip, avoiding HBM bottlenecks. This results in token generation speeds 1.5–5 times faster than Nvidia's B200 in some models and significant advantages in first-token latency and long-context tasks. Additionally, Cerebras's architecture offers much lower interconnect power consumption (0.15 pJ/bit vs. GPU's ~10 pJ/bit). However, Cerebras faces challenges: SRAM scaling has slowed with advanced nodes, limiting future capacity gains; the chip requires specialized liquid cooling and custom software stacks; and its external I/O bandwidth (150 GB/s) is low compared to NVLink, hindering multi-system scaling for very large models. Competition is intensifying. Major players are pursuing three paths: 1) Developing proprietary inference ASICs (e.g., Google TPU, Microsoft Maia), 2) Leveraging advanced packaging (e.g., TSMC's SoW) to democratize wafer-scale-like integration, potentially eroding Cerebras's process advantage within a few years, and 3) Exploring optical interconnects for ultimate bandwidth. Commercially, Cerebras is transitioning from a hardware vendor to a service provider, facing the immense challenge of building high-power, specialized data centers to meet large contracts (e.g., 250MW/year from 2026–2028). In conclusion, the AI inference era presents a fundamental architectural trade-off. Cerebras opts for extreme physical optimization for low-latency, single-task performance, while Nvidia prioritizes versatility and massive cluster throughput. The path forward remains uncertain, with technology and business models still evolving in the race toward advanced AI.

marsbitHace 16 min(s)

Crossing the 'Memory Wall': The Wafer-Level Revolution and Computing Power Routes in the AI Inference Era

marsbitHace 16 min(s)

Has Bitcoin's 'Rebound Ended', Officially Entering the Late Bear Market Phase?

**Title: Has Bitcoin's Rebound Ended, Entering the Late Bear Market Phase?** **Summary:** Bitcoin's price has declined by 13% this week, signaling a potential return to late-stage bear market conditions. The price fell to around $67k, positioned between the Realized Price and Realized Cap Weighted Average. For the first time since early 2022, the Short-Term Holder cost basis has dropped below this key average, confirming a hallmark of late-cycle bear markets. Profitability metrics have collapsed sharply. The 7-day average of the Realized Profit/Loss ratio plummeted from a local high of 3.16 to 0.29, mirroring the February panic sell-off. Critically, the 90-day average never breached the threshold of 2, indicating the recent rally to $82k was a bear market bounce, not a structural shift. Realized losses surged to $1.35 billion daily, with $770 million coming from Long-Term Holders selling at a loss. This accelerating redistribution of supply from weak to strong hands is a necessary but ongoing process for a market bottom. The rally stalled almost precisely at the aggregate cost basis (~$83k) of US spot Bitcoin ETF investors, turning that level into strong resistance and leaving the average ETF holder underwater again. Spot market flows have turned decisively negative, showing sellers are dominating order books despite the price drop. While a significant futures long liquidation event cleared over $400 million in leverage, providing a potential reset, sustained spot demand is yet to materialize. Options markets continue to price in higher future volatility (Implied Volatility) than recent price action (Realized Volatility) has shown, with a persistent skew towards put options, indicating ongoing demand for downside protection. In conclusion, multiple metrics point to a fragile market structure. Resistance at the ETF cost basis, accelerating realized losses, dominant spot selling, and cautious options pricing all suggest the bear market trend persists. A sustainable recovery likely requires a resurgence of spot demand, ETF holders returning to profit, and a clear reduction in selling pressure.

marsbitHace 16 min(s)

Has Bitcoin's 'Rebound Ended', Officially Entering the Late Bear Market Phase?

marsbitHace 16 min(s)

TechFlow Intelligence Agency: Anthropic Calls for Global Pause in AI Development While Preparing for Trillion-Dollar IPO; SpaceX IPO Roadshow Heats Up, But S&P 500 Rejects Fast-Track Inclusion

In today's TechFlow Intelligence Briefing, several major tech stories highlight a growing theme of trust and credibility gaps across AI, crypto, and finance. AI company Anthropic has publicly called for a global pause in AI development, citing risks from Claude's "recursive self-improvement." Ironically, this coincides with reports the company is preparing for a massive IPO targeting a near $1 trillion valuation. This perceived hypocrisy, coupled with widespread user complaints about Claude's declining performance, is sparking debate over whether the safety warning is genuine or a competitive tactic. Meanwhile, in a substantive security move, Anthropic open-sourced a framework for AI-powered vulnerability discovery. In the crypto market, Bitcoin's price drop below $61,000 triggered over $1.16 billion in liquidations, flipping the market into a state where more BTC is held at a loss than at a profit, a historical bearish signal. On the corporate front, SpaceX's highly anticipated IPO is generating immense Wall Street excitement, with Goldman Sachs projecting 100x revenue growth by 2030. However, the S&P 500 has refused to fast-track the company's inclusion post-IPO, potentially limiting immediate institutional demand. Separately, ByteDance's AI app Doubao lost over 6 million monthly active users after introducing a subscription model, highlighting the challenges of AI monetization. Other notable developments include Nvidia certifying HBM4 memory from Samsung, SK Hynix, and Micron; Cloudflare's acquisition of front-end tooling company VoidZero; and its CEO warning that bot traffic now exceeds human traffic online. The underlying narrative connects these events: a trust crisis. From AI firms' contradictory actions and crypto volatility to the clash between SpaceX's hyped narrative and institutional rules, a pattern is emerging where stated intentions and actual practices are increasingly misaligned.

marsbitHace 32 min(s)

TechFlow Intelligence Agency: Anthropic Calls for Global Pause in AI Development While Preparing for Trillion-Dollar IPO; SpaceX IPO Roadshow Heats Up, But S&P 500 Rejects Fast-Track Inclusion

marsbitHace 32 min(s)

Trading

Spot
Futuros

Artículos destacados

Cómo comprar BILL

¡Bienvenido a HTX.com! Hemos hecho que comprar Billions Network (BILL) sea simple y conveniente. Sigue nuestra guía paso a paso para iniciar tu viaje de criptos.Paso 1: crea tu cuenta HTXUtiliza tu correo electrónico o número de teléfono para registrarte y obtener una cuenta gratuita en HTX. Experimenta un proceso de registro sin complicaciones y desbloquea todas las funciones.Obtener mi cuentaPaso 2: ve a Comprar cripto y elige tu método de pagoTarjeta de crédito/débito: usa tu Visa o Mastercard para comprar Billions Network (BILL) al instante.Saldo: utiliza fondos del saldo de tu cuenta HTX para tradear sin problemas.Terceros: hemos agregado métodos de pago populares como Google Pay y Apple Pay para mejorar la comodidad.P2P: tradear directamente con otros usuarios en HTX.Over-the-Counter (OTC): ofrecemos servicios personalizados y tipos de cambio competitivos para los traders.Paso 3: guarda tu Billions Network (BILL)Después de comprar tu Billions Network (BILL), guárdalo en tu cuenta HTX. Alternativamente, puedes enviarlo a otro lugar mediante transferencia blockchain o utilizarlo para tradear otras criptomonedas.Paso 4: tradear Billions Network (BILL)Tradear fácilmente con Billions Network (BILL) en HTX's mercado spot. Simplemente accede a tu cuenta, selecciona tu par de trading, ejecuta tus trades y monitorea en tiempo real. Ofrecemos una experiencia fácil de usar tanto para principiantes como para traders experimentados.

233 Vistas totalesPublicado en 2026.05.07Actualizado en 2026.06.02

Cómo comprar BILL

Qué es ATWO

I. Introducción al ProyectoArena Two es una plataforma interactiva descentralizada que permite a los fanáticos jugar un papel activo y tokenizado en los resultados de eventos en tiempo real. A diferencia de los modelos de transmisión tradicionales que reducen a los fanáticos a espectadores pasivos, Arena Two aprovecha la tecnología blockchain para permitir que los fanáticos voten directamente en tiempo real e influyan en los resultados en el campo.II. Información del TokenNombre del token: ATWO (Arena Two)III. Enlaces RelacionadosSitio web: https://arenatwo.com/Exploradores: https://basescan.org/token/0x499D35eBE6cEe9B2Ac35Fd003fcBbeeB9CFc7B32Twitter: https://x.com/arenatwoXNota: La introducción del proyecto proviene de los materiales publicados o proporcionados por el equipo oficial del proyecto, que es solo para referencia y no constituye asesoramiento de inversión. HTX no se hace responsable de ninguna pérdida directa o indirecta resultante.

142 Vistas totalesPublicado en 2026.05.18Actualizado en 2026.06.02

Qué es ATWO

Cómo comprar ATWO

¡Bienvenido a HTX.com! Hemos hecho que comprar Arena Two (ATWO) sea simple y conveniente. Sigue nuestra guía paso a paso para iniciar tu viaje de criptos.Paso 1: crea tu cuenta HTXUtiliza tu correo electrónico o número de teléfono para registrarte y obtener una cuenta gratuita en HTX. Experimenta un proceso de registro sin complicaciones y desbloquea todas las funciones.Obtener mi cuentaPaso 2: ve a Comprar cripto y elige tu método de pagoTarjeta de crédito/débito: usa tu Visa o Mastercard para comprar Arena Two (ATWO) al instante.Saldo: utiliza fondos del saldo de tu cuenta HTX para tradear sin problemas.Terceros: hemos agregado métodos de pago populares como Google Pay y Apple Pay para mejorar la comodidad.P2P: tradear directamente con otros usuarios en HTX.Over-the-Counter (OTC): ofrecemos servicios personalizados y tipos de cambio competitivos para los traders.Paso 3: guarda tu Arena Two (ATWO)Después de comprar tu Arena Two (ATWO), guárdalo en tu cuenta HTX. Alternativamente, puedes enviarlo a otro lugar mediante transferencia blockchain o utilizarlo para tradear otras criptomonedas.Paso 4: tradear Arena Two (ATWO)Tradear fácilmente con Arena Two (ATWO) en HTX's mercado spot. Simplemente accede a tu cuenta, selecciona tu par de trading, ejecuta tus trades y monitorea en tiempo real. Ofrecemos una experiencia fácil de usar tanto para principiantes como para traders experimentados.

186 Vistas totalesPublicado en 2026.05.18Actualizado en 2026.06.02

Cómo comprar ATWO

Discusiones

Bienvenido a la comunidad de HTX. Aquí puedes mantenerte informado sobre los últimos desarrollos de la plataforma y acceder a análisis profesionales del mercado. A continuación se presentan las opiniones de los usuarios sobre el precio de A (A).

活动图片