← back to Zero Code Trading Bot
assets/bot-template/README.md
34 lines
# <bot name> — a paper-first prediction-market bot
Scaffolded by the `zero-code-trading-bot` skill. **Paper mode by default — no keys, $0.**
## Run it
```bash
python venue_adapter.py # sanity check: pull ~50 live Polymarket markets
python bot.py --once --dry-run # decide, place NO fills (safest first run)
python bot.py --once # one cycle, records paper fills to data/ledger.jsonl
python bot.py --loop # run continuously every strategy.poll_seconds
python dashboard.py # print paper P&L
python dashboard.py --serve # live-refreshing P&L page on a free localhost port
```
## The strategy lives in `strategy.json`
Plain-English rules compiled to declarative filters + entry/exit expressions.
Edit it directly, or ask Claude ("change the take-profit to 20c"). Variables a
rule may use: `price`, `volume_usd`, `liquidity_usd`, `spread`, `days_to_resolve`.
## Safety
- **Paper is the default.** `mode: "paper"` writes simulated fills only.
- **Kill switch:** `touch data/KILL` halts all new entries immediately (exits still run).
- **Circuit breaker:** trips at `risk.max_daily_loss_usd`.
- **Live is gated.** See `../references/safety-model.md`. Going live is a Steve-only
step — it requires `LIVE=1`, `SAFE_MODE=0`, a `data/LIVE_CONFIRMED` token, a real
broker key, a wired order call, and a go-live approval memo.
Files: `bot.py` (runner) · `strategy.json` (rules) · `venue_adapter.py` (read-only
market data) · `executor.py` (paper vs gated-live) · `ledger.py` (append-only P&L)
· `safe_eval.py` (sandboxed rule evaluator) · `dashboard.py` (P&L viewer).