Skip to content

screenerbotio/ScreenerBot

Repository files navigation

ScreenerBot Banner

ScreenerBot

Open Source Solana Trading Engine

Built with Rust Powered by Solana Electron Desktop BSL 1.1 License Documentation Telegram Community GitHub Stars Download X Follow

A high-performance, open source, local-first automated trading system for Solana DeFi.
Built in Rust for native runtime performance and direct blockchain interaction.
100% free. 100% open source. Your keys never leave your machine.

WebsiteDocumentationDownloadJoin Community


🌟 Screenshots

Dashboard Overview Transaction Monitor
Dashboard Overview Transaction Monitor
Open Positions Position History
Open Positions Position History
Trader Interface Token Details
Trader Interface Token Details

💡 Support Development

Donations unlock VIP support and priority feature requests.

Donate SOL

D6g8i5HkpesqiYF6YVCL93QD3py5gYwYU9ZrcRfBSayN


⚠️ Risk Disclaimer

Cryptocurrency trading involves substantial risk of loss and is not suitable for every investor.
This software may contain bugs or issues that could result in financial losses.
The developers are not responsible for any financial losses incurred through use of this software.
Trade at your own risk. Never invest more than you can afford to lose.


💰 How We're Funded

ScreenerBot uses Jupiter's referral program to earn a small fee on swaps.
This helps fund development while keeping the software free and open source.
You can disable or replace the referral account in the swap configuration.


Why Rust?

ScreenerBot is written in Rust — the same language Solana itself is built with. This isn't a coincidence:

  • Native Performance: Compiled to machine code, not interpreted. Executes as fast as C/C++.
  • Memory Safety: No garbage collector pauses. Predictable, consistent execution times.
  • Concurrency: Fearless parallelism with async/await. Handle thousands of tokens simultaneously.
  • Reliability: If it compiles, it runs. Strong type system catches bugs at compile time.

Trading bots written in Python or JavaScript can't match the speed and reliability of native code. When milliseconds matter in DeFi, Rust delivers.


Table of Contents


Overview

ScreenerBot is a professional-grade trading automation platform for Solana DeFi. Unlike cloud-based solutions, it runs entirely on your local machine:

Feature Benefit
Self-Custody Private keys never leave your computer
Native Speed Rust performance with direct RPC connections
Real-Time Prices Direct pool reserve calculations, not delayed APIs
Full Control Raw data access, custom strategies, no platform fees

Architecture

20+ independent services orchestrated by a central ServiceManager with dependency resolution, priority-based startup, and health monitoring:

┌─────────────────────────────────────────────────────────────────────────────────────┐
│                                  ServiceManager                                     │
│         Dependency Resolution • Priority Startup • Health Monitoring • Metrics      │
└─────────────────────────────────────────────────────────────────────────────────────┘
        │                    │                    │                    │
        ▼                    ▼                    ▼                    ▼
┌──────────────────┐ ┌──────────────────┐ ┌───────────────────┐ ┌──────────────────┐
│   Pool Service   │ │  Token Service   │ │Transaction Service│ │  Trader Service  │
├──────────────────┤ ├──────────────────┤ ├───────────────────┤ ├──────────────────┤
│ • Discovery      │ │ • Database (6tbl)│ │ • WebSocket stream│ │ • Entry eval     │
│ • Fetcher (batch)│ │ • Market data    │ │ • Batch processor │ │ • Exit eval      │
│ • Decoders (11)  │ │ • Security data  │ │ • DEX analyzer    │ │ • Executors      │
│ • Calculator     │ │ • Priority update│ │ • P&L calculation │ │ • Safety gates   │
│ • Analyzer       │ │ • Blacklist      │ │ • SQLite cache    │ │ • DCA/Partial    │
└──────────────────┘ └──────────────────┘ └───────────────────┘ └──────────────────┘
        │                    │                    │                    │
        ▼                    ▼                    ▼                    ▼
┌──────────────────┐ ┌──────────────────┐ ┌──────────────────┐ ┌──────────────────┐
│ Filtering Engine │ │  OHLCV Service   │ │ Position Manager │ │ Strategy Engine  │
├──────────────────┤ ├──────────────────┤ ├──────────────────┤ ├──────────────────┤
│ • Multi-source   │ │ • 7 timeframes   │ │ • State tracking │ │ • Conditions     │
│ • Configurable   │ │ • Gap detection  │ │ • DCA tracking   │ │ • Rule trees     │
│ • Pass/reject    │ │ • Priority-based │ │ • Partial exits  │ │ • Evaluation     │
│ • Blacklist aware│ │ • Bundle cache   │ │ • P&L calculation│ │ • Caching        │
└──────────────────┘ └──────────────────┘ └──────────────────┘ └──────────────────┘
        │                    │                    │                    │
        ▼                    ▼                    ▼                    ▼
┌──────────────────┐ ┌──────────────────┐ ┌──────────────────┐ ┌──────────────────┐
│   Connectivity   │ │  Events System   │ │   Swap Router    │ │  Wallet Monitor  │
├──────────────────┤ ├──────────────────┤ ├──────────────────┤ ├──────────────────┤
│ • Endpoint health│ │ • Non-blocking   │ │ • Jupiter V6     │ │ • SOL balance    │
│ • Fallback logic │ │ • Categorized    │ │ • GMGN           │ │ • Token holdings │
│ • Critical check │ │ • SQLite storage │ │ • Concurrent     │ │ • Snapshots      │
└──────────────────┘ └──────────────────┘ └──────────────────┘ └──────────────────┘
        │                    │                    │                    │
        ▼                    ▼                    ▼                    ▼
┌──────────────────┐ ┌──────────────────┐ ┌──────────────────┐ ┌──────────────────┐
│   AI Assistant   │ │ Telegram Service │ │   SOL Price      │ │  Update Checker  │
├──────────────────┤ ├──────────────────┤ ├──────────────────┤ ├──────────────────┤
│ • 10 LLM provid. │ │ • Notifications  │ │ • Jupiter feed   │ │ • Version check  │
│ • Tool-calling   │ │ • Bot commands   │ │ • 30s refresh    │ │ • Auto-notify    │
│ • Scheduled tasks│ │ • Inline actions │ │ • USD conversion │ │ • Release notes  │
└──────────────────┘ └──────────────────┘ └──────────────────┘ └──────────────────┘
                                    │
                                    ▼
┌─────────────────────────────────────────────────────────────────────────────────────┐
│                                 Web Dashboard                                       │
│           Axum REST API • Real-time Updates • 20 Pages • Hot-reload Config          │
└─────────────────────────────────────────────────────────────────────────────────────┘

Service Dependencies

Level 0 (No dependencies):
  - Events, RPC Stats, SOL Price, Connectivity, Positions, Update Check

Level 1:
  - Pools (depends on Transactions)
  - Tokens (depends on Events, Transactions, Pools)

Level 2:
  - OHLCV (depends on Tokens, Positions)
  - Filtering (depends on Tokens, Pools)

Level 3:
  - Pool Discovery/Fetcher/Calculator/Analyzer (depends on Transactions, Pools, Filtering)
  - AI (depends on Tokens, Positions, Filtering)
  - Trader (depends on Pools, Tokens, Positions, Filtering, Transactions)

Level 4:
  - Webserver, Wallet, Telegram, Scheduled AI Tasks

Core Systems

Pool Service

Real-time price calculation directly from on-chain liquidity pool reserves.

  • Discovery: Finds pools from DexScreener, GeckoTerminal, and Raydium APIs
  • Fetcher: Batched RPC calls (50 accounts per request) with rate limiting
  • Analyzer: Classifies pools by DEX type and extracts metadata
  • Decoders: 11 native decoders for parsing pool state data
  • Calculator: Derives prices from reserves (SOL-based pricing)
  • Cache: In-memory price history with database persistence

Token Service

Unified token database with multi-source data aggregation.

  • Core metadata (mint, symbol, decimals)
  • Market data from DexScreener and GeckoTerminal
  • Security analysis from Rugcheck
  • Priority-based background updates
  • Blacklist management

Transaction Service

Real-time wallet monitoring via WebSocket with comprehensive DEX analysis.

  • WebSocket streaming for instant detection
  • DEX classification (Jupiter, Raydium, Orca, Meteora, Pumpfun, GMGN, Fluxbeam, Moonshot)
  • Swap detection and P&L calculation
  • ATA operation tracking
  • Position entry/exit verification
  • SQLite caching with connection pooling

Position Manager

Complete position lifecycle with DCA and partial exit support.

  • Multiple entries per position (DCA)
  • Partial exits with individual P&L tracking
  • Background price monitoring with peak tracking
  • Loss detection with configurable auto-blacklist

Filtering Engine

Multi-criteria token evaluation from multiple data sources.

  • DexScreener: Liquidity, volume, price change, transactions, FDV, market cap
  • GeckoTerminal: Liquidity, volume, price change, market cap, reserve
  • Rugcheck: Security risks, authorities, holder distribution, insider detection
  • Meta: Token age, decimals validation, cooldown check

Strategy Engine

Condition-based trading logic with configurable rules.

  • Price conditions (change percent, breakout, MA)
  • Volume conditions (spike, thresholds)
  • Candle patterns and time-based conditions
  • Rule tree evaluation with caching

Supported DEXs

Native decoders for direct pool state interpretation:

DEX Programs
Raydium CLMM, CPMM, Legacy AMM
Orca Whirlpool
Meteora DAMM, DBC, DLMM
Pumpfun AMM, Legacy (Bonding Curve)
Fluxbeam AMM
Moonit AMM

Swap Routers

  • Jupiter V6: Aggregation with route optimization
  • GMGN: Alternative router for quote comparison
  • Raydium: Direct swap for Raydium pools

Concurrent quote fetching across all routers with automatic best-route selection.


Trading Features

Entry Evaluation

Safety checks in order:

  1. Connectivity health
  2. Position limits
  3. Duplicate prevention
  4. Re-entry cooldown
  5. Blacklist check
  6. Strategy signals

Exit Evaluation

Priority-ordered conditions:

  1. Blacklist (emergency): Immediate exit if token blacklisted
  2. Risk Limits (emergency): >90% loss protection
  3. Trailing Stop (high): Dynamic stop-loss following price peaks
  4. ROI Target (normal): Fixed profit target exit
  5. Time Override (normal): Maximum hold duration
  6. Strategy Exit (normal): Strategy-defined exit signals

DCA (Dollar Cost Averaging)

  • Configurable DCA rounds with size multipliers
  • Price drop thresholds for additional entries
  • Per-round tracking with individual cost basis

Partial Exits

  • Multiple exit points per position
  • Individual P&L calculation per exit
  • Remaining position tracking

AI Assistant

Multi-provider LLM integration for intelligent analysis and automated tasks. All features disabled by default.

Providers

Supports 10 providers: OpenAI, Anthropic, Groq, DeepSeek, Gemini, Ollama, Together AI, OpenRouter, Mistral, GitHub Copilot.

Features

  • Token Filtering: AI evaluates tokens during the filtering pipeline with configurable confidence thresholds
  • Entry/Exit Analysis: LLM-powered trade decision support with risk assessment
  • Interactive Chat: Tool-calling chat interface with portfolio, trading, and system tools
  • Custom Instructions: User-defined prompts injected into all AI evaluations
  • Automation: Scheduled AI tasks with interval/daily/weekly schedules, headless tool execution, Telegram notifications, and run history tracking

Automation

Create scheduled tasks that run AI instructions automatically:

  • Interval: Run every N seconds (e.g., every 5 minutes)
  • Daily: Run at a specific time UTC (e.g., 14:00)
  • Weekly: Run on specific days at a time (e.g., mon,wed,fri:09:00)
  • Configurable tool permissions (read-only or full access)
  • Run history with tool call details and AI responses
  • Telegram notifications on completion or failure

Dashboard

Web interface at http://localhost:8080 with 20 pages:

  • Dashboard: Overview with positions, system health, and real-time stats
  • Positions: Open/closed positions with P&L tracking and detailed analytics
  • Tokens: Database browser with market data, security analysis, and pool info
  • Filtering: Passed/rejected tokens with detailed rejection reasons
  • Trader: Trading controls, monitors, safety gates, and loss limits
  • Transactions: Real-time stream with DEX classification and P&L
  • Strategies: Visual strategy builder with condition editor
  • OHLCV: Candlestick charts with multi-timeframe analysis
  • Assistant: AI chat, providers, instructions, automation, and testing
  • Wallets: Multi-wallet management with balance monitoring
  • Tools: Multi-wallet trading, ATA cleanup, burn tokens
  • Events: System event log with filtering and search
  • Services: Service health, metrics, and dependency status
  • Config: Hot-reload configuration editor with metadata-driven UI
  • Updates: Version checking and release notes
  • About: System information and credits
  • Lockscreen: Security screen with password/TOTP protection
  • Login: Authentication flow
  • Setup: First-run initialization wizard
  • Onboarding: Guided setup for new users

Configuration

Managed through data/config.toml with hot-reload support. 19 config sections:

Section Purpose
[trader] Position limits, sizing, ROI targets, DCA, trailing stop
[positions] Position tracking, partial exits, cooldowns
[filtering] Token filtering with nested DexScreener/GeckoTerminal/Rugcheck
[swaps] Router configuration (Jupiter, GMGN, Raydium)
[tokens] Token database, update intervals
[pools] Pool discovery, caching
[rpc] RPC endpoints and rate limiting
[ohlcv] Candlestick data settings
[strategies] Strategy engine configuration
[wallet] Wallet monitoring
[events] Event system settings
[services] Service manager settings
[monitoring] System metrics
[connectivity] Endpoint health monitoring
[sol_price] SOL/USD price service
[gui] Desktop application settings
[ai] AI providers, filtering, trading analysis, chat, automation
[telegram] Telegram bot, notifications, commands
[summary] Summary and reporting settings

Access via with_config(|cfg| cfg.trader.max_open_positions). Hot-reload with reload_config().


Data Sources

Source Usage
Solana RPC Pool reserves, balances, transactions
DexScreener Market data, pool discovery
GeckoTerminal Alternative market metrics
Rugcheck Security analysis
Jupiter Swap routing and quotes
CoinGecko Token metadata
DefiLlama Token prices, DeFi protocols

All data cached locally in SQLite databases.

RPC Provider

A premium Solana RPC endpoint is required for reliable trading. ScreenerBot auto-detects your provider and applies optimal rate limits.

Provider Compatibility Notes
Helius Recommended Most compatible and tested. Solana-native APIs, DAS, staked connections. Free tier: 100k req/day.
QuickNode ✅ Supported Fast global network. Good alternative.
Triton ✅ Supported Ultra-low latency, gRPC support.
Alchemy ✅ Supported Developer-friendly, generous free tier.

Tip: Configure 2-3 endpoints from different providers for automatic failover. See the Best RPC Providers Guide for detailed comparisons.


Desktop Application

Native desktop application built with Electron - the proven framework behind apps like VS Code, Slack, and Discord.

Platform Support

Platform Min Version Package Format
macOS 10.13 (High Sierra) .app / .dmg
Windows Windows 10 .exe / .msi
Linux Ubuntu 18.04+ .deb / .AppImage

Desktop Features

  • Native Window: 1400x900 default, 1200x700 minimum, fully resizable
  • Embedded Dashboard: Webserver runs locally at localhost:8080
  • Keyboard Shortcuts: Zoom (Cmd/Ctrl +/-/0), Reload (Cmd/Ctrl + R)
  • System Integration: Native title bar, notifications

Quick Install (VPS/Linux)

Run ScreenerBot 24/7 on a Linux VPS with a single command:

curl -fsSL https://screenerbot.io/install.sh | bash

See the VPS Installation Guide for detailed setup instructions including system requirements and management.


Building from Source

Prerequisites

  • Rust 1.75+
  • Node.js 18+ (for frontend validation tools)
  • Platform-specific:
    • macOS: Xcode Command Line Tools
    • Windows: Visual Studio Build Tools, WebView2
    • Linux: libwebkit2gtk-4.0-dev, libssl-dev, libgtk-3-dev

Build Options

git clone https://github.com/screenerbotio/ScreenerBot.git
cd ScreenerBot

# Headless mode (server only)
cargo build --bin screenerbot

# Desktop application (macOS)
./build-macos.sh

Run

# Headless mode (terminal)
cargo run --bin screenerbot

# Desktop application (requires build first)
cd electron && npm start

# With debug logging
cargo run --bin screenerbot -- --debug-rpc

Build Artifacts

After building with Electron:

  • macOS: builds/electron/macos/ScreenerBot.app
  • Windows: builds/electron/windows/ScreenerBot Setup.exe
  • Linux: builds/electron/linux/screenerbot.deb

Project Structure

src/
├── actions/        # Operation progress tracking with SSE broadcasting
├── ai/             # AI assistant (10 LLM providers, chat, automation)
├── apis/           # External API clients (DexScreener, Jupiter, Rugcheck, LLM)
├── config/         # Macro-driven configuration system with hot-reload
├── connectivity/   # Endpoint health monitoring with fallback strategies
├── errors/         # Structured error types with blockchain-aware parsing
├── events/         # Structured JSON event logging (SQLite)
├── filtering/      # Multi-criteria token evaluation engine
├── ohlcvs/         # OHLCV candlestick data (7 timeframes)
├── pools/          # Pool service with 11 native DEX decoders
├── positions/      # Position lifecycle (DCA, partial exits, P&L)
├── rpc/            # Multi-provider RPC with rate limiting & circuit breaker
├── services/       # ServiceManager with 20+ services
├── strategies/     # Condition-based trading strategy engine
├── swaps/          # Multi-router swap execution (Jupiter, GMGN, Raydium)
├── telegram/       # Telegram bot (notifications, commands, inline actions)
├── tokens/         # Token database with multi-source aggregation
├── trader/         # Trading logic (entry/exit evaluation, safety gates)
├── transactions/   # Real-time transaction monitoring via WebSocket
├── wallets/        # Wallet management and balance monitoring
└── webserver/      # Axum REST API + embedded web dashboard (20 pages)

docs/               # Architecture documentation and guides
electron/           # Electron desktop shell
public/             # Static assets (CSS, JS, fonts, icons)

Links & Resources

Resource Link
🌐 Website screenerbot.io
📚 Documentation screenerbot.io/docs
⬇️ Download screenerbot.io/download
💬 Telegram Community t.me/screenerbotio_talk
📢 Telegram Channel t.me/screenerbotio
🆘 Telegram Support t.me/screenerbotio_support
𝕏 X (Twitter) x.com/screenerbotio
📖 Architecture Docs docs/
🤖 Agent Guide AGENTS.md

Contributing

We welcome contributions from the community! Whether you're fixing a bug, adding a feature, or improving documentation — every contribution matters.

Getting Started

  1. Join the community — Start by joining our Telegram Community to discuss ideas, ask questions, and coordinate with other contributors
  2. Read the docs — Check the docs/ folder and AGENTS.md for architecture details, coding patterns, and project structure
  3. Fork & branch — Fork the repository and create a feature branch from main
  4. Follow patterns — Match existing code style, naming conventions, and module structure
  5. Validate — Ensure cargo check --lib passes before submitting
  6. Open a PR — Submit a pull request with a clear description of your changes

Areas for Contribution

  • DEX decoders — Add support for new Solana DEX protocols
  • Strategy conditions — Implement new technical indicators and conditions
  • Dashboard improvements — UI/UX enhancements, new visualizations
  • Documentation — Improve guides, add tutorials, translate docs
  • Bug reports — Found an issue? Open a GitHub issue

💬 Not sure where to start? Ask in our Telegram Community — we'll help you find something that matches your skills!


Community

Join the ScreenerBot community — your gateway to Solana DeFi trading

Telegram Community

Our Telegram Community is the main hub for everything ScreenerBot:
🗣️ Discuss trading strategies and share insights
🐛 Report bugs and request features
🤝 Find contributors and collaborate on code
📢 Get announcements and early access to new features
🆘 Get help from the community and the development team

Telegram Channel Telegram Community Telegram Support X (Twitter) Website


Rust Solana Electron


Author

Farhad Arghavan
Email: farhad.argn@gmail.com

License

This project is licensed under the Business Source License 1.1 (BSL 1.1).

  • Non-commercial use is permitted
  • Commercial use (competing products or paid services) requires a separate license
  • The code converts to Apache License 2.0 four years after publication
  • Contact info@screenerbot.io for alternative licensing