Understanding the ManualTrader codebase organization
python trading_bot.py # Only command you need to run
ManualTrader/
โโโ ๐ trading_bot.py # MAIN LAUNCHER
โโโ ๐ trading_stats.json # Persistent trading data
โโโ ๐ .env # Your configuration
โโโ ๐ requirements.txt # Python dependencies
โโโ ๐ .gitignore # Git ignore rules
โ
โโโ ๐ง src/ # Core application modules
โ โโโ __init__.py
โ โโโ config.py # Configuration management
โ โโโ hyperliquid_client.py # CCXT-style API wrapper
โ โโโ telegram_bot.py # Telegram interface
โ โโโ trading_stats.py # Statistics engine
โ
โโโ ๐ ๏ธ utils/ # Utilities and helpers
โ โโโ get_telegram_chat_id.py # Chat ID finder (main)
โ โโโ simple_chat_id.py # Alternative for servers
โ โโโ demo_stats.py # Statistics demonstration
โ โโโ simple_bot.py # Terminal interface
โ โโโ strategy_bot.py # Automated strategies
โ โโโ manual_trading_bot.py # Legacy launcher
โ
โโโ โ๏ธ config/ # Configuration templates
โ โโโ env.example # Environment template
โ
โโโ ๐ logs/ # Auto-created logging
โ โโโ trading_bot_YYYYMMDD.log # Daily bot logs
โ โโโ bot_errors.log # Error log
โ
โโโ ๐ docs/ # Documentation
โ โโโ setup.md # Setup instructions
โ โโโ project-structure.md # This file
โ โโโ deployment.md # Deployment guide
โ
โโโ ๐ venv/ # Python virtual environment
trading_bot.py
- The only file you run
src/
)config.py
- CCXT-style configuration managementhyperliquid_client.py
- Enhanced API wrapper with error handlingtelegram_bot.py
- Mobile-optimized trading interfacetrading_stats.py
- Professional analytics enginetrading_stats.json
- Your persistent trading statistics.env
- Your sensitive configuration (not in git)Script | Purpose | When to Use |
---|---|---|
get_telegram_chat_id.py |
Find your Telegram Chat ID | Setup only |
simple_chat_id.py |
Alternative Chat ID finder | If main script fails |
demo_stats.py |
Show sample statistics | See what bot tracks |
simple_bot.py |
Terminal interface | Quick testing |
strategy_bot.py |
Automated trading | If you want automation |
1. trading_bot.py (launcher)
โ
2. src/config.py (load configuration)
โ
3. src/hyperliquid_client.py (connect to exchange)
โ
4. src/telegram_bot.py (start interface)
โ
5. src/trading_stats.py (track performance)
โ
6. trading_stats.json (persist data)
src/config.py
)# CCXT-style configuration
config = {
'apiKey': 'your_private_key',
'secret': 'your_secret_key',
'testnet': True,
'sandbox': True
}
src/hyperliquid_client.py
)src/telegram_bot.py
)src/trading_stats.py
).env
files excluded from git.env
)# Authentication
HYPERLIQUID_PRIVATE_KEY=your_private_key_here
HYPERLIQUID_SECRET_KEY=your_secret_key_here
# Network
HYPERLIQUID_TESTNET=true
# Telegram
TELEGRAM_BOT_TOKEN=your_token_here
TELEGRAM_CHAT_ID=your_chat_id_here
TELEGRAM_ENABLED=true
requirements.txt
)hyperliquid==0.4.66
- Exchange librarypython-telegram-bot[webhooks]==20.7
- Telegram interfacepython-dotenv==1.1.0
- Environment managementpandas==2.2.3
- Data analysisnumpy==2.2.6
- Numerical computing# Test configuration
python -c "import sys; sys.path.insert(0, 'src'); from config import Config; Config.validate()"
# Test terminal interface
python utils/simple_bot.py
# Test statistics
python utils/demo_stats.py
# Single command for production
python trading_bot.py
This architecture provides professional-grade reliability with simple operation! ๐