High-performance Rust proxy that abstracts Solana DEX complexities into simple APIs, enabling developers to build trading bots in any language without blockchain expertise. Provides sub-millisecond event streaming and transaction execution for PumpFun, PumpSwap, and Meteora DAMM V2
δΈζ | English | Website | Telegram | Discord
Trading Bot Proxy is a high-performance middleware that bridges the gap between Solana blockchain complexity and bot strategy development. Built with Rust for maximum performance and minimal latency, it allows developers to focus purely on trading strategy logic without dealing with the intricacies of Solana transaction construction and data stream parsing.
Lower Development Barrier
- β No Blockchain Expertise Required: Focus on trading strategy, not Solana transaction mechanics
- β Language Agnostic: Develop your bot in any programming language (Python, JavaScript, Go, etc.)
- β Pre-built DEX Integration: PumpFun, PumpSwap, Meteora DAMM V2 protocols already integrated
- β Simplified API: Unix Socket (events) + HTTP API (commands) for easy integration
Rust Performance Benefits
- β‘ Ultra-Low Latency: Rust's zero-cost abstractions ensure minimal overhead
- β‘ High Throughput: Handle thousands of events per second without breaking a sweat
- β‘ Memory Efficient: Rust's memory safety without garbage collection pauses
- β‘ Real-time Data Streaming: Sub-millisecond event processing via Unix Socket + Protobuf
What You Don't Need to Worry About
- β Solana transaction construction and signing
- β Program instruction encoding/decoding
- β Account data parsing and deserialization
- β DEX-specific protocol implementations
- β WebSocket connection management with RPC nodes
- β Event stream parsing and filtering
What You Can Focus On
- β Trading strategy and signal generation
- β Risk management and position sizing
- β Portfolio optimization
- β Market analysis and pattern recognition
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Your Trading Strategy β
β (Python/JavaScript/Go/Any Language) β
β β
β β’ Market Analysis β’ Signal Generation β
β β’ Risk Management β’ Position Sizing β
ββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββ
β Unix Socket (Events) + HTTP API (Commands)
β Protobuf Binary Protocol
ββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββ
β Trading Bot Proxy (Rust Server) β
β β
β β‘ High Performance Layer: β
β β’ Transaction Construction & Signing β
β β’ Instruction Encoding/Decoding β
β β’ Real-time Event Stream Processing (Unix Socket) β
β β’ DEX Protocol Implementation β
β β’ Protobuf Serialization (Sub-ms Latency) β
ββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββ
β WebSocket (gRPC)
β Solana RPC Connection
ββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββ
β Solana Blockchain β
β β
β β’ PumpFun DEX β’ PumpSwap DEX β
β β’ Meteora DAMM V2 β’ RPC Nodes β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Rust Server (Core Engine)
- Handles all Solana-specific complexities
- Real-time event streaming via Unix Socket + Protobuf
- Transaction construction and execution via HTTP API
- Multi-DEX protocol support
Your Strategy Bot (Any Language)
- Subscribes to events via Unix Socket (ultra-low latency)
- Receives parsed, structured trading events in Protobuf format
- Sends high-level buy/sell commands via HTTP API
- Focuses purely on trading logic
Why Unix Socket for Events?
- 10x faster than WebSocket for local IPC
- Zero network overhead - direct kernel communication
- Sub-millisecond latency - critical for competitive trading
- Binary protocol (Protobuf) - smaller payloads, faster parsing
trading-bot-proxy-linux/- Linux production servertrading-bot-proxy-mac/- macOS development server- Configuration:
config/app.toml
trading-bot-ts/- Full-featured TypeScript client example- Demonstrates best practices and integration patterns
- Detailed documentation: trading-bot-ts/README.md
Linux:
# Download the Linux version
wget https://github.com/0xfnzero/trading-bot-proxy/releases/download/v1.0/trading-bot-proxy-linux.tar.bz2
# Extract the archive
tar -xjf trading-bot-proxy-linux.tar.bz2
# Navigate to the directory
cd trading-bot-proxy-linuxmacOS:
# Download the macOS version
wget https://github.com/0xfnzero/trading-bot-proxy/releases/download/v1.0/trading-bot-proxy-mac.tar.bz2
# Extract the archive
tar -xjf trading-bot-proxy-mac.tar.bz2
# Navigate to the directory
cd trading-bot-proxy-macConfigure:
vim config/app.toml # Configure private key and RPC addressLinux:
chmod +x trading-bot-proxy
nohup ./trading-bot-proxy > output.log 2>&1 &macOS:
chmod +x trading-bot-proxy
nohup ./trading-bot-proxy > output.log 2>&1 &Server default port: http://localhost:8080
cd trading-bot-ts
npm install
cp .env.sample .env
vim .env # Configure environment variables
npm run devFor detailed instructions, please refer to: trading-bot-ts/README.md
The server needs to set the corresponding protocols and events to true in config/app.toml to subscribe to data:
[protocols]
pumpfun = true # Enable protocol as needed
[events]
pumpfun_trade = true # Enable events as neededNote: Only protocols and events set to true will be subscribed to and pushed to the client.
# View logs
tail -f output.log
# Stop service
ps aux | grep trading-bot-proxy | grep -v grep | awk '{print $2}' | xargs kill
# Health check
curl http://localhost:8080/health| Metric | Rust Proxy | Pure Python | Pure JavaScript |
|---|---|---|---|
| Event Processing Latency | < 1ms | 5-15ms | 3-10ms |
| Memory Usage | 50-100MB | 200-500MB | 150-400MB |
| Transaction Construction | < 0.5ms | 2-5ms | 1-3ms |
| Concurrent Event Handling | 10,000+ events/s | 500-1,000 events/s | 1,000-2,000 events/s |
| CPU Efficiency | Minimal (5-10%) | High (30-60%) | Medium (20-40%) |
Latency is Everything
- In competitive trading, milliseconds determine profit or loss
- Rust's zero-cost abstractions mean no runtime overhead
- Direct system calls without interpreter/VM layers
Reliability Under Load
- No garbage collection pauses during critical operations
- Predictable performance even under high throughput
- Memory safety prevents crashes during peak trading hours
Strategy Development in Any Language
- You get Rust's performance without writing Rust
- Develop in Python for rapid prototyping
- Switch to Go for production without changing the proxy
- Use JavaScript for easy web integration
- Algorithm Traders: Focus on strategy, not infrastructure
- Quant Teams: Rapid strategy iteration without blockchain overhead
- Trading Firms: Multi-strategy deployment with shared infrastructure
- Researchers: Backtest and deploy with minimal code changes
For complete integration examples, please refer to the trading-bot-ts directory, which contains a detailed TypeScript client implementation demonstrating:
- How to subscribe to event streams via Unix Socket
- How to parse event messages using Protobuf
- How to execute trading operations via HTTP API
- How to implement complete trading strategy logic
Security
- Private Key Security: Keep your private keys in the configuration file secure
- Never commit
config/app.tomlto version control - Use environment variables for production deployments
Performance
- Recommended to use professional RPC nodes for best performance
- Consider using multiple RPC endpoints for redundancy
- Monitor latency metrics for optimal trading
Monitoring
- Regularly check log files for errors and warnings
- Set up alerts for connection issues
- Monitor Redis memory usage for order management
Need Help?
- Detailed client documentation: trading-bot-ts/README.md
- Telegram Community: Join Discussion
- Discord Server: Get Support