
Polymarket Arbitrage Trading Bot
Clone and configure a TypeScript Polymarket CLOB bot that dump-hedges 15-minute crypto Up/Down markets for BTC, ETH, SOL, and XRP.
Overview
Polymarket Arbitrage Trading Bot is an agent skill for the Build phase that guides setup of a TypeScript dump-and-hedge bot on Polymarket 15-minute crypto markets via the official CLOB client.
Install
npx skills add https://github.com/aradotso/trending-skills --skill polymarket-arbitrage-trading-botWhat is this skill?
- Dump-and-hedge arbitrage on Polymarket 15-minute crypto Up/Down markets
- Official @polymarket/clob-client TypeScript stack with npm build workflow
- Watches BTC, ETH, SOL, and XRP legs for sharp drops then pairs legs below a cost threshold
- Simulation mode and .env-driven configuration before live USDC on Polygon
- src/ layout: main.ts discovery, monitor.ts snapshots, dumpHedgeTrader strategy module
- 4 crypto markets: BTC, ETH, SOL, XRP
- 15-minute Up/Down market window
Adoption & trust: 863 installs on skills.sh; 31 GitHub stars; 0/3 security scanners passed (skills.sh audits).
What problem does it solve?
You want to automate Polymarket 15-minute Up/Down arbitrage but lack a wired TypeScript bot, env config, and monitor/trader structure.
Who is it for?
Solo builders already comfortable with DeFi wallets, API keys, and running trading bots in simulation first.
Skip if: Non-crypto products, builders seeking turnkey compliance advice, or anyone unwilling to custody funds and audit strategy code.
When should I use this skill?
set up polymarket arbitrage bot; configure polymarket trading bot; run polymarket dump hedge strategy; polymarket 15 minute market bot; automate polymarket trading
What do I get? / Deliverables
You have a built Node project with market discovery, price monitors, and dump-hedge execution ready for simulation or live Polygon USDC trading after .env setup.
- Configured .env and built npm project
- Running monitor and dump-hedge trader processes
Recommended Skills
Journey fit
The skill documents installing and wiring an external trading integration—primary work happens while building the automation, not distribution or analytics. Centers on @polymarket/clob-client, market monitors, and env-based live vs simulation—classic third-party API integration.
How it compares
Integration skill for a specific GitHub bot—not a generic backtesting framework or exchange-agnostic trading MCP.
Common Questions / FAQ
Who is polymarket-arbitrage-trading-bot for?
Indie developers building automated Polymarket CLOB strategies on 15-minute BTC/ETH/SOL/XRP markets who will own wallet security and PnL risk.
When should I use polymarket-arbitrage-trading-bot?
In Build integrations when you need to set up, configure, or run the dump-hedge bot—including simulation mode before funding Polygon USDC.
Is polymarket-arbitrage-trading-bot safe to install?
It involves real funds, secrets in .env, and third-party repo code—review Security Audits on this page, run simulation, and audit src/ yourself before live keys.
SKILL.md
READMESKILL.md - Polymarket Arbitrage Trading Bot
# Polymarket Arbitrage Trading Bot > Skill by [ara.so](https://ara.so) — Daily 2026 Skills collection. Automated dump-and-hedge arbitrage bot for Polymarket's 15-minute crypto Up/Down prediction markets. Written in TypeScript using the official `@polymarket/clob-client`. Watches BTC, ETH, SOL, and XRP markets for sharp price drops on one leg, then buys both legs when combined cost falls below a target threshold to lock in a structural edge before resolution. --- ## Installation ```bash git clone https://github.com/apechurch/polymarket-arbitrage-trading-bot.git cd polymarket-arbitrage-trading-bot npm install cp .env.example .env # Configure .env — see Configuration section npm run build ``` **Requirements:** Node.js 16+, USDC on Polygon (for live trading), a Polymarket-compatible wallet. --- ## Project Structure ```text src/ main.ts # Entry point: market discovery, monitors, period rollover monitor.ts # Price polling & snapshots dumpHedgeTrader.ts # Core strategy: dump → hedge → stop-loss → settlement api.ts # Gamma API, CLOB API, order placement, redemption config.ts # Environment variable loading models.ts # Shared TypeScript types logger.ts # History file (history.toml) + stderr logging ``` --- ## Key Commands | Command | Purpose | |---------|---------| | `npm run dev` | Run via `ts-node` (development, no build needed) | | `npm run build` | Compile TypeScript to `dist/` | | `npm run typecheck` | Type-check without emitting output | | `npm run clean` | Remove `dist/` directory | | `npm run sim` | **Simulation mode** — logs trades, no real orders | | `npm run prod` | **Production mode** — places real CLOB orders | | `npm start` | Run compiled output (defaults to simulation unless `--production` passed) | --- ## Configuration (`.env`) ```bash # Wallet / Auth PRIVATE_KEY=0xYOUR_PRIVATE_KEY_HERE PROXY_WALLET_ADDRESS=0xYOUR_PROXY_WALLET SIGNATURE_TYPE=2 # 0=EOA, 1=Proxy, 2=Gnosis Safe # Markets to trade (comma-separated) MARKETS=btc,eth,sol,xrp # Polling CHECK_INTERVAL_MS=1000 # Strategy thresholds DUMP_HEDGE_SHARES=10 # Shares per leg DUMP_HEDGE_SUM_TARGET=0.95 # Max combined price for both legs DUMP_HEDGE_MOVE_THRESHOLD=0.15 # Min fractional drop to trigger (15%) DUMP_HEDGE_WINDOW_MINUTES=5 # Only detect dumps in first N minutes of round DUMP_HEDGE_STOP_LOSS_MAX_WAIT_MINUTES=8 # Force stop-loss hedge after N minutes # Mode flag (use --production CLI flag for live trading) PRODUCTION=false # Optional API overrides GAMMA_API_URL=https://gamma-api.polymarket.com CLOB_API_URL=https://clob.polymarket.com API_KEY= API_SECRET= API_PASSPHRASE= ``` --- ## Strategy Overview ```text New 15m round starts │ ▼ Watch first DUMP_HEDGE_WINDOW_MINUTES minutes │ ├── Up or Down leg drops ≥ DUMP_HEDGE_MOVE_THRESHOLD? │ │ │ ▼ │ Buy dumped leg (Leg 1) │ │ │ ├── Opposite ask cheap enough? │ │ (leg1_entry + opposite_ask ≤ DUMP_HEDGE_SUM_TARGET) │ │ │ │ │ ▼ │ │ Buy hedge leg (Leg 2) → locked-in edge │ │ │ └── Timeout (DUMP_HEDGE_STOP_LOSS_MAX_WAIT_MINUTES)? │ │ │ ▼ │ Execute stop-loss hedge │ └──