Deployer Intelligence Trading Bot for Solana Memecoins
An automated trading bot that leverages deployer wallet analysis and AI narrative scoring to identify high-probability trading opportunities in the Solana memecoin market via Bags.fm.
Historical analysis reveals that top deployers outperform by 7,700x:
- Top 10 deployers: 365,000 SOL profit
- Average deployers: 47.3 SOL profit
This bot identifies and tracks these elite deployers to catch their token launches early.
| Feature | Description |
|---|---|
| Deployer Intelligence | Tracks deployer wallets, graduation rates, and historical performance |
| AI Narrative Analysis | DeepSeek-powered analysis of token cultural relevance and virality potential |
| Multi-Stage Filtering | Fast-fail architecture for efficient token evaluation |
| Circuit Breaker | 4-level risk management system with automatic position reduction |
| Tiered Take-Profits | Structured exit strategy (1.5x/2x/3x/5x tiers) |
| Professional Trader Logic | Fee-aware, momentum-based entry/exit decisions |
| MEV Protection | Jito bundle integration to prevent sandwich attacks |
| Adaptive Position Sizing | Position sizes scale with wallet balance |
| Telegram Control | Real-time alerts and bot control via Telegram |
| Monitoring | Prometheus/Grafana dashboards for performance tracking |
┌─────────────────────────────────────────────────────────────────┐
│ BAGS SNIPER BOT │
├─────────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────────────┐ │
│ │ Token │ │ Deployer │ │ AI Narrative │ │
│ │ Discovery │──│ Intelligence │──│ Analysis │ │
│ │ (Helius) │ │ (Scoring) │ │ (DeepSeek) │ │
│ └──────────────┘ └──────────────┘ └──────────────────────┘ │
│ │ │ │ │
│ ▼ ▼ ▼ │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ FILTER ENGINE │ │
│ │ Deployer → Basic → Security → Market Cap → Quality │ │
│ └─────────────────────────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────────┐ │
│ │ TRADING ENGINE │ │
│ │ Position Sizer → Entry → Exit Management → Recording │ │
│ └─────────────────────────────────────────────────────────┘ │
│ │ │ │
│ ▼ ▼ │
│ ┌──────────────┐ ┌──────────────┐ │
│ │ Bags.fm API │ │ Telegram │ │
│ │ (Trading) │ │ (Alerts) │ │
│ └──────────────┘ └──────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────┘
- Python 3.11+
- Docker Desktop
- Bags.fm account + API key
- Helius API key (free tier available)
- Telegram bot (create via @BotFather)
- Dedicated Solana wallet (NOT your main wallet!)
# Clone the repository
git clone https://github.com/natekali/moneybags.git
cd moneybags
# Install Python package
pip install -e .
# Start database services
docker-compose up -d postgres redis
# Configure environment
cp .env.example .env
# Edit .env with your API keys and walletEdit .env with your credentials:
# Required
WALLET_PRIVATE_KEY=your_base58_private_key
BAGS_API_KEY=your_bags_api_key
HELIUS_API_KEY=your_helius_api_key
TELEGRAM_BOT_TOKEN=your_telegram_bot_token
TELEGRAM_CHAT_ID=your_chat_id
# Optional AI (improves token scoring)
DEEPSEEK_API_KEY=your_deepseek_api_key
# Safety - keep true until ready
DRY_RUN=truepython scripts/verify_setup.py# Dry run mode (no real trades)
python -m bags_sniper.cli run
# After testing, set DRY_RUN=false in .env for live tradingSee QUICKSTART.md for detailed setup instructions.
# Health check
python -m bags_sniper.cli health
# Populate historical deployer data
python -m bags_sniper.cli backfill --days 7
# View top performing deployers
python -m bags_sniper.cli top --limit 20
# Run backtest simulation
python -m bags_sniper.cli backtest --days 7
# Start the trading bot
python -m bags_sniper.cli run| Command | Description |
|---|---|
/start |
Initialize bot |
/status |
View bot status and P&L |
/balance |
Check wallet balance |
/positions |
View open positions |
/pause |
Pause new entries |
/resume |
Resume trading |
/exitall |
Emergency exit all positions |
Automatically reduces exposure during drawdowns:
| Level | Drawdown | Action |
|---|---|---|
| Normal | < 3% | Full position sizes |
| L1 | 3-5% | 50% position sizes |
| L2 | 5-8% | 25% position sizes |
| L3 | 8-10% | New entries paused |
| L4 | > 10% | Full shutdown, exit all |
| Level | Trigger | Action |
|---|---|---|
| TP1 | 1.5x | Sell 30% |
| TP2 | 2.0x | Sell 30% |
| TP3 | 3.0x | Sell 20% |
| TP4 | 5.0x | Sell remaining |
| Stop Loss | -30% | Exit position |
- Volume drops 60% from peak
- Top holder sells >8% of holdings
- Circuit breaker Level 4
Start Grafana and Prometheus:
docker-compose --profile monitoring up -d| Service | URL | Credentials |
|---|---|---|
| Grafana | http://localhost:3000 | admin / bags_sniper |
| Prometheus | http://localhost:9091 | - |
bags-sniper/
├── src/bags_sniper/
│ ├── core/ # Core trading logic
│ │ ├── trading_engine.py
│ │ ├── filter_engine.py
│ │ ├── deployer_intelligence.py
│ │ ├── quality_gate.py
│ │ ├── circuit_breaker.py
│ │ └── config.py
│ ├── services/ # External service integrations
│ │ ├── bags_api.py
│ │ ├── solana_rpc.py
│ │ ├── deepseek_ai.py
│ │ ├── telegram_bot.py
│ │ └── jupiter_api.py
│ ├── models/ # Database models
│ └── backtest/ # Backtesting engine
├── tests/ # Unit and integration tests
├── monitoring/ # Prometheus/Grafana configs
├── docker-compose.yml
├── pyproject.toml
└── QUICKSTART.md
See .env.example for all configuration options.
| Variable | Default | Description |
|---|---|---|
DRY_RUN |
true |
Simulate trades without execution |
MAX_POSITION_SIZE_SOL |
0.3 |
Maximum SOL per trade |
MIN_DEPLOYER_SCORE |
60.0 |
Minimum deployer score to trade |
STOP_LOSS_PERCENT |
30.0 |
Hard stop loss percentage |
USE_JITO_BUNDLES |
true |
Enable MEV protection |
# Install dev dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Format code
black src/ tests/
ruff check src/ tests/
# Type checking
mypy src/This software is for educational purposes only.
- Trading memecoins is extremely risky
- You can lose 100% of your investment
- Past performance does NOT guarantee future results
- Never trade money you cannot afford to lose
- You are solely responsible for any trading decisions
The authors and contributors are not liable for any financial losses incurred through the use of this software.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
