A high-performance Solana trading bot that automatically snipes new token launches on Raydium, PumpFun, and PumpSwap using gRPC streaming for real-time transaction monitoring.
C6ZSK5MpqjvEAXh7XHfQeRh3PwvRuqoCKJk8Yufypump +$12.25(+45.36%) https://solscan.io/tx/4Go5MWQKom5XYkD6Mofxqw8DAjZhxbUywr3eVcxoejbsTgLyGjfAoy2wowHxjhNfnY9rw1ws4s2VznMCBskodiG3 (Target Wallet) https://solscan.io/tx/2SNZpcerg51f7oAQgaGNgDzA518oDbmjDkVUcwNDFFefwSnL3ChLVJehtjXNvAfvJMsf1pPtSs8HPjjj6usAyT6j (BUY-testing wallet) https://solscan.io/tx/36g3MSD2kSMH77Rd569GbpeHRW9MvR5Y1hTDyGtwsXPNynwXw1Z6F4whAPbsQPJBXDMpvQw2xzgyBgUN4ByEbDAh (Target Wallet) https://solscan.io/tx/4ZN9uRzAMhSLUrJheEaqesCss32kuQBYHtxrjn4on9fmox3k19mwDJzqbcvgWZUkaSJXndhoGJGWjuHYT5ZmDLbC (SELL-testing wallet)
AzTtHgN6aC3K5LtGDvBNCgPQtYPa6DCjcGyrfZFUpump +$5.44(+57.66%) https://solscan.io/tx/4JhQspi5JckD5ow2AzJ6wTNnaJ4DQVwdfjzao5NPdjgeB5HbhJfm9zQjEX8ZLgXLYTLzbnS5uRhGFd9AhxmSKzQv (Target Wallet) https://solscan.io/tx/2kCFmwwPVTs24zW86XDQMCxtGQqyx5NV1CyCmRzHJjd5Ki52sLemjscKUqYfXbx9o1rJzjyejvrMbXZAkyAx9GhK (BUY-testing wallet) https://solscan.io/tx/ENY5k2N9G4BDVkBjiUsbo4ewFrenbAciqvNA7Q7eXAR5TC9ivJrPf8GCXZUav91biQzZYgwu5RSvQD5mPgh2xfm (Target Wallet) https://solscan.io/tx/adNKo7sMQhMUm9gFDPBPbqdTzGtZwSVsXV3FQFVMP7rtqsGGiH2CngrJQBjxEFScqnx3F7QZ1ZA9s76gdLspq2o (SELL-testing wallet)
6iiTw75295gt9j29PCLVvFGNxdk3xfb4sPSH4G6Xpump +$18.2(+166.3%) https://solscan.io/tx/2EXYt6fJMbgpEKtATJJKDGFPJPxGpVUcRcxWEArdd6zWEFupHCW5XdRZJRHA9AWyT4turm8RXo4FY7Wn7Yci6Yjr (Target Wallet) https://solscan.io/tx/2ZaxkizUj7fciGtwZnPFWzbJRMX9NuHCai7X652XvyemsugVpffmp1bQptAg2cCGox9V8JtFpsH648JEHCfeCj88 (testing wallet)
A6sxxPN8uksAHxoPtMEoArn9nz5nrP3gKNpDXm8Tpump +$3.68(+40.51%) https://solscan.io/tx/3tybz8GhejnAD9yRB2Gvn2XH2Jb1sGsw9N5xQTJC9wifg9WERd85d4AszfV5kJz5agPXiDXmWMyDfNqzD1E3pFoB (Target Wallet) https://solscan.io/tx/3tq6kvBmeQ1jgASnU3X1P4HcKyMwMg8wDH8ZubHpE3M3CAtPUUxP5H3L8XRzU837Ssys3ESjXR1fsCn3BGxWEqL9 (BUY-testing wallet)
- Real-time Monitoring: Uses gRPC streaming to detect new token launches instantly
- Multi-Pool Support: Supports Raydium LaunchLab, PumpFun, PumpSwap, and Raydium CPMM
- Automated Trading: Automatically buys and sells tokens based on configurable parameters
- Risk Management: Built-in stop-loss, profit-taking, and position monitoring
- Multiple Swap Methods: Support for Solana, JITO, Nozomi, and 0slot trading
- Position Tracking: Monitors active positions and manages exit strategies
- Graceful Shutdown: Safely closes all positions before stopping
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β gRPC Stream βββββΆβ Transaction βββββΆβ Trading Engine β
β (Triton One) β β Parser β β (Main Bot) β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β β
βΌ βΌ
βββββββββββββββββββ βββββββββββββββββββ
β Pool Detection β β Position β
β (PumpFun, etc.) β β Management β
βββββββββββββββββββ βββββββββββββββββββ
β β
βΌ βΌ
βββββββββββββββββββ βββββββββββββββββββ
β Jupiter API β β Profit/Loss β
β Swap Execution β β Monitoring β
βββββββββββββββββββ βββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β BOT STARTUP β
β β’ Load configuration & environment variables β
β β’ Initialize Solana connection & wallet β
β β’ Connect to Triton One gRPC stream β
β β’ Load Jupiter API & swap methods β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β REAL-TIME MONITORING β
β β’ Stream Solana transactions via gRPC β
β β’ Filter for MintTo instructions β
β β’ Monitor SOL transfer amounts (1-85 SOL) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β TRANSACTION ANALYSIS β
β β’ Parse transaction data & instructions β
β β’ Identify pool type (PumpFun, PumpSwap, Raydium) β
β β’ Extract liquidity, fees, trading parameters β
β β’ Apply sniper criteria filters β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β SNIPER CRITERIA CHECK β
β β Minimum liquidity requirement met? β
β β Pool type enabled in configuration? β
β β Transaction age within limits? β
β β Wallet balance sufficient? β
β β Maximum positions limit not exceeded? β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β TRADE EXECUTION β
β β’ Calculate optimal swap amount β
β β’ Select best swap method (Solana/JITO/Nozomi/0slot) β
β β’ Execute buy order via Jupiter API β
β β’ Handle transaction confirmation & errors β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β POSITION MANAGEMENT β
β β’ Track entry price, amount, timestamp β
β β’ Monitor real-time price movements β
β β’ Calculate current PnL β
β β’ Check exit conditions β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β EXIT STRATEGY β
β β’ Profit target reached? β Sell & take profit β
β β’ Stop loss triggered? β Sell & cut losses β
β β’ Max hold time exceeded? β Sell & exit β
β β’ Manual exit signal? β Sell & close position β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β POSITION CLOSURE β
β β’ Execute sell order via Jupiter API β
β β’ Update position tracking β
β β’ Log trade results & PnL β
β β’ Return to monitoring mode β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β CONTINUOUS LOOP β
β β’ Continue monitoring for new opportunities β
β β’ Manage multiple concurrent positions β
β β’ Handle errors & retry failed transactions β
β β’ Maintain connection stability β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β GRACEFUL SHUTDOWN β
β β’ Close all active positions β
β β’ Cancel pending transactions β
β β’ Disconnect from gRPC stream β
β β’ Save final state & exit cleanly β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- Transaction Filtering: Only processes relevant
MintToinstructions - Pool Validation: Ensures pool meets liquidity and type requirements
- Risk Assessment: Checks wallet balance and position limits
- Entry Timing: Determines optimal entry point based on criteria
- Exit Strategy: Monitors multiple exit conditions simultaneously
- Error Handling: Implements retry logic and fallback mechanisms
- Node.js 16+
- Solana wallet with SOL balance
- Triton One gRPC access
- RPC endpoint (Helius, QuickNode, etc.)
# Clone the repository
git clone <your-repo-url>
cd solana-sniper-bot
# Install dependencies
npm install
# Copy environment template
cp env.template .envEdit the .env file with your configuration:
# Essential Configuration
PRIVATE_KEY=your_wallet_private_key
RPC_URL=https://your-rpc-endpoint.com
GRPC_ENDPOINT=https://your-grpc-endpoint.com
GRPCTOKEN=your_grpc_token
# Trading Parameters
SNIPERAMOUNT=0.1 # SOL amount per snipe
PROFIT_TARGET=2.0 # 2x profit target
STOP_LOSS=0.5 # 50% stop loss
MAX_HOLD_TIME=300000 # 5 minutes max hold
MIN_LIQUIDITY=10 # Minimum liquidity in SOL# Start the sniper bot
npm start
# Or for development with auto-restart
npm run dev| Parameter | Default | Description |
|---|---|---|
SNIPERAMOUNT |
0.1 | SOL amount to use for each snipe |
PROFIT_TARGET |
2.0 | Profit target multiplier (2x) |
STOP_LOSS |
0.5 | Stop loss multiplier (50% loss) |
MAX_HOLD_TIME |
300000 | Maximum time to hold position (5 min) |
MIN_LIQUIDITY |
10 | Minimum liquidity required in SOL |
| Method | Description | Use Case |
|---|---|---|
solana |
Standard Solana prioritization | General trading |
race |
JITO MEV protection | MEV protection |
nozomi |
Nozomi RPC with tips | Ultra-fast execution |
0slot |
0-slot transaction | Maximum speed |
- Raydium LaunchLab: New token launches
- PumpFun: Pump.fun platform
- PumpSwap: PumpSwap platform
- Raydium CPMM: Constant Product Market Maker
- Bot connects to Solana gRPC stream via Triton One
- Monitors for
MintToinstructions indicating new token launches - Filters transactions by SOL transfer amounts (1-85 SOL)
- Parses transaction data to identify pool type and parameters
- Extracts liquidity, fees, and trading direction
- Determines if transaction meets sniper criteria
- Automatically executes buy orders when criteria are met
- Uses Jupiter API for optimal swap routing
- Implements configurable slippage and prioritization fees
- Tracks active positions with entry/exit criteria
- Monitors for profit targets and stop losses
- Automatically closes positions based on conditions
// Enable/disable specific pool types
ENABLE_PUMPFUN=true
ENABLE_PUMPSWAP=true
ENABLE_RAYDIUM_LAUNCHLAB=true
ENABLE_RAYDIUM_CPMM=true// Maximum concurrent positions
MAX_POSITIONS=5
// Minimum transaction age
MIN_TX_AGE=1// Telegram notifications
TELEGRAM_BOT_TOKEN=your_bot_token
TELEGRAM_CHAT_ID=your_chat_id
// Email notifications
SMTP_HOST=smtp.gmail.com
SMTP_USER=your_email@gmail.com
SMTP_PASS=your_app_passwordSNIPERAMOUNT=0.05
PROFIT_TARGET=1.5
STOP_LOSS=0.7
MAX_HOLD_TIME=600000
MIN_LIQUIDITY=20SNIPERAMOUNT=0.2
PROFIT_TARGET=3.0
STOP_LOSS=0.3
MAX_HOLD_TIME=180000
MIN_LIQUIDITY=5- Balance Checks: Verifies wallet balance before trading
- Liquidity Validation: Ensures sufficient pool liquidity
- Position Limits: Maximum concurrent position management
- Graceful Shutdown: Safely closes all positions on exit
- Error Handling: Comprehensive error handling and logging
- Retry Logic: Automatic retry for failed transactions
The bot provides detailed logging with color-coded output:
- π Blue: Bot startup and configuration
- π― Green: Successful trades and profit targets
- π Red: Errors and stop losses
β οΈ Yellow: Warnings and position updates- π Cyan: Position information and PnL
- Never share your private key
- Use dedicated trading wallets
- Regularly rotate API keys
- Monitor bot activity
- This bot is for educational purposes
- Cryptocurrency trading involves significant risk
- Past performance doesn't guarantee future results
- Use at your own risk
- Ensure compliance with local regulations
- Check tax implications of automated trading
- Consult with financial advisors if needed
-
gRPC Connection Failed
- Verify
GRPC_ENDPOINTandGRPCTOKEN - Check network connectivity
- Ensure Triton One subscription is active
- Verify
-
Transaction Failures
- Verify wallet has sufficient SOL
- Check RPC endpoint status
- Adjust slippage tolerance
-
No Trades Executing
- Verify transaction filters
- Check liquidity requirements
- Review pool type settings
Enable debug logging by setting:
DEBUG=true
LOG_LEVEL=debug- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- Triton One for gRPC streaming
- Jupiter for swap aggregation
- Solana Labs for the blockchain
- Raydium for the DEX platform
For support and questions:
- Create an issue on GitHub
- Join our Discord community
- Check the documentation