
Polymarket Arbitrage Bot
Install this skill when you want a TypeScript Polymarket bot that runs dump-and-hedge on 15-minute Up/Down markets with safe simulation before live CLOB trades.
Overview
Polymarket Arbitrage Bot is an agent skill for the Build phase that guides setup of a TypeScript dump-and-hedge bot for Polymarket 15-minute Up/Down markets with CLOB execution and simulation mode.
Install
npx skills add https://github.com/aradotso/trending-skills --skill polymarket-arbitrage-botWhat is this skill?
- Dump-and-hedge logic for Polymarket 15-minute BTC, ETH, SOL, and XRP Up/Down markets
- CLOB order execution in TypeScript with compile-to-dist workflow
- Explicit modes: npm run sim (simulation), npm start (sim default), npm run prod (PRODUCTION=true)
- npm run dev via ts-node for fast iteration after npm install and npm run build
- Strategy configuration for dip detection, hedge timing, and combined-cost profit thresholds
- 15-minute Up/Down markets for BTC, ETH, SOL, and XRP
- Distinct npm scripts: start, sim, prod, dev, and build
Adoption & trust: 704 installs on skills.sh; 31 GitHub stars; 0/3 security scanners passed (skills.sh audits).
What problem does it solve?
You want Polymarket 15-minute Up/Down automation but lack a typed bot workflow that separates paper simulation from live CLOB order placement.
Who is it for?
Solo builders already familiar with npm, TypeScript, and exchange APIs who will run npm run sim extensively before npm run prod.
Skip if: Builders seeking passive income without coding, jurisdictional compliance review, or strategies unrelated to dump-and-hedge on 15-minute markets.
When should I use this skill?
Set up Polymarket arbitrage bot, configure trading automation, implement dump-and-hedge, or run the bot in simulation mode before production.
What do I get? / Deliverables
You get a built, configurable TypeScript bot with documented sim versus prod commands and strategy knobs before risking real capital on the CLOB.
- Compiled bot in dist/ runnable via npm start or npm run prod
- Simulation-validated strategy run via npm run sim
- Environment configuration derived from .env.example
Recommended Skills
Journey fit
Canonical shelf is Build because the deliverable is implementing and configuring an automated trading integration, not day-two production ops unless you have already shipped the bot. Integrations fits CLOB order execution, market feeds, and env-driven production toggles against an external exchange API.
How it compares
Use as a focused trading-bot skill package, not a general DeFi MCP server or manual Polymarket UI playbook.
Common Questions / FAQ
Who is polymarket-arbitrage-bot for?
Indie developers automating Polymarket short-interval Up/Down markets who need TypeScript CLOB integration and a simulation gate before live trades.
When should I use polymarket-arbitrage-bot?
During Build integrations when configuring dump-and-hedge parameters, wiring .env secrets, and choosing npm run sim versus npm run prod before Ship security review of keys and spend limits.
Is polymarket-arbitrage-bot safe to install?
Treat it as high-risk financial automation: review the Security Audits panel on this Prism page, audit the cloned repo, and never enable production without understanding wallet and API exposure.
SKILL.md
READMESKILL.md - Polymarket Arbitrage Bot
# Polymarket Arbitrage Bot > Skill by [ara.so](https://ara.so) — Daily 2026 Skills collection. TypeScript bot automating the **dump-and-hedge** strategy on Polymarket's 15-minute Up/Down markets (BTC, ETH, SOL, XRP). Detects sharp price drops, buys the dipped side, then hedges the opposite outcome when combined cost falls below a profit threshold. ## Installation ```bash git clone https://github.com/infraform/polymarket-arbitrage-bot.git cd polymarket-arbitrage-bot npm install npm run build cp .env.example .env ``` ## Key Commands | Command | Description | |---------|-------------| | `npm start` | Run compiled bot (simulation by default) | | `npm run sim` | Explicitly run in simulation (no real orders) | | `npm run prod` | Run with real trades (`PRODUCTION=true`) | | `npm run dev` | Run TypeScript directly via ts-node | | `npm run build` | Compile TypeScript to `dist/` | **Always test with `npm run sim` before enabling production mode.** ## Project Structure ``` src/ ├── main.ts # Entry point, config load, market discovery, wiring ├── config.ts # Loads/validates .env into typed config ├── api.ts # Gamma + CLOB API client (markets, orderbook, orders, redemption) ├── monitor.ts # Orderbook snapshot polling, strategy callback driver ├── dumpHedgeTrader.ts # Dump detection, leg1/leg2, stop-loss, P&L tracking ├── models.ts # Shared types: Market, OrderBook, TokenPrice, etc. └── logger.ts # history.toml append log + stderr output ``` ## Environment Configuration Create `.env` from `.env.example`: ```env # --- Wallet & Auth (required for production) --- PRIVATE_KEY=0x_your_private_key_here PROXY_WALLET_ADDRESS=0x_your_proxy_wallet_address SIGNATURE_TYPE=2 # 0=EOA, 1=Proxy, 2=GnosisSafe # --- Optional explicit CLOB API credentials --- # If not set, credentials are derived from signer automatically API_KEY= API_SECRET= API_PASSPHRASE= # --- API Endpoints (defaults are production Polymarket) --- GAMMA_API_URL=https://gamma-api.polymarket.com CLOB_API_URL=https://clob.polymarket.com # --- Markets --- MARKETS=btc # comma-separated: btc,eth,sol,xrp # --- Polling --- CHECK_INTERVAL_MS=1000 MARKET_CLOSURE_CHECK_INTERVAL_SECONDS=20 # --- Strategy Parameters --- DUMP_HEDGE_SHARES=10 # Shares per leg DUMP_HEDGE_SUM_TARGET=0.95 # Hedge when leg1 + opposite_ask <= this DUMP_HEDGE_MOVE_THRESHOLD=0.15 # 15% drop triggers dump detection DUMP_HEDGE_WINDOW_MINUTES=2 # Watch window at period start DUMP_HEDGE_STOP_LOSS_MAX_WAIT_MINUTES=5 DUMP_HEDGE_STOP_LOSS_PERCENTAGE=0.2 # --- Mode --- PRODUCTION=false # true = real trades ``` ## Core Types (models.ts) ```typescript // Key shared types used throughout the bot interface Market { conditionId: string; questionId: string; tokens: Token[]; // [upToken, downToken] startTime: number; endTime: number; asset: string; // "BTC", "ETH", etc. } interface Token { tokenId: string; outcome: string; // "Up" or "Down" } interface OrderBook { tokenId: string; outcome: string; bids: PriceLevel[]; asks: PriceLevel[]; bestBid: number; bestAsk: number; } interface TokenPrice { tokenId: string; outcome: string; bestBid: number; bestAsk: number; timestamp: number; } interface MarketSnapshot { upPr