Skip to content

🐦 Twitter sniper bot πŸ€–: Solana trading bot that triggers the keyword of the specific account's tweet and buy the target token πŸš€ instantly.

Notifications You must be signed in to change notification settings

TopTrenDev/twitter-sniper-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

20 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Twitter Keyword-Triggered Token Buyer Bot

πŸ“Œ Overview

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.


βš™οΈ Workflow

  1. πŸ” Monitor Tweets – The bot uses the Twitter API to listen to a chosen Twitter account in real-time.
  2. πŸ“ Keyword Detection – When a tweet contains one of your predefined keywords, the bot springs into action.
  3. πŸ’Έ Execute Token Swap – It sends a swap transaction via Jupiter API, instantly buying your preconfigured token.
  4. πŸ›‘ MEV Protection – All trades are routed through Astralane API to avoid frontrunning and speed up confirmation.
  5. πŸ“² Notification – Pushover sends an instant alert to your phone or desktop with trade details.
  6. πŸ“œ Logging – All detected tweets and executed trades are saved locally for auditing.

πŸš€ Getting Started

1️⃣ Clone Repository

git clone https://github.com/toptrendev/twitter-sniper-bot.git
cd twitter-sniper-bot

2️⃣ Install Dependencies

npm install

3️⃣ Configure Environment Variables

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

4️⃣ Run the Bot

npm start

πŸ“² Example Pushover Notification

πŸš€ Trade Executed!
Account: @elonmusk
Keyword: launch
Token: $YOURTOKEN_CA
Amount: 1.5 SOL
Transaction: https://solscan.io/tx/xxxxxxxx

πŸ“¬ Let’s Connect & Build Together

πŸ’¬ Open for collaborations, discussions, and cool blockchain ideas!

About

🐦 Twitter sniper bot πŸ€–: Solana trading bot that triggers the keyword of the specific account's tweet and buy the target token πŸš€ instantly.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published