Discover and explore top open-source AI tools and projects—updated daily.
lorine93sAI-powered prediction market trading bot for CLOB arbitrage
Top 83.4% on SourcePulse
This project provides an automated trading bot for Polymarket's BTC 5m/15m Up/Down markets, leveraging CLOB arbitrage. It targets developers building prediction market bots in TypeScript and traders experimenting with short-horizon strategies, offering automated execution with robust risk management and an optional AI-driven decision layer for signal exploration.
How It Works
The system is built in TypeScript/Node.js, polling Polymarket's CLOB for UP and DOWN token prices. Trades are executed based on deterministic rules defined in trade.toml (e.g., time/price exits, range entries) or an optional, pluggable OpenClaw-style decision module. This module can operate deterministically or via an HTTP endpoint for LLM integration. The architecture features a market loop that resolves market data, polls prices, makes trading decisions, and submits orders via a v2 CLOB client with built-in retry policies and error handling.
Quick Start & Requirements
npm install..env.example to .env and populate required environment variables (e.g., POLYMARKET_PRIVATE_KEY, POLYMARKET_FUNDER_ADDRESS). Edit trade.toml to specify the market coin (e.g., btc), market period (e.g., 5 or 15), trading strategy (trade_1 or trade_2), notional trade size (trade_usd), and risk parameters like max_retries and entry_buy_cooldown_sec.npm run dev for development or npm run build followed by npm start for production-style execution.Highlighted Details
Maintenance & Community
No specific details regarding maintainers, community channels (like Discord or Slack), or project roadmap are provided in the README.
Licensing & Compatibility
The project is licensed under the ISC license. It is provided "as is" with no warranty, and users are advised to use it at their own risk. Compatibility for commercial use is not explicitly detailed beyond the permissive nature of the ISC license.
Limitations & Caveats
This is not a "risk-free" arbitrage bot; execution risks such as slippage, partial fills, API errors, and fast-moving markets can lead to financial losses. The bot trades one market window per configuration and does not implement synchronized dual-window arbitrage. Users should employ a dedicated wallet with funds they can afford to lose and ensure compliance with local laws and Polymarket's terms of service.
2 weeks ago
Inactive