# polymarket-arbitrage-trading-bot

A skill that builds a trading bot for Polymarket's 15-minute Up/Down markets: it watches BTC, ETH, SOL and XRP and buys both legs once their combined price drops under a threshold.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 979 installs · ★ 88
- 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-trading-bot/SKILL.md
- Updated: 2026-10-09
- HTML: https://affpapa.org/en/nevibecode/skills/polymarket-arbitrage-trading-bot

## What it does

The bot is TypeScript, built on the official `@polymarket/clob-client`. At the start of each 15-minute round it watches for a sharp drop on one leg, buys that leg, then takes the opposite side if the two entries together stay under the target sum. When the opposite side never gets cheap enough in time, a stop-loss hedge fires instead.

The skill covers the entry point, price monitoring, the dump-hedge strategy module, Gamma and CLOB API calls, order placement and on-chain redemption. Simulation is the safe default: `npm run sim` logs trades without sending anything, while `npm run prod` places real CLOB orders. Everything configurable lives in `.env` — wallet key, signature type, market list, poll interval and strategy thresholds.

Live trading needs Node.js 16+, USDC on Polygon and a Polymarket-compatible wallet. Miss any of those and you are stuck in simulation. The threshold values shown in the config example come from the README as a starting point, not as fixed limits, so tune them to your position size.

## Install

### Claude Code (native platform)

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

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

### Codex

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

2. **Manually: put the files in place**
- File: `.agents/skills/polymarket-arbitrage-trading-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-trading-bot -a cursor
```

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

### GitHub Copilot

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

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

### Gemini CLI

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

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

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/polymarket-arbitrage-trading-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-trading-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-trading-bot/SKILL.md

## When to use it
- locate the active 15-minute market for a given coin
- catch a sharp price drop on one leg
- buy both legs while their combined price stays under the target
- trigger a stop-loss hedge when the second leg never cheapens
- rehearse the strategy in simulation without real orders

## Example prompts
- Set up the Polymarket arbitrage bot for btc, eth, sol and xrp markets
- Run the dump-and-hedge strategy in simulation mode and show me the trade log
- Walk through the `.env` config and explain what each strategy threshold does

## Similar
- [churn-prevention](https://affpapa.org/en/nevibecode/skills/coreyhaines31-churn-prevention.md) — skill · 121000 installs
- [revops](https://affpapa.org/en/nevibecode/skills/revops.md) — skill · 113500 installs
- [community-marketing](https://affpapa.org/en/nevibecode/skills/community-marketing.md) — skill · 89500 installs
- [ads](https://affpapa.org/en/nevibecode/skills/ads.md) — skill · 82800 installs
- [pricing](https://affpapa.org/en/nevibecode/skills/pricing.md) — skill · 79300 installs
- [marketing-plan](https://affpapa.org/en/nevibecode/skills/marketing-plan.md) — skill · 67900 installs

From the same set: [reason-machines/trending-skills](https://affpapa.org/en/nevibecode/by/reason-machines/trending-skills.md) — 186 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
