The most advanced self-contained trading bot for Polymarket. Runs 24/7 with zero human intervention. Learns and adapts continuously.
- 10 Trading Strategies with take profit & stop loss
- Fully Autonomous - zero human intervention required
- Multi-Layer Risk Management - hard-coded, cannot be overridden
- Self-Learning - adapts parameters, detects regimes, extracts skills
- Self-Healing - auto-restart on crash, auto-update from GitHub
- Telegram Integration - real-time alerts and command control
- One-Command Install - deploy in under 5 minutes
curl -fsSL https://raw.githubusercontent.com/kevinleestites2-dev/Open-trade-/main/install.sh | bash| # | Strategy | Description | Take Profit | Stop Loss |
|---|---|---|---|---|
| 1 | Dump-and-Hedge | Detect 15% drops in crypto 15-min markets, buy dumped side | 5% | 10% |
| 2 | YES+NO Arbitrage | Buy both sides when YES+NO < 0.99 | 1-3% | 5% |
| 3 | Yield Farming LP | Limit orders both sides, earn USDC rewards | Daily | 10% |
| 4 | Maker Rebate MM | Capture spread + 20-25% taker fee rebates | Per fill | 10% |
| 5 | Copy Trading | Follow top wallets (RN1, Domer, ColdMath) | 5-10% | 10% |
| 6 | Grid Trading | Laddered orders at 5-10 price levels | Per grid | 10% |
| 7 | Flash Loan Arb | Aave V3 flash loan for cross-platform arb | Atomic | None |
| 8 | Grind Trading | High-frequency small profits (0.5-2%) | 0.5-2% | 10% |
| 9 | Day Trading Momentum | Follow trend in first 2-3 minutes | 3-5% | 10% |
| 10 | Mean Reversion | Bet on reversal when price overextends | 2-4% | 10% |
These limits cannot be overridden by any strategy, optimizer, or parameter:
| Limit | Value | Action |
|---|---|---|
| Stop Loss per trade | 10% | Exit immediately |
| Daily Loss Limit | 5% | Pause 24 hours, auto-resume |
| Drawdown from Peak | 25% | Emergency halt, notify, wait 1 day |
| Total Loss Halt | 40% | Permanent stop, manual restart required |
| Position Size Risk | 5% max | Per-trade limit |
| Market Exposure | 20% max | Per-market cap |
| Strategy Exposure | 50% max | Per-strategy cap |
| Consecutive Losses | 3 | Pause strategy 10 minutes |
Every trade is logged with: timestamp, strategy, P&L, market conditions (volatility, volume, time of day), execution latency, slippage, fee paid.
Every hour, the bot calculates rolling 24h P&L per strategy and reallocates capital proportionally.
After every 20 trades per strategy, tests small parameter variations and deploys the best-performing set.
Classifies market state every 15 minutes:
- High/Low Volatility (BTC move >2% = high)
- Trending/Ranging (momentum ratio proxy for ADX >25)
- High/Low Liquidity (order book depth)
Switches strategy weights based on detected regime.
When a trade wins by >10%, extracts the exact setup (parameters, market conditions, entry signals) as a reusable skill saved to skills/.
For every losing trade, logs the reason. If same reason appears 3+ times in 24 hours, automatically adjusts parameters or pauses the responsible strategy.
- Python 3.10+
- Polygon wallet with USDC
- Polymarket API credentials (get from https://polymarket.com)
- Telegram bot token (optional, for alerts)
git clone https://github.com/kevinleestites2-dev/Open-trade-.git
cd Open-trade-
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
# Edit .env with your credentials
python3 trade.py --simulate --check-configEdit .env with your credentials:
PRIVATE_KEY=your_polygon_private_key
PROXY_WALLET_ADDRESS=your_proxy_wallet
POLYMARKET_API_KEY=your_api_key
POLYMARKET_API_SECRET=your_api_secret
POLYMARKET_API_PASSPHRASE=your_passphrase
TELEGRAM_TOKEN=your_bot_token
TELEGRAM_CHAT_ID=your_chat_id
INITIAL_CAPITAL=1000python3 trade.py --simulatepython3 trade.pypython3 trade.py --check-configpython3 trade.py --capital 5000sudo systemctl start zeus-prime
sudo systemctl stop zeus-prime
sudo systemctl status zeus-prime
sudo journalctl -u zeus-prime -f| Command | Description |
|---|---|
/status |
Current equity, P&L, positions, regime |
/strategies |
All strategy weights, win rates, P&L |
/pause |
Pause all trading |
/resume |
Resume all trading |
- Trade execution (strategy, size, price, P&L)
- Take profit hit
- Stop loss triggered
- Daily P&L summary (08:00 UTC)
- Weekly performance report (Monday 08:00 UTC)
- Circuit breaker triggers
- Bot start/stop/restart
- Errors
- Low balance (<$100)
trade.py # Main bot (all logic)
├── Config # Environment configuration
├── Database # SQLite trade logging
├── PolymarketClient # CLOB API + order signing
├── WebSocketManager # Real-time market data
├── RiskManager # Multi-layer risk control
├── TelegramBot # Alerts & commands
├── RegimeDetector # Market state classification
├── ParameterOptimizer # Adaptive parameter tuning
├── SkillExtractor # Winning trade extraction
├── FailureReflector # Loss analysis & adjustment
├── AutonomyEngine # Strategy orchestration
├── 10 Strategy Classes # Trading logic
└── OpenTradeBot # Main orchestrator
- WebSocket:
wss://ws-subscriptions-clob.polymarket.com/ws/(no REST polling) - Fee-aware signing:
feeRateBpsincluded in all signed orders - Live fee query:
GET /fee-rate?tokenID={token_id}before every order - Sub-100ms cancel/replace loop
- Multi-asset: BTC, ETH, SOL, XRP 15-min + all markets >$50k volume
- Proxy wallet:
signature_type=2with funder address - Native USDC only:
0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359on Polygon
Open-trade-/
├── trade.py # Main bot (all strategies + infrastructure)
├── install.sh # One-command installer
├── requirements.txt # Python dependencies
├── .env.example # Configuration template
├── README.md # This file
├── skills/ # Extracted winning skills (JSON)
│ └── .gitkeep
└── logs/ # Trade logs and error logs
└── .gitkeep
- Check
.envconfiguration:python3 trade.py --check-config - Ensure Python 3.10+:
python3 --version - Check logs:
cat logs/open_trade_*.log
- Verify USDC balance in proxy wallet
- Check API credentials are correct
- Run in simulate mode first:
python3 trade.py --simulate - Check Telegram for error alerts
- The bot has hard-coded 10% stop loss per trade
- Daily loss limit (5%) will auto-pause for 24h
- 25% drawdown triggers emergency halt
- Check if a strategy is underperforming:
/strategiesin Telegram
The bot auto-reconnects with exponential backoff (1s → 60s max). Check your network connectivity and Polygon RPC endpoint.
Ensure the git remote is accessible. The bot checks daily and pulls from main branch.
- Private keys are stored in
.env(never committed) - All orders are signed locally before submission
- Proxy wallet architecture (funds in proxy, not EOA)
- No external dependencies that phone home
- All risk limits are hard-coded and immutable at runtime
MIT License. Use at your own risk. This is experimental trading software. Past performance does not guarantee future results. Always start with simulation mode.