An advanced automated bot designed to find and participate in cryptocurrency giveaways on Twitter. The bot can manage 100+ Twitter accounts simultaneously, automatically detect crypto token giveaways, verify token prices, participate according to giveaway rules, and monitor for winner announcements.
- Automatically searches Twitter for cryptocurrency and token giveaways
- Filters giveaways based on token price verification
- Only participates in giveaways for tokens with real market value
- Configurable minimum price and giveaway value thresholds
- Supports 100+ Twitter accounts simultaneously
- Automatic account rotation and load balancing
- Tracks participation statistics per account
- Rate limiting to avoid API restrictions
- Automatically detects giveaway requirements:
- Follow - Follows the organizer's account
- Retweet - Retweets the giveaway post
- Like - Likes the giveaway post
- Comment - Posts engaging comments
- Generates natural, varied comments to avoid spam detection
- Integrates with CoinGecko API for real-time token prices
- Only participates in giveaways for tokens with verified market prices
- Configurable minimum token price threshold
- Supports major cryptocurrencies (BTC, ETH, BNB, SOL, ADA, XRP, etc.)
- Monitors Twitter mentions for winner announcements
- Tracks when accounts are tagged by giveaway organizers
- Support for DM winner notifications (requires elevated API access)
- Automatic win rate tracking and statistics
- Database storage for all giveaways and participations
- Track wins per account
- Monitor participation rates
- Generate performance reports
- Python 3.8 or higher
- Twitter Developer Account with API access
- Multiple Twitter accounts for participation (1-100+)
- CoinGecko API key (optional, for better price data)
- Clone the repository:
git clone https://github.com/benihutapea/twitterga.git
cd twitterga- Install dependencies:
pip install -r requirements.txt- Set up configuration:
cp .env.example .env- Edit the
.envfile with your credentials:
nano .env-
Apply for Twitter Developer Account:
- Visit https://developer.twitter.com/en/portal/dashboard
- Apply for Elevated Access (required for some features)
- Create a new App in the Developer Portal
-
Get Bearer Token:
- In your app settings, find the Bearer Token
- Add it to
.envasTWITTER_BEARER_TOKEN
-
Get API Keys for Each Account:
- For each Twitter account you want to use:
- Generate API Key and Secret
- Generate Access Token and Secret
- Add them to
.envwith numbered suffixes:TWITTER_API_KEY_1=your_api_key TWITTER_API_SECRET_1=your_api_secret TWITTER_ACCESS_TOKEN_1=your_access_token TWITTER_ACCESS_SECRET_1=your_access_secret
- For each Twitter account you want to use:
Edit .env to customize bot behavior:
# Minimum token price (USD) to consider giveaway valuable
MIN_TOKEN_PRICE_USD=0.01
# Maximum number of accounts to use per giveaway
MAX_ACCOUNTS_TO_USE=100
# How often to check for new giveaways (minutes)
CHECK_INTERVAL_MINUTES=15
# Minimum followers required for giveaway organizer
MIN_FOLLOWERS_REQUIRED=1000
# Minimum estimated giveaway value (USD)
MIN_GIVEAWAY_VALUE_USD=50Start the bot:
python main.pyThe bot will:
- Initialize all configured accounts
- Search for crypto giveaways every 15 minutes (configurable)
- Automatically participate in qualifying giveaways
- Monitor for winner announcements
- Log all activities to
bot.log
Linux/Mac (using screen):
screen -S twitterbot
python main.py
# Press Ctrl+A then D to detachLinux (using systemd):
Create /etc/systemd/system/twitterbot.service:
[Unit]
Description=Twitter Giveaway Bot
After=network.target
[Service]
Type=simple
User=youruser
WorkingDirectory=/path/to/twitterga
ExecStart=/usr/bin/python3 main.py
Restart=always
[Install]
WantedBy=multi-user.targetThen:
sudo systemctl enable twitterbot
sudo systemctl start twitterbot
sudo systemctl status twitterbotThe bot searches Twitter using optimized queries:
- "crypto giveaway"
- "token giveaway"
- "BTC giveaway", "ETH giveaway"
- "crypto airdrop"
Each found tweet is analyzed:
- β Contains giveaway keywords
- β Mentions cryptocurrency/tokens
- β Token has verifiable market price
- β Token price meets minimum threshold
- β Organizer has sufficient followers
- β Estimated value meets minimum
The bot intelligently parses giveaway rules:
Example Tweet: "π GIVEAWAY π
Win 100 $TOKEN!
β
Follow @Organizer
β
Retweet
β
Like
β
Comment your wallet"
The bot detects all required actions automatically.
For each qualifying giveaway:
- Multiple accounts participate (up to configured limit)
- All required actions are performed
- Rate limiting prevents API restrictions
- Actions are logged to database
The bot monitors:
- Mentions: Checks if organizer tagged your accounts
- DMs: Checks for winner notification messages (requires elevated API)
- Automatically updates win statistics
The bot uses SQLite by default with three main tables:
Stores all detected giveaways with:
- Tweet information
- Token details and price
- Participation status
- Winner status
Tracks all managed accounts:
- Account credentials reference
- Usage statistics
- Win tracking
Logs all winner announcements:
- Notification type (DM/mention)
- Associated giveaway
- Timestamp
Twitter API has rate limits:
- Search: 180 requests per 15 minutes (per app)
- User Timeline: 900 requests per 15 minutes (per account)
- Follow/Retweet/Like: Various limits per account
The bot includes:
- Automatic rate limit handling
- Built-in delays between actions
- Request distribution across accounts
- Never commit
.envfile with credentials - Use separate API apps for different account groups
- Keep bearer tokens and secrets private
- Monitor accounts for suspicious activity
- Use accounts in compliance with Twitter TOS
- Verify all API keys are correct in
.env - Ensure bearer token has proper permissions
- Check that accounts haven't been suspended
- Increase
CHECK_INTERVAL_MINUTES - Reduce
MAX_ACCOUNTS_TO_USE - The bot should auto-handle this, but manual adjustment may help
- Check that search queries return results manually
- Verify
MIN_TOKEN_PRICE_USDisn't too high - Try adjusting
MIN_FOLLOWERS_REQUIRED
- Only run one instance of the bot
- Check file permissions on database file
The bot logs comprehensive statistics:
π Statistics:
- Total giveaways found: 145
- Total participations: 89
- Total wins: 7
- Active accounts: 50
- Win rate: 7.87%
Edit bot.py to add custom search queries:
def _build_search_queries(self) -> List[str]:
return [
"your custom query -is:retweet lang:en",
# Add more...
]Edit giveaway_parser.py to customize comments:
comments = [
"Your custom comment!",
# Add more...
]The bot uses CoinGecko but can be extended to use other price APIs in price_checker.py.
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
This bot is for educational purposes. Users are responsible for:
- Complying with Twitter's Terms of Service
- Not engaging in spam or abusive behavior
- Following applicable laws and regulations
- Using the bot ethically and responsibly
The authors are not responsible for:
- Account suspensions or bans
- Loss of funds or opportunities
- Any damages resulting from bot usage
MIT License - See LICENSE file for details
For issues, questions, or suggestions:
- Open an issue on GitHub
- Check existing issues for solutions
- Review documentation thoroughly
Future enhancements:
- Web dashboard for monitoring
- Telegram notifications for wins
- ML-based giveaway legitimacy scoring
- Multi-chain token price verification
- Automatic wallet address submission
- Discord integration
- Advanced analytics and reporting
Happy Giveaway Hunting! ππ