Skip to content

xavierrrr420-cpu/SolTrench

Repository files navigation

Trench Bot 🪖

Solana memecoin trenching bot. Scans GMGN trending tokens every 30s, applies multi-layer filters, checks safety, then buys via Jupiter with auto TP/SL.


Quick Start (Ubuntu VPS)

git clone <repo> trench-bot && cd trench-bot
npm install
cp .env.example .env
nano .env          # fill in keys
node index.js      # DRY_RUN=true by default

.env Config

Variable Description
WALLET_PRIVATE_KEY Base58 private key of your trading wallet
RPC_URL Helius mainnet RPC URL
HELIUS_API_KEY For token balance lookups
TELEGRAM_BOT_TOKEN From @BotFather
TELEGRAM_CHAT_ID Auto-filled on first Telegram message
DRY_RUN true = simulate only (default), false = live

Strategy Logic

Scan GMGN trending (every 30s)
  ↓
Filter: Liq $10k–50k | MCap $100k–500k | Age 0–48h
        TX 50+/1h | Bot ratio < 40% | Smart wallets ≥ 2
  ↓
Dip check: current price ≥ 20% below ATH since launch
  ↓
Safety: RugCheck (honeypot / sell tax) + Deployer blacklist
  ↓
BUY 0.1 SOL via Jupiter (max 3 open positions)
  ↓
Monitor every 15s:
  TP hit (2x) → auto sell
  SL hit (-50%) → auto sell
  Liq drops < $10k → emergency sell

Telegram Commands

Command Action
/status Bot status + open positions
/positions Detailed position list with TP/SL
/sell <mint> Force close a position
/pause Pause scan loop
/resume Resume scan loop
/help Show commands

Requirements

  • Node.js 18+
  • Funded Solana wallet (≥ 0.5 SOL recommended)
  • Helius API key (free tier works)
  • GMGN API key (apply at https://gmgn.ai/ai)
  • Telegram bot token (optional but recommended)

GMGN API Key Setup

  1. Go to https://gmgn.ai/ai
  2. Generate Ed25519 key pair (https://github.com/binance/asymmetric-key-generator)
  3. Upload public key + your VPS IP
  4. Get API key → add to config if GMGN requires auth

Note: Public GMGN data endpoints may work without auth. If you get 403s, add your GMGN API key to GMGN_HEADERS in config.js.


Run with screen (VPS)

screen -S trench
node index.js
# Ctrl+A then D to detach
# screen -r trench to reattach

Disclaimer

This bot trades real SOL. Use at your own risk. Always test with DRY_RUN=true first.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors