Skip to content

XinnBlueBird/polymarket-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

96 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BASMEN POLYMARKET AI BOT

AI-powered Polymarket trading system with Telegram control, smart dashboard, Martingale logic, Sniper SIM mode, OpenRouter free LLM, risk filters, and PM2 deployment.

Node.js PM2 Polymarket AI Status


Preview

Put your dashboard screenshot here:

dashboard-preview.png

Upload the screenshot to the repo root, or replace the image URL above.


Features

  • Polymarket BTC 5M AI bot
  • Telegram command center
  • Web dashboard command center
  • Martingale / Flat / Kelly modes
  • Sniper SIM mode with 1c / 2c / 3c tier orders
  • OpenRouter free LLM rotation
  • Adaptive confidence filter
  • Loss cooldown system
  • Daily loss protection
  • Circuit breaker
  • Orderbook signal
  • RSI / Bollinger Band / Wick signal
  • Trend and volatility protection
  • PM2 production setup
  • Mobile-friendly dashboard

Project Structure

polymarket-bot/
├── dashboard/
│   └── server.js
├── src/
│   ├── martingale-bot.js
│   ├── modules/
│   │   └── direktur/
│   ├── services/
│   ├── utils/
│   └── config/
├── pm2/
├── scripts/
├── ecosystem.config.js
├── package.json
├── .env.example
└── README.md

Requirements

Ubuntu 22.04+
Node.js 20+
NPM
PM2
Git
Telegram Bot Token
Polymarket Wallet
OpenRouter API Key

Installation

1. Clone Repository

git clone https://github.com/BasmenXinn/polymarket-bot.git
cd polymarket-bot

2. Install Dependencies

npm install

3. Setup ENV

cp .env.example .env
nano .env

ENV Example

Never upload your real .env.

# =========================
# WALLET
# =========================
PRIVATE_KEY=
POLYMARKET_FUNDER=
POLYMARKET_SIGNATURE_TYPE=1

# =========================
# TELEGRAM
# =========================
TELEGRAM_BOT_TOKEN=
TELEGRAM_CHAT_ID=

# =========================
# OPENROUTER FREE LLM
# =========================
OPENROUTER_API_KEY=

# =========================
# BOT CONFIG
# =========================
DRY_RUN=true

MARTINGALE_BASE_SIZE=1
MARTINGALE_MULTIPLIER=2
MARTINGALE_MAX_STEPS=2
MARTINGALE_RESET_ON_WIN=true
MARTINGALE_TARGET_PROFIT=10

MARTINGALE_ASSETS=btc
MARTINGALE_DURATION=5m

# =========================
# DASHBOARD
# =========================
PORT=3000
DASHBOARD_KEY=polymarket

Run With PM2

pm2 start ecosystem.config.js
pm2 save

Enable PM2 auto-start:

pm2 startup

Run the command PM2 gives you, then:

pm2 save

PM2 Commands

pm2 status
pm2 logs polymarket-live
pm2 logs polymarket-dashboard
pm2 restart polymarket-live
pm2 restart polymarket-dashboard
pm2 stop polymarket-live
pm2 monit

Dashboard

http://YOUR_VPS_IP:3000/mini?key=YOUR_DASHBOARD_KEY

Example:

http://38.49.xxx.xxx:3000/mini?key=polymarket

Telegram Commands

/status
/dashboard
/start
/stop
/pnl
/reset
/redeem
/analyze

Mode Commands

/mode
/mode_martingale
/mode_sniper
/mode_flat
/mode_kelly

Asset Commands

/btc
/eth
/sol
/xrp
/doge

Trading Modes

Martingale Mode

Default recovery strategy with max step protection.

Flat Mode

Fixed bet size mode.

Kelly Mode

Dynamic bet size based on performance.

Sniper SIM Mode

Sniper mode using 3-tier cheap entries:

Tier 1: 0.03
Tier 2: 0.02
Tier 3: 0.01

Default is SIM / dry-run for safety.


AI Logic

The bot combines:

Orderbook
RSI
Bollinger Band
Wick
Momentum
Trend Bias
Volatility
OpenRouter LLM

Risk Protection

Low confidence       -> HOLD
Signal conflict      -> HOLD
High volatility      -> HOLD
Loss streak          -> cooldown
Daily loss limit     -> pause
Circuit breaker      -> pause

OpenRouter Free Models

The bot uses OpenRouter free model rotation.

Example supported models:

openrouter/free
deepseek/deepseek-r1:free
meta-llama/llama-3.3-70b-instruct:free
google/gemma-3-27b-it:free
mistralai/mistral-nemo:free

Security

Do not commit:

.env
data/
logs/
node_modules/
private keys
wallet secrets

Update

git pull
npm install
pm2 restart polymarket-live
pm2 restart polymarket-dashboard

Disclaimer

This project is experimental.

Trading involves risk.

Use at your own responsibility.


Credits

  • BasmenXinn
  • direkturcrypto architecture
  • OpenRouter
  • Polymarket

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors