A high-performance sniper bot designed to detect and execute trades on newly created Meteora pools with minimal latency.
- Real-time Pool Detection: Uses Yellowstone GRPC streaming for instant transaction monitoring
- Parallel Execution: Executes buy transactions across multiple wallets simultaneously
- Jito Bundle Integration: Leverages Jito bundles for faster transaction processing with fallback to regular transactions
- Custom Transaction Building: Builds optimized transactions from scratch including token account creation and WSOL handling
- Speed Optimized: Every component designed for minimal latency
src/
├── core/
│ └── sniper-bot.ts # Main bot orchestrator
├── services/
│ ├── grpc-stream.ts # GRPC streaming service
│ ├── transaction-parser.ts # Meteora transaction parser
│ ├── transaction-builder.ts # Custom transaction builder
│ ├── jito-bundle-sender.ts # Jito bundle management
│ └── wallet-manager.ts # Multi-wallet management
├── types/
│ ├── config.ts # Configuration interfaces
│ └── meteora.ts # Meteora-specific types
└── utils/
└── config.ts # Configuration management
-
Install Dependencies
npm install
-
Configure Environment
cp env.example .env
Edit
.envwith your configuration:- GRPC_URL: Your Yellowstone GRPC endpoint
- X_TOKEN: Authentication token for GRPC
- METEORA_CONFIG_ACCOUNT: Meteora configuration account to monitor
- Trading parameters (amount, slippage, priority fees)
-
Setup Private Keys
Option A: Use a file (recommended for multiple wallets)
cp config/private-keys.example.txt config/private-keys.txt # Edit config/private-keys.txt with your actual private keys (one per line)Option B: Use environment variable
# Set PRIVATE_KEYS in .env with comma-separated keys PRIVATE_KEYS=key1,key2,key3 -
Build Project
npm run build
npm run devnpm run build
npm start# Run all tests
npm test
# Run tests in watch mode
npm run test:watch
# Run tests with coverage
npm run test:coverage| Variable | Description | Required |
|---|---|---|
GRPC_URL |
Yellowstone GRPC endpoint | ✅ |
X_TOKEN |
GRPC authentication token | ❌ |
METEORA_CONFIG_ACCOUNT |
Meteora config account address | ✅ |
METEORA_PROGRAM_ID |
Meteora program ID | ✅ |
JITO_BLOCK_ENGINE_URL |
Jito block engine URL | ✅ |
JITO_TIP_ACCOUNT |
Jito tip account address | ✅ |
SNIPE_AMOUNT_SOL |
SOL amount per wallet | ✅ |
MAX_SLIPPAGE_BPS |
Max slippage in basis points | ✅ |
PRIORITY_FEE_MICRO_LAMPORTS |
Priority fee | ✅ |
PRIVATE_KEYS_FILE |
Path to private keys file | ✅* |
PRIVATE_KEYS |
Comma-separated private keys | ✅* |
*Either PRIVATE_KEYS_FILE or PRIVATE_KEYS must be provided. File takes priority.
- Snipe Amount: Amount of SOL to use per wallet
- Max Slippage: Maximum acceptable slippage in basis points (500 = 5%)
- Priority Fee: Micro-lamports for compute unit price
-
Initialization:
- Loads configuration from environment variables
- Initializes all wallets and checks balances
- Sets up GRPC connection and services
-
Monitoring:
- Streams transactions from Yellowstone GRPC
- Filters for Meteora program transactions
- Parses transactions to detect pool creation
-
Execution:
- Extracts pool account information from creation transaction
- Builds buy transactions for all wallets in parallel
- Sends transactions via Jito bundles (with fallback)
- Stops bot after successful execution
- Private keys are loaded from environment variables
- No private keys are logged or stored
- Each wallet operates independently
- Fallback transaction method if Jito fails
- Parallel Processing: All operations are parallelized where possible
- Pre-built Components: Transactions are built using optimized, pre-calculated components
- Minimal Latency: Direct GRPC streaming with immediate processing
- Jito Integration: Uses Jito bundles for faster block inclusion
The bot provides real-time logging including:
- Transaction detection and parsing
- Wallet balance information
- Execution timing and results
- Error handling and fallbacks
- Graceful shutdown on SIGINT/SIGTERM
- Automatic GRPC stream reconnection
- Fallback to regular transactions if Jito fails
- Comprehensive error logging
MIT License