PR&R Up/Down Crypto Bot
An open-source trading bot for Polymarket's rolling crypto up/down markets. It reads real coin prices, runs two built-in strategies, and executes hands-free through your own wallet — with paper trading on by default.

What the bot does
Polymarket runs rolling “will BTC (or ETH, SOL, XRP…) be UP or DOWN at the end of this window?” markets on 5-, 15-, and 60-minute cycles. Each side is a token priced between $0 and $1 — read it as cents and as an implied probability. If your side wins at the end of the window, each share pays out $1. The bot watches these markets and places trades on them for you.
Streams live Polymarket up/down markets — prices, order books and time remaining — for every coin and timeframe.
Reads real coin prices from Chainlink and Coinbase and measures how far each coin has moved since the round opened.
Runs your chosen strategy against every tick, checking direction, spread and timing before it commits.
Places the order through your own wallet via one gateway, then writes every trade to local logs — no external database.
The two strategies it can run
A strategy is how the bot enters the market and makes money. There are exactly two — one that waits for near-certainty, one that works a price band. Everything else (stop loss, sizing, feeds) is a feature that supports them.
Expiry Sniper
Waits until a market is almost over and one side is almost certain, then buys that near-certain side and holds to the $1 payout. Its edge is time decay — with seconds left, there's little room to reverse.
- Enters only in the final minutes (default ≤ 180s left)
- Buys inside a tight probability band (94–99¢)
- Checks spread, volatility and price-feed direction first
- One order per coin per cycle
Scalper
Buys a token the moment its ask drops inside your price band, auto-detects the fill, then sells as soon as the bid reaches your gain target. The simplest way to work short-term moves.
- You set the entry band + exit gain (e.g. buy 40–55¢, +6¢)
- Fill-or-kill orders — nothing parks on the book
- Automatic fill detection — no clicking
- Exits on target, or resolves at expiry
What else it does
The strategies decide when to trade; these features control how, protect the downside, and keep you in command.
An automatic emergency exit that cuts a losing high-entry position before the market resolves — recovering cents on the dollar instead of riding it to zero. Off by default; enable it when your strategy needs it.
Sizes each order from how far the coin has moved since the cycle opened, using a delta→dollar bracket table — and vetoes trades that fight the price-feed direction.
Every order is simulated and tagged [PAPER] until you explicitly flip to live. Watch the full lifecycle — entry, fill, resolution P&L — at zero risk.
Chainlink Data Streams (matches Polymarket settlement), Coinbase, Binance, or the PR&R Prices API — switch live, with automatic fallback to whatever's up.
Reach Polymarket directly over an EU VPN, or route through your own AWS relay with no VPN needed — one setting, and the affected engines restart themselves.
Tail any engine's reasoning in real time — indicator readings, why it did or didn't enter, fills and errors — right from the dashboard.
Export your entire setup — credentials, every engine setting, bet sizing, price source — as one JSON file, and import it on another machine.
Choose which coins the bot may enter and let it trade 15m but not 1h. Your own UP/DOWN clicks always work regardless.
Everything runs from one screen
The whole bot is one Next.js screen: an engine control sidebar, a live up/down market grid you can click to trade, and a live P&L panel — plus a real-time log viewer, a one-time welcome tour, and export/import of your config.
Paper trading is on by default
This is software that places real bets if you tell it to. Every default is set so nothing real happens by accident.
Paper-trading on by default
Nothing real moves until you choose to. Going live takes a deliberate, confirmed toggle.
Self-hosted — your keys stay yours
Runs on your machine. Orders sign with your wallet through one local gateway; nothing is custodial.
Open source, MIT licensed
Every strategy, gate and setting is readable. No black box, no locked Discord, no altered screenshots.
One gateway, one switch
All order placement flows through a single /api/trade route — paper vs live is one source of truth.
Tune the settings from historical data
The bot's most important knobs — per-coin delta triggers and the stop-loss floor — shouldn't be guessed. Measure what actually happened in historical cycles, then set the values from the data.
- Pull the dataDownload PR&R historical records of Polymarket cycles.
- Measure what happenedAsk a coding agent to count how often each coin hit an X% move and then reversed.
- Build the tableTurn those counts into per-coin delta brackets and a stop-loss floor.
- Set the knobsEnter the values in the dashboard — decisions from data, not hunches.
| Delta move | Bet | Label |
|---|---|---|
| 0.030 – 0.050% | $5 | Minimal |
| 0.075 – 0.100% | $7 | Low-Med |
| 0.100 – 0.133% | $8 | Medium |
| 0.175 – 0.225% | $10 | High |
| 0.400 – 0.550% | $18 | Very Strong |
| 0.550%+ | $20 | Maximum |
Ships with pre-analyzed knowledge banks — roughly 6,600 cycles each for BTC, ETH, SOL and XRP — as a worked example, so you can see the workflow end to end before running it on fresh data.
Six engines that talk over Redis
The bot isn't one program — it's a small team of independent engines that never call each other directly. They talk over a Redis message bus, so you can start, stop or restart one without touching the others.
Extend it live. Import .zip plugins that add engines, gates (entry vetoes) and settings — installed from the dashboard with no rebuild and no restart of the rest of the fleet.
What you need to run it
| Thing | Need | What it’s for |
|---|---|---|
| Polymarket + USDC | Required | The venue you trade on, and your funds (USDC on Polygon). |
| Dedicated wallet key | Required | Signs your orders — use a brand-new MetaMask account, never one holding assets you care about. |
| Redis | Required | The pub/sub bus every engine talks over. |
| EU VPN or AWS relay | Required | Polymarket geoblocks non-EU IPs — pick one. |
| Chainlink Data Streams key | Optional | 1-second price feeds for the signals; Coinbase works without it. |
- Create your accountSign up and connect your Discord to unlock the download.
- Install & run in paper modeFollow the docs to install dependencies and start the dashboard — paper trading is already on.
- Configure & tuneAdd your credentials, pick coins and timeframes, and set your strategy from the data.
- Go live carefullyWhen the bot's decisions look right, flip to live and start small.
Ready to run it?
Create your account, connect Discord, and download PR&R Up/Down Crypto Bot. Read the full documentation for install, configuration, and the data-tuning workflow.
