This project is an automated Solana trading bot that listens to a specific Twitter account in real-time, detects predefined keywords in new tweets, and instantly buys a target token using Jupiter swap β with MEV protection and push notifications.
Itβs built for speed, reliability, and security, combining Twitter-based alpha detection with fast execution on Solana.
- π Monitor Tweets β The bot uses the Twitter API to listen to a chosen Twitter account in real-time.
- π Keyword Detection β When a tweet contains one of your predefined keywords, the bot springs into action.
- πΈ Execute Token Swap β It sends a swap transaction via Jupiter API, instantly buying your preconfigured token.
- π‘ MEV Protection β All trades are routed through Astralane API to avoid frontrunning and speed up confirmation.
- π² Notification β Pushover sends an instant alert to your phone or desktop with trade details.
- π Logging β All detected tweets and executed trades are saved locally for auditing.
git clone https://github.com/toptrendev/twitter-sniper-bot.git
cd twitter-sniper-bot
npm install
Create a .env file:
WALLET_PRIVATE_KEY =
QUICKNODE_RPC_URL =
JUPITER_API_BASE =
RAPID_HOST_NAME =
RAPID_API_KEYS =
ASTRALANE_URL =
ASTRALANE_API_KEY =
PUSHOVER_API_TOKEN =
PUSHOVER_USER_KEY =
MONITOR_USER1 = 'elonmusk'
MONITOR_KEYWORD1 = 'coin'
MONITOR_CA1 = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v'
MONITOR_BUY_AMOUNT1 = 0.0002
MONITOR_USER2 = 'elonmusk'
MONITOR_KEYWORD2 = 'solana'
MONITOR_CA2 = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v'
MONITOR_BUY_AMOUNT2 = 0.0001
SLIPPAGE_TOLERANCE = 100 # 1%
LOOP_TIME = 100
npm start
π Trade Executed!
Account: @elonmusk
Keyword: launch
Token: $YOURTOKEN_CA
Amount: 1.5 SOL
Transaction: https://solscan.io/tx/xxxxxxxx
π¬ Open for collaborations, discussions, and cool blockchain ideas!