A professional Discord bot for tracking Solana wallet activity and detecting "sniper" wallets that attempt to buy tokens early. This bot monitors wallet transactions in real-time and provides notifications when tracked wallets perform swaps.
- Real-time Wallet Tracking: Monitor specific Solana wallet addresses for swap activity
- Sniper Detection: Automatically detect wallets attempting to buy tokens before liquidity pools are created
- Token Analysis: Fetch token metadata, price data, and liquidity information from DexScreener
- Discord Integration: Receive instant notifications via Discord DMs when tracked wallets make transactions
- Market Monitoring: Track new OpenBook market creation and identify early buyers
- Node.js 16.x or higher
- npm or yarn package manager
- Discord Bot Token and Application ID
- Solana RPC endpoint (recommended: Helius, QuickNode, or Alchemy for better performance)
-
Clone the repository
git clone <repository-url> cd Solana-wallet-track-bot
-
Install dependencies
npm install # or yarn install -
Set up environment variables
Copy the example environment file and fill in your values:
cp env.example .env
Then edit the
.envfile with your actual credentials:# Discord Bot Configuration BOTTOKEN=your_discord_bot_token_here APP_ID=your_discord_application_id_here USER_ID=your_discord_user_id_here # Solana RPC Configuration # Use a reliable RPC provider like Helius, QuickNode, or Alchemy # Format: https://mainnet.helius-rpc.com/?api-key=YOUR_API_KEY # Or: https://api.mainnet-beta.solana.com (public, rate-limited) RPC_URL=https://api.mainnet-beta.solana.com
-
Get Discord Bot Credentials
- Go to Discord Developer Portal
- Create a new application
- Navigate to "Bot" section and create a bot
- Copy the bot token to
BOTTOKEN - Copy the Application ID to
APP_ID - Enable "Message Content Intent" in the Bot settings
- Get your Discord User ID (enable Developer Mode in Discord, right-click your profile, "Copy ID")
-
Set up Solana RPC
-
Start the bot
npm start # or node index.js -
Invite the bot to your Discord server
- Use this OAuth2 URL (replace
YOUR_APP_ID):
https://discord.com/api/oauth2/authorize?client_id=YOUR_APP_ID&permissions=2048&scope=bot%20applications.commands - Use this OAuth2 URL (replace
-
Use slash commands in Discord
Track a specific Solana wallet address for swap activity. The bot will send you a DM notification whenever the tracked wallet performs a swap.
Parameters:
address(string, required): The Solana wallet address to track
Example:
/track 7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU
Start monitoring for new OpenBook markets and automatically detect sniper wallets that attempt to buy tokens within 10 seconds of market creation.
Note: This command starts a continuous listener. Use /removeispy to stop it.
Stop the sniper detection listener that was started with /ispy.
Scan a token mint address to find wallets that attempted to buy the token before the liquidity pool was created (failed transactions).
Parameters:
mint(string, required): The token mint address to scan
Example:
/scan EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
Close the active wallet tracking session started with /track.
| Variable | Description | Required |
|---|---|---|
BOTTOKEN |
Discord bot token | Yes |
APP_ID |
Discord application ID | Yes |
USER_ID |
Your Discord user ID for receiving DMs | Yes |
RPC_URL |
Solana RPC endpoint URL | Yes |
- Helius:
https://mainnet.helius-rpc.com/?api-key=YOUR_API_KEY - QuickNode:
https://YOUR_ENDPOINT.solana-mainnet.quiknode.pro/YOUR_API_KEY/ - Alchemy:
https://solana-mainnet.g.alchemy.com/v2/YOUR_API_KEY - Public (Free):
https://api.mainnet-beta.solana.com(rate-limited, not recommended for production)
Solana-wallet-track-bot/
βββ commands/ # Discord slash commands
β βββ track.js # Track wallet command
β βββ ispy.js # Start sniper detection
β βββ removeispy.js # Stop sniper detection
β βββ scan.js # Scan token for snipers
β βββ close-track.js # Close tracking session
βββ utiles/ # Utility functions
β βββ index.js # Core utilities (tracking, token info, etc.)
β βββ getisniper.js # Real-time sniper detection
β βββ getMarkets.js # Market monitoring
β βββ getCreator.js # LP token analysis
βββ index.js # Main bot entry point
βββ package.json # Dependencies and scripts
βββ README.md # This file
- Sets up a WebSocket listener on the Solana network for the specified wallet
- Monitors transaction logs in real-time
- Parses swap transactions to extract SOL amounts and token mints
- Sends Discord DM notifications when swaps are detected
- Implements rate limiting (5-minute cooldown between notifications)
- Monitors OpenBook market creation events
- Tracks quote vault activity within 10 seconds of market creation
- Identifies wallets that attempt to buy before liquidity is available
- Reports snipers with their wallet addresses, buy amounts, and transaction fees
- Fetches market information for a given token mint
- Analyzes failed transactions on the market before pool creation
- Extracts wallet addresses and SOL amounts from failed buy attempts
- Categorizes snipers by SOL balance ranges
- Rate Limiting: The bot implements a 5-minute cooldown between notifications for the same wallet to prevent spam
- RPC Limits: Free RPC endpoints have rate limits. For production use, get a paid RPC provider
- WebSocket Connections: The bot maintains WebSocket connections to Solana. Ensure your server has stable internet connectivity
- Error Handling: The bot includes comprehensive error handling, but network issues may cause temporary disconnections
- Check that the bot token is correct in
.env - Verify the bot has been invited with proper permissions
- Ensure the bot is online in your Discord server
- Check console logs for error messages
- Verify
USER_IDis set correctly in.env - Check that DMs are enabled between you and the bot
- Ensure the tracked wallet address is valid
- Check RPC endpoint connectivity
- Verify your RPC URL is correct
- Check if you've exceeded rate limits (if using free tier)
- Consider upgrading to a paid RPC provider
- Check network connectivity
This project is provided as-is for educational and research purposes.
Contributions are welcome! Please feel free to submit a Pull Request.
This bot is for educational purposes only. Use at your own risk. The authors are not responsible for any financial losses or damages resulting from the use of this software.
For issues, questions, or contributions, please open an issue on the GitHub repository.
Made with β€οΈ for the Solana community