# polymarket-arbitrage-bot

polymarket-arbitrage-bot automates dump-and-hedge strategies on Polymarket 15-minute Up/Down crypto markets. Helps configure TypeScript trading bots, manage CLOB orders, and test without real capital.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 815 installs · ★ 98 repo stars
- Author: reason-machines
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/reason-machines/trending-skills/tree/HEAD/skills/polymarket-arbitrage-bot/SKILL.md
- Updated: 2026-10-09
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/polymarket-arbitrage-bot

## What it does

This skill provides architecture patterns and code templates for a TypeScript bot targeting Polymarket short-term binary markets across BTC, ETH, SOL, and XRP. The core strategy detects rapid price drops on one outcome, enters the first leg at the ask, and hedges by buying the opposite side whenever the total cost remains under the profit target.

The system polls Gamma API endpoints to resolve the active 15-minute market window and coordinates orderbook monitoring with CLOB order routing. Code organization cleanly separates market discovery, orderbook polling loops, stop-loss wait timers, and settlement logging.

Live order execution demands `PRIVATE_KEY` and `PROXY_WALLET_ADDRESS` configured in `.env`. Running `npm run sim` first is critical because unexpected volatility can leave the first leg unhedged if the opposite token fails to meet the target price.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill polymarket-arbitrage-bot -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/polymarket-arbitrage-bot/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/polymarket-arbitrage-bot/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill polymarket-arbitrage-bot -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/polymarket-arbitrage-bot/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill polymarket-arbitrage-bot -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/polymarket-arbitrage-bot/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install reason-machines/trending-skills skills/polymarket-arbitrage-bot
```

2. **Manually: put the files in place**
- File: `.github/skills/polymarket-arbitrage-bot/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill polymarket-arbitrage-bot -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/reason-machines/trending-skills --path skills/polymarket-arbitrage-bot
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/polymarket-arbitrage-bot/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill polymarket-arbitrage-bot -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/reason-machines/trending-skills/tree/HEAD/skills/polymarket-arbitrage-bot/SKILL.md

## When to use it
- automate dump-and-hedge execution on Polymarket 15-minute contracts
- wire TypeScript clients to Gamma and CLOB API endpoints
- evaluate trading parameters in simulation mode before committing funds
- configure stop-loss intervals and price drop thresholds

## Example prompts
- Set up the .env configuration for polymarket-arbitrage-bot to trade SOL markets
- Explain the two-leg hedge logic inside dumpHedgeTrader.ts
- Run polymarket-arbitrage-bot in simulation mode to verify orderbook polling

## Similar
- [grimoire-polymarket](https://affpapa.org/en/nevibecode/skills/grimoire-polymarket.md) — skill · 11900 installs
- [web3-polymarket](https://affpapa.org/en/nevibecode/skills/web3-polymarket.md) — skill · 611 installs
- [polymarket-trading](https://affpapa.org/en/nevibecode/skills/polymarket-trading.md) — skill · 219 installs
- [Oracle3 prediction-market arbitrage checks](https://affpapa.org/en/nevibecode/mcp/oracle3-prediction-market-arbitrage-checks.md) — MCP server · ★ 570 repo stars
- [polymarket-analyzer](https://affpapa.org/en/nevibecode/skills/polymarket-analyzer.md) — skill · 494 installs
- [find-arbitrage-opps](https://affpapa.org/en/nevibecode/skills/find-arbitrage-opps.md) — skill · 505 installs

From the same set: [reason-machines/trending-skills](https://affpapa.org/en/nevibecode/by/reason-machines/trending-skills.md) — 211 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
