[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-92521":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":15,"stars30d":16,"stars90d":15,"forks30d":15,"starsTrendScore":15,"compositeScore":17,"rankGlobal":10,"rankLanguage":10,"license":10,"archived":18,"fork":18,"defaultBranch":19,"hasWiki":20,"hasPages":18,"topics":21,"createdAt":10,"pushedAt":10,"updatedAt":23,"readmeContent":24,"aiSummary":25,"trendingCount":15,"starSnapshotCount":15,"syncStatus":16,"lastSyncTime":26,"discoverSource":27},92521,"polymarket-arbitrage-bot","ale2348\u002Fpolymarket-arbitrage-bot","ale2348","Polymarket Arbitrage Bot || Polymarket Trading Bot || Polymarket Arbitrage Bot || Polymarket Trading Bot || Polymarket Arbitrage Bot || Polymarket Trading Bot || Polymarket Arbitrage Bot || Polymarket Trading Bot || Polymarket Arbitrage Bot || Polymarket Trading Bot || Polymarket Arbitrage Bot || Polymarket Trading Bot || Polymarket Arbitrage Bot","https:\u002F\u002Fpolymarket.com\u002F@antsaslyku",null,"TypeScript",113,4241,143,0,2,47.2,false,"main",true,[5,22],"polymarket-trading-bot","2026-07-22 04:02:06","# Polymarket Arbitrage Bot\n\n**Repository:** [github.com\u002Fale2348\u002Ftrading-bot](https:\u002F\u002Fgithub.com\u002Fale2348\u002Fpolymarket-arbitrage-bot) · **Author:** [@ale2348](https:\u002F\u002Fgithub.com\u002Fale2348)\n\nA TypeScript bot for **Polymarket 5-minute crypto Up\u002FDown** markets — **BTC, ETH, SOL, and XRP**. It implements a **late-window resolution snipe**: wait until the outcome is nearly decided, buy the favorite at **~$0.98–$0.99**, then hold to resolution for a small payout on each winning cycle.\n\n![Polymarket Arbitrage Bot Banner](doc\u002Fbanner.png)\n\n**Live profile using this strategy:** [**@antsaslyku on Polymarket**](https:\u002F\u002Fpolymarket.com\u002F@antsaslyku)\n\n\nThis repository reads live Polymarket prices and **simulates** the same entry\u002Fexit logic (console + `logs.txt`). Press **Ctrl+C** to stop and see balance, P\u002FL, and trade count.\n\n---\n\n## Live proof — buy → redeem cycles\n\nThese are real on-chain transactions from [@antsaslyku](https:\u002F\u002Fpolymarket.com\u002F@antsaslyku) on Polygon. Each pair shows the same pattern the bot follows: **buy the favorite late in the window → redeem at $1.00 after resolution**.\n\n![Polymarket Activity](doc\u002Factivity.png)\n\n### Trade 1 — Jun 11, 2026 · ~$0.99 entry\n\n| Step | Time (UTC) | Details | Polygonscan |\n|------|------------|---------|-------------|\n| **Buy** | 09:30:01 | ~**$67.32** USDC → **68 shares** @ **~$0.99** (late-window favorite) | [View buy tx](https:\u002F\u002Fpolygonscan.com\u002Ftx\u002F0x6874a18bcd84c18a6e9d5cffd0a94eb0bdc148089a364370eb9120384bc4e21c) |\n| **Redeem** | 09:31:03 | Market resolves → shares redeemed for **~$1.00** each | [View redeem tx](https:\u002F\u002Fpolygonscan.com\u002Ftx\u002F0x17e8fbc7ed8d995c44127da034e487733a43f18c6638cdcba9088a519b11ad63) |\n\n**Approx. gross profit:** ~**$0.68** on ~$67 stake (~**1%**) before fees, in **~62 seconds**.\n\n### Trade 2 — Jun 11, 2026 · ~$0.99 entry\n\n| Step | Time (UTC) | Details | Polygonscan |\n|------|------------|---------|-------------|\n| **Buy** | 08:55:01 | Buy favorite @ **~$0.98–$0.99** near window end | [View buy tx](https:\u002F\u002Fpolygonscan.com\u002Ftx\u002F0x7fa58be45dc24afbc8bd135fc6a7147fb548e2c00ad2f5b6100fa7510dd58b45) |\n| **Redeem** | 08:55:30 | Resolution redeem **~29s** after buy | [View redeem tx](https:\u002F\u002Fpolygonscan.com\u002Ftx\u002F0x4edaaa3a6a6d854fe6ec938280ab3cfd34d07f34fcc75c7f4757feccfc9d30dc) |\n\n> **How to read these txs:** The **buy** tx interacts with `Polymarket: CTF Exchange V2` — USDC out, outcome shares in. The **redeem** tx settles winning shares back to USDC at **$1.00** per share when the 5m window resolves. Repeat this across many windows and P\u002FL compounds — see the full history on [polymarket.com\u002F@antsaslyku](https:\u002F\u002Fpolymarket.com\u002F@antsaslyku).\n\n### Profile screenshots ([@antsaslyku](https:\u002F\u002Fpolymarket.com\u002F@antsaslyku))\n\nLive Polymarket dashboard — portfolio growth and buy\u002Fredeem activity on **BTC** and **XRP** 5m markets at **96–99¢**:\n\n![Polymarket profile — past day profit\u002Floss and recent trades](doc\u002Fdaily_pnl.png)\n\n- Past year P\u002FL: **+$82,537.48**\n- Past day P\u002FL: **+$208.04**\n- 24h Return: **+3.51%**\n- Portfolio Value: **~$3,467**\n\nTrade history includes repeated entries in late-stage crypto prediction markets followed by successful redemptions at settlement.\n\n---\n\n## How it works\n\nEach **5-minute Up\u002FDown** market (BTC, ETH, SOL, XRP) runs for **300 seconds**. All four assets share the same window clock — every 5 minutes a new round opens for each.\n\n```\n0s ──────────────── 250s ─── 290s ─ 298s ─ 300s\n     wait \u002F monitor      entry      exit   close\n                         window    (resolve)\n```\n\nNear the end, when price has usually already moved one way, the likely winner trades just below **$1.00**:\n\n1. **Monitor all four markets** (BTC, ETH, SOL, XRP) each poll\n2. **Wait** through most of the window — no early entries\n3. **Enter** in the last ~40s when Up or Down is priced **$0.97–$0.99**\n4. **Buy the favorite** — up to **one position per asset** per window\n5. **Hold to resolution** at **t = 298s** and settle\n\n| | Typical win | Risk |\n|---|-------------|------|\n| **Math** | Buy @ ~$0.98 → redeem @ **$1.00** ≈ **2%** gross per share | Last-second reversal → most of stake lost |\n| **Edge** | Small, repeatable gain per window | One bad flip wipes many wins |\n\n---\n\n## Strategy rules\n\n| Setting | Value |\n|---------|--------|\n| Markets | **BTC, ETH, SOL, XRP** — 5m Up\u002FDown (`btc-updown-5m`, `eth-updown-5m`, `sol-updown-5m`, `xrp-updown-5m`) |\n| Positions | Up to **one trade per asset** per 5m window (max 4 concurrent) |\n| Entry time | **250–290s** after window start |\n| Entry price | Favorite ask **0.97–0.99** (usually **0.98–0.99**) |\n| Side selection | Whichever side is in the band; if both qualify, pick the **higher** price |\n| Exit | **t = 298s** — redeem @ **$1.00\u002Fshare** if bid ≥ 0.90, else exit at market bid (loss) |\n| Position size | **$10** per trade (`BET_USD` in code) |\n| Fees (simulation) | **1%** on notional; **0.5%** slippage on loss exits |\n\nMany windows produce **no trade** — normal when no side reaches the price band before time runs out.\n\n---\n\n## Requirements\n\n- **Node.js** ≥ 20.6 ([`package.json`](package.json))\n- Polymarket wallet with **USDC** on Polygon\n- Internet access (Polymarket Gamma + CLOB APIs)\n\n---\n\n## Quick start\n\n### 1. Install\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fale2348\u002Fpolymarket-arbitrage-bot.git\ncd polymarket-arbitrage-bot\nnpm install\n```\n\n### 2. Environment\n\n```bash\n# Windows\ncopy .env.example .env\n\n# macOS \u002F Linux\ncp .env.example .env\n```\n\n| Variable | Required | Description |\n|----------|----------|-------------|\n| `POLYMARKET_PRIVATE_KEY` | **Yes** | 64-character hex private key (with or without `0x`) |\n| `PROXY_WALLET_ADDRESS` | No | Polymarket proxy\u002Ffunder address for email or social-login accounts |\n\n**Wallet setup**\n\n| Account type | What to set |\n|--------------|-------------|\n| MetaMask \u002F hardware wallet | `POLYMARKET_PRIVATE_KEY` only — USDC in that EOA |\n| Polymarket.com (email \u002F Google) | Both `POLYMARKET_PRIVATE_KEY` **and** `PROXY_WALLET_ADDRESS` (your profile address under Polymarket account settings) |\n\nNever commit `.env`.\n\n### 3. Run\n\n```bash\nnpm start\n```\n\nOptional build:\n\n```bash\nnpm run build\n```\n\n---\n\n## Reading the logs\n\n| Message | Meaning |\n|---------|---------|\n| `New 5m window (BTC, ETH, SOL, XRP)` | New 5-minute round for all assets |\n| `BTC Up=0.98 Down=0.02 \\| ETH …` | Heartbeat — prices across markets |\n| `Late entry window in 120s` | Waiting until t=250s |\n| `Watching for late favorite @0.98–0.99...` | In entry window, price in band on at least one market |\n| `[ENTRY] ETH BUY Up (favorite) @ 0.98` | Late snipe on Ethereum 5m market |\n| `[EXIT] BTC REDEEM Up @ 1.00 (resolution @ $1.00)` | Win — settled at $1\u002Fshare |\n| `[EXIT] SOL SELL … (favorite lost — exit at bid)` | Loss on Solana market |\n| `Wallet balance is $0` | Deposit USDC or fix `PROXY_WALLET_ADDRESS` |\n\nHistory is appended to **`logs.txt`**.\n\n---\n\n## Example simulation runs\n\nSimulated terminal runs (market conditions vary):\n\n| Starting balance | Per-trade size | Profit (example) |\n|------------------|----------------|------------------|\n| $100 | $10 | ~$40 |\n| $500 | $50 | ~$300 |\n| $1,000 | $100 | ~$500 |\n\nThese differ from the live [@antsaslyku](https:\u002F\u002Fpolymarket.com\u002F@antsaslyku) results above — the repo **simulates** logic locally; your real P\u002FL depends on balance, sizing, and how often each asset hits the 0.97–0.99 band.\n\n---\n\n## Tuning in code\n\nConstants in [`src\u002Findex.ts`](src\u002Findex.ts):\n\n| Constant | Default | Purpose |\n|----------|---------|---------|\n| `MARKETS` | `btc, eth, sol, xrp` | Assets to monitor |\n| `BET_USD` | `10` | Dollars per trade (per asset) |\n| `ENTRY_TIME_MIN` \u002F `ENTRY_TIME_MAX` | `250` \u002F `290` | Entry window (seconds) |\n| `ENTRY_PRICE_MIN` \u002F `ENTRY_PRICE_MAX` | `0.97` \u002F `0.99` | Favorite price band |\n| `RESOLVE_SEC` | `298` | Settlement time |\n| `FEE_BPS` | `100` | 1% fee |\n\n---\n\n## Risks & disclaimer\n\n- **Small edge, large tail risk** — ~$0.02\u002Fshare at $0.98 entry; one reversal can erase many wins.\n- **Not every window trades** — many cycles never hit 0.97–0.99 in time.\n- **This repo simulates P\u002FL** — live trading requires CLOB order placement and real fills; past on-chain results ([@antsaslyku](https:\u002F\u002Fpolymarket.com\u002F@antsaslyku)) do not guarantee future performance.\n- **Not financial advice** — use at your own risk.\n\n---\n\n## Project layout\n\n```\nPolymarket-arbitrage-bot\u002F\n├── doc\u002F              # Screenshots (Polymarket profile P\u002FL)\n│   ├── daily_pnl.png\n│   └── total_pnl.png\n├── src\u002Findex.ts      # Bot logic and strategy constants\n├── .env.example      # Environment template\n├── logs.txt          # Runtime logs (created on start)\n├── package.json\n└── tsconfig.json\n```\n\n---\n\n## License\n\nThis project is open source and available under the ISC License.\n","这是一个面向Polymarket预测市场平台的套利交易机器人，专为5分钟周期的加密资产（BTC、ETH、SOL、XRP）涨跌合约设计。其核心策略是‘晚期窗口狙击’：实时监控市场，在结果基本确定后以约0.98–0.99美元价格买入胜率极高的标的份额，待合约到期自动按1.00美元兑付，单笔获利约1%。项目基于TypeScript开发，提供本地模拟运行与日志记录功能，支持快速验证策略逻辑。适用于熟悉Polymarket机制、追求高频低风险套利机会的量化交易者或个人投资者。","2026-07-09 02:30:14","CREATED_QUERY"]