explaingit

defi-ape/polymarket-kalshi-arbitrage-bot

Analysis updated 2026-05-18

111TypeScriptAudience · developerComplexity · 3/5Setup · moderate

TLDR

A TypeScript bot that watches Polymarket and Kalshi prediction markets for price gaps between the same event and can auto-buy on Polymarket when a gap appears.

Mindmap

mindmap
  root((repo))
    What it does
      Watches two markets
      Flags price gaps
      Optional auto buy
    Tech stack
      TypeScript
      Node.js
    Use cases
      Monitor price gaps
      Automate trades
    Audience
      Traders
      Developers
    Setup
      Env variables
      Optional wallet keys

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Monitor Polymarket and Kalshi for the same event priced differently.

USE CASE 2

Get an automatic buy signal when a pricing gap crosses a threshold.

USE CASE 3

Run a status endpoint to check current prices and active signals.

USE CASE 4

Enable live automated trading once wallet credentials are configured.

What is it built with?

TypeScriptNode.js

How does it compare?

defi-ape/polymarket-kalshi-arbitrage-botbroady/claude2streamplacenl2026/okx-agent-trade-kit
Stars111111111
LanguageTypeScriptTypeScriptTypeScript
Setup difficultymoderateeasymoderate
Complexity3/52/53/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Needs Node.js 18+ and market ID env vars, live trading also needs a funded Polymarket wallet.

In plain English

This is an automated trading bot written in TypeScript that watches two prediction market platforms, Polymarket and Kalshi, and looks for moments when the same event is priced differently on each platform. When a pricing gap large enough to be worth acting on is detected, the bot can automatically place a buy order on Polymarket. Prediction markets let people bet on the outcome of real-world events, like whether a certain index will be up or down by the end of a 15-minute window. Both Polymarket and Kalshi run these short-duration markets, but because they have different user bases and order books, their prices for the same outcome sometimes diverge. This bot tries to profit from that divergence. The strategy has two rules. The first checks whether Kalshi is pricing a YES outcome between 93 and 96 cents, while Polymarket is pricing the equivalent outcome at least 10 cents cheaper. If both conditions are true after a configurable delay from market open, the bot flags the market as a buy opportunity on Polymarket. The second rule watches for the case where Kalshi has already settled or closed a market while Polymarket still has an active order book, which can occasionally create a late entry opportunity. The bot runs as a small web server with a status endpoint that reports the current pricing from both platforms and whether a buy signal is active. Trading execution is optional: if you configure a Polymarket wallet and API credentials in the environment file, the bot will place orders automatically. If you leave those credentials out, it only monitors and reports signals. Setup requires Node.js 18 or later and a few environment variables: the Kalshi and Polymarket market identifiers for the pair you want to monitor, and optionally your Polymarket wallet details for live trading. The bot is designed to run continuously on a server, a container, or any cloud instance. The README includes a disclaimer that prediction market trading carries real financial risk, and that the bot does not guarantee profit.

Copy-paste prompts

Prompt 1
Explain how the two arbitrage rules in this bot decide when to flag a buy opportunity.
Prompt 2
Walk me through setting up the environment variables needed to run this bot in monitor-only mode.
Prompt 3
Show me how to add a Polymarket wallet so this bot can place live trades.
Prompt 4
Help me deploy this bot to run continuously on a small cloud server.

Frequently asked questions

What is polymarket-kalshi-arbitrage-bot?

A TypeScript bot that watches Polymarket and Kalshi prediction markets for price gaps between the same event and can auto-buy on Polymarket when a gap appears.

What language is polymarket-kalshi-arbitrage-bot written in?

Mainly TypeScript. The stack also includes TypeScript, Node.js.

How hard is polymarket-kalshi-arbitrage-bot to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is polymarket-kalshi-arbitrage-bot for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.