The whole bot, safe by default.
The first archive buyers receive. It trades Polymarket's short crypto Up or Down markets, starts in paper mode, and ships with the account protection, Telegram reports and automatic payouts listed below. Everything is plain Python you can read and change.
# Paper trading is the default: real order books, no orders sent POLYMARKET_DRY_RUN=true # Account protection, in dollars MAX_DAILY_LOSS=100 # stop for the day after this loss MAX_EXPOSURE=400 # pause new buys at this much in open windows # Reports and alerts on your phone TELEGRAM_BOT_TOKEN= TELEGRAM_CHAT_ID=
Trading
- Four markets out of the box: 5-minute Up or Down on Bitcoin, Ethereum and Solana, and 15-minute on Bitcoin.
MARKETSpicks which of them run. - Buys both sides of a window through the window and holds them to settlement. It never sells.
- One setting,
BUDGET_SCALE, scales every position up or down. - Live orders go through Polymarket's CLOB v2 client, straight from your own machine.
Paper mode
- On by default. The bot works against the real order book and the real trade feed, sends no orders, and settles each window with Polymarket's own result.
- Every taker fee is charged at the market's rate, and
TAKER_REBATE_PCTapplies your own taker rebate tier to the net it reports. python3 main.py --reportsums up the settled windows: turnover, fees, profit before and after fees, and a line per market.
Account protection
- Daily loss limit: past it the bot cancels its orders, stops buying and messages you. The stop survives a restart, and the bot resumes the next UTC day or waits for you, as you choose.
- Exposure cap: new buys pause while the money in windows that haven't settled is at your ceiling.
- Manual stop: one file in the data folder stops all buying until you delete it.
- A status file, refreshed every ten seconds, with the mode, open windows, exposure and the day's result, for your own monitoring.
Reports and payouts
- Telegram messages for start and stop, every limit that trips, redeemed winnings, and an hourly digest with the windows, turnover, fees and P&L.
- In live mode, winning shares are redeemed for USDC automatically, checked every minute. It works with email, browser-wallet and plain key accounts; keep a little POL on the key's address for gas.