Skip to content

AJsQuestions/ArbM8

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ArbM8

A simple but effective system for finding sure bet arbitrages across Polymarket and Kalshi for all soccer markets.

Overview

ArbM8 scans both Polymarket and Kalshi for soccer betting markets, matches equivalent markets across platforms, and identifies arbitrage opportunities where the combined implied probabilities are less than 1.0 (guaranteed profit).

Features

  • Dual Platform Support: Fetches markets from both Polymarket and Kalshi
  • Smart Market Matching: Matches equivalent markets across platforms using team names and dates
  • Arbitrage Detection: Identifies sure bet opportunities with guaranteed profit
  • Fee-Aware Calculations: Accounts for platform fees in profit calculations
  • Soccer-Focused: Filters to soccer/football markets only

Installation

# Create virtual environment
python3 -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

Configuration

Edit config.yaml to configure:

  • Platform settings (Kalshi environment, API endpoints)
  • Market filtering (keywords, date ranges)
  • Arbitrage detection thresholds (min profit, max combined probability)
  • Fee settings for both platforms

Usage

Basic Usage

# Find arbitrage opportunities
python -m arbm8.cli find

# Find with custom config
python -m arbm8.cli find --config custom_config.yaml

# Save to file
python -m arbm8.cli find --output arbitrages.csv

Advanced Usage

# Set minimum profit margin
python -m arbm8.cli find --min-profit 0.02  # 2% minimum

# Set maximum days ahead
python -m arbm8.cli find --max-days 14

# Verbose output
python -m arbm8.cli find --verbose

How It Works

  1. Market Collection: Fetches all open soccer markets from both Polymarket and Kalshi
  2. Market Matching: Matches equivalent markets (same teams, same date) across platforms
  3. Arbitrage Detection: For each matched market, calculates if there's an arbitrage opportunity:
    • Finds the best odds for each outcome across both platforms
    • Calculates combined implied probability
    • If combined probability < 1.0 (after fees), it's an arbitrage
  4. Profit Calculation: Calculates optimal stake allocation for maximum guaranteed profit
  5. Output: Generates CSV/JSON with all arbitrage opportunities

Output Format

The output includes:

  • Match details (teams, date, league)
  • Market identifiers (ticker/ID for both platforms)
  • Best odds for each outcome
  • Combined implied probability
  • Profit margin
  • Optimal stake allocation
  • Total profit potential

Requirements

  • Python 3.10+
  • Polymarket: ✅ No API keys needed! The CLOB API public endpoints (for reading markets/prices) don't require authentication.
  • Kalshi: ✅ No API keys needed! Reading market data works without authentication in demo mode.
  • Internet connection for API access

API Keys Summary

Polymarket:

  • No API keys required for reading market data
  • The public CLOB API endpoints are accessible without authentication
  • API keys are only needed if you want to place trades (which this system doesn't do)

Kalshi:

  • Optional for demo/unauthenticated access
  • Required for production/authenticated access

API Keys Summary

No API keys needed for this system!

Both Polymarket and Kalshi allow reading market data without authentication:

  • Polymarket: Public CLOB API endpoints (no auth needed)
  • Kalshi: Demo mode works without API keys for reading markets

Optional: You can set up Kalshi API keys if you:

  • Hit rate limits in demo mode
  • Want more reliable production access
  • Plan to add automatic order placement (future feature)

If you want to set up Kalshi keys anyway, create a .env file:

KALSHI_ENV=demo
KALSHI_KEY_ID=your_key_id_here  # Optional
KALSHI_PRIVATE_KEY_PATH=/path/to/private_key.pem  # Optional

Note: Since you're placing orders manually, API keys are not required.

Disclaimer

This software is for educational and research purposes only. Arbitrage opportunities may be limited by:

  • Market liquidity
  • Execution speed
  • Platform fees
  • Market closure timing

Always verify market conditions before placing bets. This is not financial advice.

License

MIT License

About

Kalshi-Polymarket cross venue arbitrage finder

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors