A configurable Polymarket trading bot for 15m Up/Down markets using RSI, MACD, and Momentum signals.
If you are searching for a Polymarket Arbitrage bot, this repo is a signal-based trading bot (not a true cross-market arbitrage engine), but it is a practical base to build arbitrage logic on top of the Polymarket CLOB and Gamma APIs.
- Discovers active ETH/BTC Polymarket markets from Gamma API
- Pulls token prices from CLOB API
- Computes rolling RSI / MACD / Momentum indicators
- Produces
BuyUp/BuyDown/NoActiondecisions - Runs in simulation mode with detailed logs
- Supports CLOB authentication and order helper methods for extension
--simulation: fully supported and continuously logs signals/actions--live: currently starts the same loop as simulation (real order execution is scaffolded but not wired into the main loop yet)
- Polymarket trading bot
- Polymarket bot
- Polymarket Arbitrage bot (base project, not full arbitrage yet)
- Polymarket API bot
- Polymarket CLOB bot
Configure under trending_index.mode:
rsimacdmacd_signalmomentum
Core strategy inputs:
thresholdlookbackmacd_fast_periodmacd_slow_periodmacd_signal_periodposition_size
- Node.js
>= 18 - npm
- Polymarket private key for auth checks
npm install
copy config.json.example config.jsonEdit config.json:
- Set
polymarket.private_key - Optionally set
api_key,api_secret,api_passphrase
Run simulation:
npm run dev
# or
npm run simulationRun live mode entrypoint:
npm run liveUse a custom config path:
npx tsx src/main.ts --config path/to/config.jsongamma_api_urlclob_api_urlprivate_keyapi_key,api_secret,api_passphraseproxy_wallet_addresssignature_type
modethresholdlookbackmacd_fast_periodmacd_slow_periodmacd_signal_perioduse_macd_sl_filter
check_interval_msposition_sizeprofit_thresholdstop_loss_thresholdenable_eth_tradingenable_solana_tradingenable_xrp_tradingtrading_start_when_remaining_minutes
src/
main.ts # app entrypoint, auth check, market discovery, mode selection
config.ts # config loading and CLI args
api.ts # Polymarket Gamma + CLOB wrapper
clob.ts # wallet, CLOB client creation, order helper
monitor.ts # market discovery and snapshots
indicators.ts # rolling RSI/MACD/Momentum
strategies.ts # trading decision engine
simulation.ts # simulation loop and logging
types.ts # app types
To convert this into a stronger Polymarket Arbitrage bot, add:
- Cross-market price spread detection (related markets / outcome parity)
- Multi-leg execution with slippage controls
- Position netting and inventory risk checks
- Latency-aware quoting and cancellation logic
- PnL accounting per strategy and market
This software is for research/education. Trading prediction markets involves significant risk. Test extensively in simulation before real execution.