What Is Polymarket–Kalshi Arbitrage Bot?
Polymarket–Kalshi Arbitrage Bot is a prediction market arbitrage bot built by Composio-HQ that watches Polymarket CLOB and Kalshi order books, then decides when to buy on Polymarket using two explicit rules. It is one of the best Prediction Market Arbitrage Bots tools for quant traders and indie algo developers because it focuses on 15-minute markets, waits for a configurable 8-minute start delay, and surfaces price gaps as actionable signals instead of burying them in a dashboard.
The repo is aimed at developers who want a small TypeScript service rather than a black-box trading platform. It uses HTTP polling, configurable thresholds, and optional on-chain order placement, which makes it easier to audit than a bundled SaaS bot.
Quick Overview
| Attribute | Details |
|---|---|
| Type | Prediction Market Arbitrage Bots |
| Best For | quant traders, indie hackers, and market-making engineers |
| Language/Stack | Express, TypeScript, Axios, Polymarket CLOB, ethers.js, dotenv |
| License | N/A |
| GitHub Stars | N/A as of Feb 2026 |
| Pricing | Open-Source |
| Last Release | N/A |
Who Should Use Polymarket–Kalshi Arbitrage Bot?
- Prediction-market quants who want a deterministic spread scanner for 15-minute event markets and do not want to hand-check both venues every few seconds.
- Indie hackers building a niche trading workflow who need a small Express service, a few env vars, and a clean decision engine instead of a multi-service stack.
- Market-making engineers who care about execution timing, start windows, and cross-venue price consistency more than UI polish.
- Automation-first operators who want a signal endpoint they can wire into alerts, execution jobs, or a broader trade controller.
Not ideal for:
- Long-horizon investors who want portfolio analytics, charting, or discretionary research rather than event-driven arb logic.
- Teams that need institutional risk controls such as position netting, multi-leg hedging, or post-trade reconciliation out of the box.
- Users without exchange access because Polymarket and Kalshi credentials, wallet setup, and market identifiers are required.
Key Features of Polymarket–Kalshi Arbitrage Bot
- Real-time price polling — The bot fetches UP/DOWN or YES/NO prices from both venues on a configurable interval using Axios. The polling cadence is controlled by
POLL_INTERVAL_MS, so you can run it at 5-second cadence or slower depending on rate limits and latency tolerance. - Start-window gating — It ignores early noise and only evaluates signals after
START_DELAY_MINS, which defaults to 8 minutes after market start. That matters in 15-minute markets because the first few minutes often contain stale quotes, thin liquidity, and mismatched market status. - Spread-rule detection — The primary trigger fires when Kalshi YES is in the 93–96 cent band and Polymarket UP is at least 10 cents cheaper. That gives you a simple, auditable signal model instead of an opaque scoring function.
- Late-resolution logic — A second trigger fires when Kalshi has already finished or settled but Polymarket is still open and liquid. This is a timing arb pattern, not a pure price arb, and it exists because settlement timing can create a temporary edge even when quoted prices look close.
- Optional order placement — When trading is enabled, the bot uses
@polymarket/clob-clientplusethersto place orders on Polymarket. That keeps execution inside the same service that computed the signal, which reduces glue code and makes failure modes easier to inspect. - Typed configuration surface — All behavior is controlled through
.envvalues such as ticker, token IDs, chain ID, trade size, and buy cooldown. This makes it trivial to pin a reproducible configuration for a specific market, and it is a better fit for infra-managed deployments than hard-coded constants. - HTTP API for observability — The service exposes
/health,/status,/poll/start, and/poll/stop, so you can wire it into a larger system or inspect it from a terminal. If you care about polling latency and decision timing, pairing it with OpenTrace makes the signal path much easier to inspect.
Polymarket–Kalshi Arbitrage Bot vs Alternatives
| Tool | Best For | Key Differentiator | Pricing |
|---|---|---|---|
| Polymarket–Kalshi Arbitrage Bot | Event-driven Polymarket vs Kalshi spread scanning | Opinionated 15-minute market rules with optional Polymarket execution | Open-Source |
| Custom Python spread script | Teams that want bespoke logic and rapid experimentation | Full control over data models, risk checks, and execution flow | Free |
| Manual monitoring + alerts | Traders who only need a basic signal feed | Lowest setup cost, but no automated decision engine | Free |
| Polymarket CLOB + Kalshi Trade API integration | Builders assembling a larger trading stack | Raw APIs with no opinionated arb rules | Free |
Pick Polymarket–Kalshi Arbitrage Bot when you want a ready-made decision engine for one narrow market pattern and you do not want to design the signal logic from scratch. Pick a custom Python spread script if you need deeper backtesting, portfolio netting, or more sophisticated execution rules than this repo provides.
Choose manual monitoring + alerts only if your workflow is mostly discretionary and you want to watch the market without automating trades. Choose Polymarket CLOB + Kalshi Trade API integration if you are building a platform product or a broader execution layer where this repo would become just one module.
If you want to automate deployment, restarts, and environment promotion around the bot, djevops is a better fit for the infra side than adding more logic to the trading service itself. For secure credential handling in a larger system, MachineAuth pairs well with this bot because the strategy is only useful when wallet and API keys stay controlled.
How Polymarket–Kalshi Arbitrage Bot Works
The architecture is intentionally simple: an Express server owns a polling loop, fetches live market data from both venues, evaluates a small set of rules, and emits a structured signal. That means the core abstraction is a price snapshot with fields like Kalshi YES cents, Polymarket UP cents, spread cents, and market status, which is enough to make the strategy deterministic and easy to test.
The design philosophy is closer to a signal engine than a full trading terminal. Instead of modeling a broad book of assets, the bot watches one market at a time, compares two venues, and delays evaluation until the market reaches a usable state. That makes the code path easier to reason about when latency spikes, one API lags, or liquidity disappears.
npm install
cp .env.example .env
npm run build
npm start
curl http://localhost:3000/status
The command sequence installs dependencies, copies the environment template, builds the TypeScript service, and starts the server. After that, /status returns the latest Polymarket and Kalshi prices, whether the start window has passed, and the current arbitrage signal, which is the minimum surface you need before wiring execution or alerts into a larger system.
When trading is enabled, the Polymarket execution path uses the configured wallet, proxy wallet address, and Polygon chain ID 137 to submit orders on CLOB. If you need to trace how long each poll takes or where the delay appears, add request-level tracing with OpenTrace before you start changing the signal rules.
Pros and Cons of Polymarket–Kalshi Arbitrage Bot
Pros:
- Small, readable strategy surface — Two primary buy rules are easier to audit than a probabilistic scorer or ML-based signal engine.
- Low integration overhead — Express, Axios, dotenv, and TypeScript are mainstream pieces that most backend developers already know.
- Works with live market status — The bot checks both price and market state, which matters for late-resolution opportunities.
- Config-driven behavior — Thresholds, delays, and trade sizing live in
.env, so you can test one market without changing the code path. - Optional execution — You can run it as a signal-only service first, then enable Polymarket order placement once you trust the output.
- Easy to deploy in containers — The service shape is simple enough for Docker or a small VM, especially if you already automate releases with djevops.
Cons:
- No deep risk engine — The repo does not expose portfolio limits, exposure netting, or cross-market hedging logic.
- No built-in backtester — Historical validation must be added separately if you want to measure edge decay or false positives.
- Single-strategy focus — It is tuned for one market pattern, so it is not a general prediction-market OMS.
- API dependency risk — If Kalshi or Polymarket rate-limit, change payloads, or delay status updates, the signal quality degrades.
- Liquidity assumptions are thin — The late-resolution rule depends on live liquidity being present, so thin books can produce misleading signals.
Getting Started with Polymarket–Kalshi Arbitrage Bot
git clone https://github.com/Composio-HQ/polymarket-kalshi-arbitrage-bot.git
cd polymarket-kalshi-arbitrage-bot
npm install
cp .env.example .env
# set MARKET_START_TIME, KALSHI_TICKER, POLYMARKET_TOKEN_UP, POLYMARKET_TOKEN_DOWN
# set POLYMARKET_PRIVATE_KEY and POLYMARKET_PROXY_WALLET_ADDRESS
npm run dev
This starts the service in watch mode so you can change thresholds and rerun without rebuilding each time. After the first boot, hit GET /health to confirm the server is alive and GET /status to verify that your market identifiers, timing window, and buy rules are wired correctly.
Before you enable live trades, make sure the wallet address, private key, and chain ID line up with the Polymarket market you selected. If your deployment needs stricter secret handling, keep the environment file out of source control and store credentials in a separate secret manager rather than embedding them in the bot.
Verdict
Polymarket–Kalshi Arbitrage Bot is the strongest option for event-driven prediction market spread scanning when you already know the exact market and want a small TypeScript service instead of a generic trading platform. Its best strength is explicit rule-based signal generation; the main caveat is that execution, risk management, and backtesting still need work. Use it if you want a fast, auditable starting point for Polymarket-vs-Kalshi arb.



