A high-performance Solana trading bot for automated trading strategies.
curl -sSL https://raw.githubusercontent.com/5mil/solana-hyper-bot/main/deploy.sh | bashgit clone https://github.com/5mil/solana-hyper-bot.git .
chmod +x deploy.sh && ./deploy.shThe deploy.sh script automatically:
- ✅ Detects your operating system (Linux/macOS)
- ✅ Checks and installs prerequisites (Node.js, npm)
- ✅ Installs Solana CLI tools
- ✅ Clones the repository (if not already done)
- ✅ Creates default configuration files
- ✅ Sets up environment templates
- ✅ Creates start scripts
- ✅ Optionally sets up systemd service (Linux)
After deployment, update your configuration:
- Edit
~/.solana-hyper-bot/.envwith your settings - Configure your Solana wallet (automatically created if not present)
- Adjust trading parameters in
~/.solana-hyper-bot/config.json
💡 New: Config changes now apply immediately without restarting! See CONFIG_RELOAD.md for details.
See WALLET.md for detailed wallet configuration and usage.
- 🔐 Secure Wallet Management: Automatic wallet creation and secure key storage
- 📊 Balance Tracking: Real-time SOL balance monitoring
- 🌐 Multi-Network Support: Works with devnet, testnet, and mainnet-beta
- ⚙️ Flexible Configuration: Environment variables and JSON config support
- 🔄 Auto-Recovery: Graceful error handling and automatic wallet initialization
- 🔬 Principia Mathematica Engine: Trading bot powered by Newton's laws of motion and universal gravitation
- 📈 Market Data Integration: Real-time price tracking and technical analysis
- 🤖 Automated Trading: Execute trades based on Principia engine signals
- 🛡️ Risk Management: Built-in stop-loss, take-profit, and position sizing
- 🔍 Dry Run Mode: Test strategies without risking real funds
- 🔥 Hot Config Reload: Change settings without restarting the bot
Run directly with Node.js:
cd ~/.solana-hyper-bot
npm install
npm startOr use the start script:
~/.solana-hyper-bot/start.shOr as a service (Linux):
sudo systemctl enable solana-hyper-bot
sudo systemctl start solana-hyper-botOn first run, the bot will:
- Connect to the configured Solana network
- Load or create a wallet automatically
- Display your wallet address and balance
- Initialize the Principia Mathematica trading engine
- Start the market data feed
- Begin analyzing market conditions using Newton's laws
- Make trading decisions based on physics principles (in dry run mode by default)
This bot implements a unique trading strategy based on Isaac Newton's "Philosophiæ Naturalis Principia Mathematica" (1687), applying fundamental physics principles to market dynamics:
-
Law of Inertia (First Law): The bot maintains its current position unless a sufficiently strong market signal compels a change. This prevents overtrading and whipsaw.
-
Law of Acceleration (Second Law): Trade sizes are proportional to signal strength (F=ma). Stronger signals result in larger positions; weaker signals in smaller adjustments.
-
Law of Action-Reaction (Third Law): For every trade (action), the bot implements equal and opposite risk management (reaction) including stop losses, profit targets, and hedging.
-
Universal Gravitation: Price movements are attracted to significant support/resistance levels with force proportional to volume and inversely proportional to distance squared.
-
Conservation of Momentum: The bot tracks market momentum to identify trend persistence and potential reversal points.
See PRINCIPIA_MATHEMATICA_TRADING_FRAMEWORK.md for:
- Complete theoretical framework
- Mathematical formulations
- Configuration parameters
- Practical examples
- Full citations from Newton's original text
Generate PDF Documentation:
npm run generate-pdf
# Opens the HTML file which can be printed to PDF from any browserEdit config.json to tune the engine parameters:
{
"principia": {
"enabled": true,
"inertiaThreshold": 0.15, // Minimum signal to trigger action (Law I)
"tradingMass": 1.0, // Resistance to change (Law II)
"riskReactionRatio": 1.0, // Risk:reward ratio (Law III)
"gravitationalConstant": 0.001, // Support/resistance attraction strength
"momentumPeriod": 20, // Periods for momentum calculation
"maxPositionSize": 0.3 // Max 30% of portfolio per position
},
"trading": {
"pairs": ["SOL-USDC"], // Trading pairs to monitor
"dryRun": true, // Enable dry run mode (recommended)
"minTradeSize": 0.01, // Minimum trade size in SOL
"updateInterval": 10000 // Market update interval in ms
}
}By default, the bot runs in dry run mode for safety. In this mode:
- ✅ All trading logic executes normally
- ✅ Market analysis and signals are real
- ✅ You can see what trades would be executed
- ❌ No actual trades are submitted to the blockchain
- ❌ No funds are at risk
To enable live trading:
- Set
"dryRun": falseinconfig.json - Ensure you have sufficient SOL in your wallet
- Start with small position sizes to test
- Monitor the bot closely during initial runs
Default installation directory: ~/.solana-hyper-bot
- Linux or macOS
- curl and git
- Node.js 20+ (auto-installed if missing)
- Solana CLI (auto-installed if missing)
MIT
Run the test suites:
# Test Principia engine
npm test
# Test trading modules
npm run test:trading
# Test devnet Jupiter API
npm run test:devnet
# Run all tests
npm run test:allThe bot includes:
- Market Data Module: Tracks real-time prices, calculates technical indicators (SMA, momentum), and detects support/resistance levels
- Trade Executor: Executes trades based on Principia engine signals with built-in safety controls
- Risk Management: Automatic stop-loss and take-profit calculations per Newton's Third Law
- Network-Aware Jupiter Integration: Automatically uses mock data on devnet/testnet, real Jupiter API on mainnet
The bot automatically detects your network and adjusts accordingly:
- Mainnet: Uses real Jupiter API for quotes and execution
- Devnet/Testnet: Uses simulated mock data (Jupiter API not available)
See JUPITER_NETWORK_SUPPORT.md for detailed information about how the bot handles different networks.
- Simple Moving Average (SMA): Trend identification
- Momentum: Rate of price change over time
- Support/Resistance: Key price levels detected from historical data
- Signal Strength: Combined force metric from multiple indicators
- Default dry run mode prevents accidental trades
- Minimum trade size limits
- Maximum position size constraints (30% of portfolio by default)
- Inertia threshold prevents overtrading
- Risk management ratios for every trade
For issues or questions, please open an issue on GitHub.