Skip to content

WSOL12/Polymarket-Kalshi-Arbitrage-Trading-Bot-BTC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cross-Platform Price Discrepancy Scanner

License Python Next.js

A system for detecting pricing inefficiencies across two prediction exchanges in the hourly Bitcoin outcome market.

What This Does

The scanner continuously compares bid-ask data from two platforms. When the combined cost of taking opposite sides on the same outcome falls below the settlement value, a profitable spread exists.

Architecture:

  • API service written in Python with FastAPI
  • Web interface built with Next.js and Tailwind CSS

Background on the underlying math is in thesis.md.

Capabilities

  • Continuous price polling at one-second intervals
  • Automatic alignment of markets across platforms using strike price
  • Spread detection when total cost is under one dollar
  • Browser dashboard with live price feeds and cost breakdowns
  • Support for both directional combinations (e.g. Down+Yes, Up+No)

Dependencies

  • Python 3.9 or newer
  • Node.js 18 or newer
  • npm or yarn

Setup

Clone the repository and enter its directory:

git clone <repository-url>
cd polymarket-kalshi-btc-arbitrage-bot

Backend:

cd backend
pip install -r requirements.txt

Frontend:

cd frontend
npm install

Running the System

Start both services.

Backend (from backend/):

python3 api.py

Runs at http://localhost:8000.

Frontend (from frontend/):

npm run dev

Runs at http://localhost:3000.

Workflow

  1. Fetches the current hourly Bitcoin Up/Down market from the first platform.
  2. Locates the matching market on the second platform.
  3. Maps prices to a normalized 0.00–1.00 scale.
  4. Compares strike prices:
    • If first platform strike is higher: evaluates Down + Yes.
    • If first platform strike is lower: evaluates Up + No.
  5. Sums the two leg costs. A total below $1.00 indicates an opportunity.

Contributing

Pull requests are accepted. Standard flow:

  1. Fork the repository
  2. Create a branch
  3. Commit and push
  4. Open a pull request

License

MIT License. See LICENSE for details.


Disclaimer: Do not run this project. This software is provided for educational and informational purposes only.

About

Cross-platform scanner for Polymarket and Kalshi that finds arbitrage opportunities in hourly Bitcoin prediction markets.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages