polymarket-arbitrage-trading-bot — Claude Code skill
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.
npx skills add reason-machines/trending-skills --skill polymarket-arbitrage-trading-bot -a claude-codeWhat polymarket-arbitrage-trading-bot 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.
What it helps with
- 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 for the agent
- 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
.envconfig and explain what each strategy threshold does
How to install polymarket-arbitrage-trading-bot
1Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill polymarket-arbitrage-trading-bot -a claude-code2Manually: put the files in place
~/.claude/skills/polymarket-arbitrage-trading-bot/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/polymarket-arbitrage-trading-bot/
1Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill polymarket-arbitrage-trading-bot -a codex2Manually: put the files in place
.agents/skills/polymarket-arbitrage-trading-bot/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill polymarket-arbitrage-trading-bot -a cursor2Manually: put the files in place
.cursor/skills/polymarket-arbitrage-trading-bot/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install reason-machines/trending-skills polymarket-arbitrage-trading-bot2Manually: put the files in place
.github/skills/polymarket-arbitrage-trading-bot/SKILL.md1Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill polymarket-arbitrage-trading-bot -a gemini-cli2Platform CLI
gemini skills install https://github.com/reason-machines/trending-skills --path skills/polymarket-arbitrage-trading-botManually: put the files in place
.devin/skills/polymarket-arbitrage-trading-bot/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill polymarket-arbitrage-trading-bot -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about polymarket-arbitrage-trading-bot
How do I install polymarket-arbitrage-trading-bot in Claude Code?
Run npx skills add reason-machines/trending-skills --skill polymarket-arbitrage-trading-bot -a claude-code. The skill then lives at ~/.claude/skills/polymarket-arbitrage-trading-bot/SKILL.md.
What does polymarket-arbitrage-trading-bot do?
It scaffolds a TypeScript bot that tracks Polymarket's 15-minute Up/Down markets and buys both legs whenever their combined price falls below a set threshold.
What do I need for live trading?
Node.js 16+, USDC on Polygon and a Polymarket-compatible wallet. Without them the bot stays in simulation.