[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-92720":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":8,"htmlUrl":8,"language":9,"languages":8,"totalLinesOfCode":8,"stars":10,"forks":11,"watchers":12,"openIssues":13,"contributorsCount":13,"subscribersCount":13,"size":13,"stars1d":13,"stars7d":13,"stars30d":14,"stars90d":13,"forks30d":13,"starsTrendScore":13,"compositeScore":15,"rankGlobal":8,"rankLanguage":8,"license":8,"archived":16,"fork":16,"defaultBranch":17,"hasWiki":18,"hasPages":16,"topics":19,"createdAt":8,"pushedAt":8,"updatedAt":20,"readmeContent":21,"aiSummary":22,"trendingCount":13,"starSnapshotCount":13,"syncStatus":23,"lastSyncTime":24,"discoverSource":25},92720,"risk-free-sniper","zerosupercycIe\u002Frisk-free-sniper","zerosupercycIe",null,"Python",245,1004,64,0,136,53.01,false,"master",true,[],"2026-07-22 04:02:06","# Polymarket Trading Bot - Risk Free Sniper\n\nAutomated trading bot for Polymarket crypto **up\u002Fdown** markets. Risk Free Sniper watches short-term price momentum on Binance or Chainlink, enters only when the move **crosses the slug-open beat price**, and buys in the **direction of the spike** (UP on a down→up cross, DOWN on an up→down cross).\n\nDefault mode is **paper trading** — no live orders until you configure credentials and enable execution.\n\n## How it works\n\nEach Polymarket up\u002Fdown market has a **beat price** (the reference price at market open). Risk Free Sniper runs a two-stage pipeline:\n\n1. **Momentum trigger** — On the configured signal feed, `|price_now − price_{now−lookback}|` must exceed a USD threshold (e.g. $24 for BTC with a 3s lookback).\n2. **Beat-cross direction** — The lookback window must cross the slug-open beat:\n   - Price moves **below → above** beat → buy **UP**\n   - Price moves **above → below** beat → buy **DOWN**\n   - No cross → trade rejected\n\nOrders are placed on the Polymarket CLOB (limit by default) during a configurable entry window (e.g. 240s after slug open on 5m BTC markets).\n\n```text\nFeed tick\n  → |Δ| ≥ threshold?          (momentum spike)\n  → ref and now straddle beat?\n      → cross up   → BUY UP\n      → cross down → BUY DOWN\n  → CLOB order on chosen token\n```\n\n## Architecture\n\n| Component | Command | Port | Role |\n|-----------|---------|------|------|\n| Dashboard server | `make server` | 8788 | Chainlink + Binance WebSocket feeds, beat resolution, REST\u002FWS API |\n| Trading bot | `make bot` | — | Detection, beat filter, order execution |\n| Web UI | `make web` | 5174 | Live feeds, charts, trade history |\n| Profile monitor | `make monitor` | — | Optional wallet watcher (disabled by default) |\n\nThe bot reads feeds from the dashboard server by default (`feeds.source: server`), so start the server before the bot.\n\n## Quick start\n\n```bash\nmake install          # Python venv + deps + web npm\ncp .env.example .env  # optional; created automatically by make install\n\n# Terminal 1 — feeds + API\nmake server\n\n# Terminal 2 — paper bot\nmake bot\n\n# Terminal 3 — dashboard UI\nmake web\n```\n\nOpen http:\u002F\u002Flocalhost:5174 for the dashboard. Health check: `make health`.\n\n### PM2 (production-style)\n\n```bash\nmake pm2-start    # server + bot + web + monitor\nmake pm2-status\nmake pm2-logs\nmake pm2-stop\n```\n\n## Configuration\n\nPrimary config: [`config\u002Fdefault.yaml`](config\u002Fdefault.yaml)\n\n| Section | Purpose |\n|---------|---------|\n| `bot.mode` | `paper` or `live` |\n| `markets` | Assets and intervals (e.g. BTC 5m) |\n| `entry` | Seconds after slug open \u002F before close to allow entries |\n| `strategy` | Signal feed, lookback, thresholds, beat-cross logic |\n| `trading` | Share size, limit price, order style |\n| `execution` | CLOB credentials gate (keep secrets in `.env`) |\n| `feeds` | `server` (recommended) or `local` WebSocket feeds |\n| `chainlink` | Optional Data Streams credentials for precise beat lookup |\n\nPer-asset thresholds live under `strategy.by_asset`. Signal feed options: **`binance`** or **`chainlink`**.\n\n### Environment variables\n\nSet in `.env` (see [`.env.example`](.env.example)):\n\n| Variable | Purpose |\n|----------|---------|\n| `RISK_FREE_SNIPER_EXECUTION__PRIVATE_KEY` | Wallet private key (live only) |\n| `RISK_FREE_SNIPER_EXECUTION__FUNDER` | Polymarket proxy\u002Ffunder address |\n| `RISK_FREE_SNIPER_EXECUTION__API_KEY` | CLOB API key |\n| `RISK_FREE_SNIPER_EXECUTION__API_SECRET` | CLOB API secret |\n| `RISK_FREE_SNIPER_EXECUTION__API_PASSPHRASE` | CLOB passphrase |\n| `RISK_FREE_SNIPER_BOT__MODE` | Override `bot.mode` |\n| `RISK_FREE_SNIPER_CHAINLINK__STREAMS_*` | Chainlink Data Streams credentials |\n\nLegacy `BEAT_SPIKE_*` and `DAWN_*` env names are still accepted as fallbacks.\n\n### Live trading\n\n1. Set wallet and CLOB credentials in `.env`.\n2. Set `execution.enabled: true` and `bot.mode: live` in config (or via env).\n3. Confirm risk limits under `risk` if enabled.\n4. Run `make server` then `make bot`.\n\n**Never commit `.env` or private keys.**\n\n## Price feeds\n\n| Feed | Source | Used for |\n|------|--------|----------|\n| Binance | Spot ticker WebSocket | Default signal feed; fast momentum |\n| Chainlink | Polymarket RTDS or Data Streams | Resolution-aligned beat; optional signal feed |\n\nCoinbase is not supported — use Binance or Chainlink.\n\n## Essential tip: Polymarket latency probe\n\n**A fast, lightweight latency monitoring tool for Polymarket endpoints.** Monitor REST API and WebSocket response times in real time — useful when tuning Risk Free Sniper feed sources, server placement, and order execution.\n\n![Latency probe example](assets\u002Flatancy%20example.png)\n\n### Features\n\n- Real-time latency monitoring for key Polymarket endpoints\n- Support for REST APIs and WebSockets\n- Color-coded results and statistics (min, avg, p95, p99)\n- Lightweight and cross-platform\n- No installation required — download, extract, and run\n\n### Pre-built binaries\n\nPre-built zip archives are included in [`bin\u002F`](bin\u002F):\n\n| Platform | Architecture | File |\n|----------|--------------|------|\n| **Linux** | x86_64 | [`polymarket-latency-probe-linux-x86_64.zip`](https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Ffiles\u002F29324285\u002Fpolymarket-latency-probe-linux-x86_64.zip) |\n| **Windows** | x64 | [`polymarket-latency-probe-windows-x64.zip`](https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Ffiles\u002F29302588\u002Fpolymarket-latency-probe-windows-x64.zip) |\n| **macOS** | Apple Silicon (arm64) | [`polymarket-latency-probe-macos-arm64.zip`](https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Ffiles\u002F29302597\u002Fpolymarket-latency-probe-macos-arm64.zip) |\n\nRun the probe from the same machine (or VPS region) as your bot to compare endpoint latency before choosing feeds or colocation.\n\n### Quick start\n\n1. Click your platform zip in the table above (or open [`bin\u002F`](bin\u002F) in a local clone) and extract it.\n2. Run the executable:\n\n```bash\n# Linux \u002F macOS\nchmod +x polymarket-latency-probe\n.\u002Fpolymarket-latency-probe\n\n# Windows\npolymarket-latency-probe.exe\n```\n\n## Monitor (optional)\n\n[`config\u002Fmonitor.yaml`](config\u002Fmonitor.yaml) watches Polymarket profiles for up\u002Fdown buys and captures price charts. It is **disabled by default**. Add your own profile URLs to `targets` and set `enabled: true` to use it.\n\n## Data & logs\n\n| Path | Contents |\n|------|----------|\n| `data\u002Ftrades.jsonl` | Trade log |\n| `data\u002Fbot_status.json` | Bot state |\n| `data\u002Ftrade_snapshots\u002F` | Chart snapshots at trade time |\n| `data\u002Frisk-free-sniper.log` | Bot log file |\n| `data\u002Ffeed_beats.json` | Persisted per-slug beat prices |\n\n## Project layout\n\n```text\nbot\u002F           Trading logic, feeds, Polymarket CLOB integration\nserver\u002F        FastAPI dashboard + feed aggregator\nweb\u002F           React\u002FVite dashboard\nconfig\u002F        YAML configuration\ndata\u002F          Runtime logs and snapshots (gitignored in production)\n```\n\n## Makefile reference\n\nRun `make help` for all targets. Common commands:\n\n- `make install` — Install dependencies\n- `make server` \u002F `make bot` \u002F `make web` — Run components\n- `make bot-stop` — Stop a running bot\n- `make web-build` — Production UI build\n- `make clean` — Remove venv and node_modules\n\n## Disclaimer\n\nThis software is for educational and research purposes. Trading on prediction markets involves financial risk. You are responsible for compliance with applicable laws and Polymarket terms of service. Use at your own risk.\n","这是一个专为Polymarket预测市场设计的自动化交易机器人，用于在价格出现短期动量突破时，基于‘beat price’（市场开盘参考价）交叉方向执行UP\u002FDOWN合约的套利式下单。核心功能包括双阶段信号判断（动量阈值检测 + beat price穿越方向识别）、支持纸面交易与实盘切换、集成Chainlink\u002FBinance行情源及Polymarket CLOB限价单执行，并提供实时仪表盘监控。适用于加密预测市场中短周期价格突变场景下的程序化交易策略验证与低风险套利尝试。",2,"2026-07-10 02:30:15","CREATED_QUERY"]