Updates

Changelog

Stay up to date with the latest changes, features, and improvements to the Polymarket trading script.

No spam — we only email for notable releases. Buyers also get Telegram updates.

  • v1.7.0

    CLOB v2, WebSocket quoting, and live safety rails

    Polymarket retired the original CLOB, so live orders now go through the v2 client. Alongside that, a new WebSocket engine re-quotes on every book update instead of polling once per cycle, paper fills model the real order queue, and live runs get hard caps that read positions from the exchange rather than from local bookkeeping.

    # Live safety rails, USDC defaults
    # halt once realized loss exceeds:
    LIVE_MAX_DAILY_LOSS=25
    # freeze new buys at this exposure:
    LIVE_MAX_EXPOSURE=50
    # seconds between cancel/replace:
    LIVE_CANCEL_SEC=3
    
    # CLOB v2 signing wallet:
    # 1 = email / Magic proxy wallet
    # 2 = browser wallet
    POLYMARKET_SIG_TYPE=1
    
    # WebSocket engine, same .env:
    #   python ws_engine.py
    # live data, log orders, no posts:
    #   WS_LIVE_SHADOW=true

    New

    • Live execution moved to Polymarket CLOB v2. The archived v1 endpoint now rejects orders with an “invalid order version” error, so auth, order posting and cancels go through the v2 client. Paper mode is untouched.
    • WebSocket engine (ws_engine.py): order books arrive by push and every update re-evaluates quotes, with a 250 ms per-market floor and a 500 ms ticker for quiet markets. Discovery, settlement and saves run as background tasks, and WS_LIVE_SHADOW=true runs the full live path while logging every order instead of posting it.
    • Live kill switch and exposure cap: LIVE_MAX_DAILY_LOSS cancels every open order, stops posting, sends a Telegram alert and writes a LIVE_HALT file that survives restarts; LIVE_MAX_EXPOSURE freezes new buys once the USDC committed across open markets reaches the cap.
    • CONTRA strategy mode: accumulates the dipped side with a maker ladder while BTC spot stays within a few dollars of the window open, takes profit into the bounce and locks Up+Down pairs below $0.93 combined. Tunable through CONTRA_* variables; expect long losing streaks by design.
    • Hourly Telegram digest (tg_report.py): realized P&L, markets won and lost, and average win and loss for each running bot. Read-only, so it never races the bot's own portfolio saves.
    • Benchmark scripts pull any wallet's activity from the public data API and score your paper or live run on the same metrics as the reference trader: taker share, edge per share, heavy-side win rate.

    Updated

    • Live stake caps now read positions and spend from the exchange every cycle and fail closed: if the fetch fails, nothing new is posted that cycle.
    • Paper fills model the real L2 queue: taker orders consume displayed liquidity level by level at VWAP, resting orders wait behind the size already at their price, and real taker prints fill them in price-time order. Partial fills show in the log.
    • Maker mode posts a standing bid ladder that keeps its queue position instead of chasing the best bid, with a side-ratio guard, re-price hysteresis, a price band and a queue-jump rule. All of it is tunable through MAKER_* variables.
    • POLYMARKET_SIG_TYPE selects the signing wallet type (1 for email or Magic proxy wallets, 2 for browser wallets), and order sizes round up to the CLOB minimum of 5 shares.

    Bug fixes

    • A 15-second socket timeout now also covers the CLOB client's own calls, which issue requests without one. A single stalled TCP connection had frozen a run for 12 hours with the process still alive.
    • SIGHUP is ignored, so a dropped SSH session no longer kills a bot started in the foreground.
    • The WebSocket engine subscribes to the next window before it opens, so the first seconds of a window are no longer lost to market discovery.
    #clob-v2#websocket#risk#live
  • v1.6.0

    Small-capital runs and clearer sizing

    This release makes it easier to start with a modest balance. Position sizing scales cleanly from a single parameter, the logs now show what each cycle will risk before it commits, and low-balance runs stop guessing when there isn't enough to cover a full window.

    New

    • TRADE_SCALE parameter lets you run the exact same logic at a fraction of the default budget—start around $200 and scale up when you're ready.
    • Pre-cycle sizing line in the logs shows the intended stake and remaining balance before any order goes out.
    • Low-balance guard skips a window instead of submitting an underfunded position, with a one-line reason in the log.

    Updated

    • Default budget knobs documented alongside TRADE_SCALE so the relationship between full-capacity and scaled runs is obvious.
    • Status endpoint now reports the active scale factor next to the existing P&L and uptime fields.

    Bug fixes

    • Rounding fix so scaled position sizes never exceed the balance actually available in the wallet.
    #sizing#capital#operator
  • v1.5.0

    Rock-solid VPS uptime and unattended runs

    This release is all about leaving the bot running on a VPS and not thinking about it. Long sessions stay alive through network blips, the process recovers on its own after transient failures, and memory stays flat over multi-day runs.

    New

    • Auto-reconnect with backoff: dropped API or websocket connections recover without restarting the process.
    • Optional systemd unit example so the loop comes back up automatically after a reboot or crash.
    • Heartbeat line in the logs every cycle so you can confirm the bot is alive at a glance over SSH.

    Updated

    • Steadier memory profile on long-running VPS sessions—no slow climb over multi-day runs.
    • Status endpoint now reports uptime and last-cycle timestamp alongside the existing P&L fields.

    Bug fixes

    • Fixed a rare hang where a stalled HTTP call could freeze the loop instead of timing out and retrying.
    • Cleaner shutdown on SIGTERM so restarts don't leave a half-written portfolio trace.
    #stability#vps#uptime
  • v1.4.0

    Faster, steadier live runs

    Focus on startup and steady-state behavior when the exchange API is busy: fewer round-trips before the first cycle, and smoother handling when many orders go out in a short span. Budget and mode switches behave the same as before.

    New

    • Startup prefetch of market metadata so the first live cycle is less chatty with the API.
    • More efficient submission path when order volume spikes in a single loop.

    Updated

    • The same execution path runs whether you are testing without keys or fully live—timings stay comparable.

    Bug fixes

    • Hardening around transient API errors during bursts.
    #execution#polymarket#python
  • v1.3.0

    Settlement pass, CSV export, and P&L ledger

    After short windows resolve, pull official outcomes into the local ledger, append a running P&L log, and export rows for spreadsheets—without stuffing strategy detail into the CSV headers.

    # Simulation needs no signing keys
    # (default)
    POLYMARKET_DRY_RUN=true
    
    # Live mode, only when you're ready
    # POLYMARKET_PRIVATE_KEY=
    # POLYMARKET_FUNDER=

    New

    • One-shot settlement pass: refresh resolved markets and advance the cumulative P&L log.
    • Report command: CSV export plus a text summary for quick review.
    • Manual settlement override for odd edge cases (window label + winning side).
    • Rebuild helper for the P&L summary if you edit the log file offline.

    Updated

    • Portfolio trace stays a plain JSON file you can back up or diff in git.

    Bug fixes

    • Sell-side size clamped so you cannot unwind more than the logged position.
    #reporting#pnl#exports
  • v1.2.0

    Short-window coverage and operator safety rails

    More short-term crypto Up/Down markets in rotation, separate defaults for 5- and 15-minute windows, and settings that stop quoting near the end of a window.

    New

    • Multiple assets on the short crypto windows in the rotation.
    • Budget knobs that respect shorter vs longer window lengths.
    • Grace period after window open and wind-down before expiry for open quotes.
    • Telegram (optional): interval message with total realized P&L. Set the bot token and chat ID in `.env`.
    • Local status server (optional): `--port` serves a small JSON payload—cycle, trade count, settled count, cumulative P&L—so uptime tools can poll it.

    Updated

    • Stays in non-live mode until you add keys and disable the simulation flag in config.
    #risk#multi-asset#telegram
  • v1.1.0

    Clearer logs and quieter idle cycles

    Housekeeping for the terminal: cycles are easier to scan, idle loops stop spamming the same line, and failed API calls state the problem once instead of a wall of traceback. Order logic and sizing are unchanged.

    New

    • Per-cycle header with timestamp and active market count so long sessions are easier to skim.
    • Grouped “skipped” reasons in one line instead of repeating the same note every second.

    Updated

    • HTTP timeouts from the venue surface as a short, actionable message with retry implied on the next loop.

    Bug fixes

    • Rare encoding glitch on Windows consoles when logs contained non-ASCII characters.
    #logging#operator#cli
  • v1.0.0

    Baseline runner and safe-by-default packaging

    First drop you can run end-to-end on your machine: signing keys stay optional until you add them, hosts come from config, and the loop targets short crypto windows without spelling out internals in the docs.

    New

    • `.env.example` ships next to the loader so required vs optional keys are obvious.
    • `--once` runs a single cycle after install—handy for smoke tests before leaving it on.
    • `requirements.txt` pins the CLOB client stack so `pip install` behaves the same on macOS, Linux, and WSL.

    Updated

    • Config and the main loop read the same asset list—no duplicate hard-coded tickers.
    #release#python#setup

FAQ

Need help? We've got answers

Common questions about releases, compatibility, and how to follow updates.

Ready to run your own bot?

One-time purchase, full Python source, simulation mode included.

Get started