This bot provides complete manual control of your Hyperliquid account via Telegram, with professional-grade statistics tracking including P&L, win rates, Sharpe ratio, Sortino ratio, and all the metrics you'd expect from a trading platform.
|
il y a 9 heures | |
---|---|---|
config | il y a 17 heures | |
docs | il y a 17 heures | |
src | il y a 9 heures | |
tests | il y a 3 jours | |
utils | il y a 4 jours | |
.gitignore | il y a 2 jours | |
LICENSE | il y a 3 jours | |
README.md | il y a 2 jours | |
requirements.txt | il y a 4 jours | |
reset_data.sh | il y a 2 jours | |
trading_bot.py | il y a 9 heures |
Professional-grade manual trading with comprehensive statistics and mobile control
Complete phone control of your Hyperliquid account via Telegram with institutional-level analytics, auto-restart capabilities, and bulletproof data persistence.
python trading_bot.py
That's it! This one command:
# Clone repository
git clone git@repo.codeskraps.com:codeskraps/ManualTrader.git
cd ManualTrader
# Setup environment
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
# Configure bot
cp config/env.example .env
nano .env # Add your keys
# Use the robust script
python utils/get_telegram_chat_id.py
python trading_bot.py
๐ฑ Open Telegram โ Send /start
to your bot
trader_hyperliquid/
โโโ ๐ trading_bot.py # MAIN LAUNCHER (run this!)
โโโ ๐ data/ # Persistent data storage
โ โโโ trading_stats.sqlite # SQLite database with all trading data
โ โโโ price_alarms.json # Price alarm configurations
โโโ ๐ .env # Your configuration
โ
โโโ ๐ง src/ # Core application modules
โโโ ๐ ๏ธ utils/ # Setup & maintenance tools
โโโ โ๏ธ config/ # Configuration templates
โโโ ๐ logs/ # Auto-created logs & errors
โโโ ๐งช tests/ # Comprehensive test suite
โโโ ๐ docs/ # Complete documentation
For detailed architecture and module breakdown, see ๐ Complete Project Structure
/start # Main menu with instant buttons
/balance # Real-time balance + P&L
/stats # Complete trading statistics
/positions # Open positions with P&L
/orders # Pending orders
/long BTC 100 # Long BTC with $100 USDC (Market)
/long BTC 100 50000 # Long BTC with $100 at $50,000 (Limit)
/long BTC 100 sl:49000 # Long BTC with stop loss at $49,000 ๐ฅ
/short ETH 50 # Short ETH with $50 USDC (Market)
/short ETH 50 3500 # Short ETH with $50 at $3,500 (Limit)
/short ETH 50 sl:3600 # Short ETH with stop loss at $3,600 ๐ฅ
/exit BTC # Close BTC position
Send /start
for one-tap access to:
๐ Trading Statistics
๐ฐ Balance Overview
โข Initial: $1,000.00 โ Starting balance (never lost)
โข Current: $1,150.00 โ Real-time balance
โข Total P&L: $150.00 โ Profit/Loss
โข Total Return: 15.00% โ Percentage return
๐ Trading Activity
โข Total Trades: 25 โ Complete trade count
โข Buy Orders: 13 โ Order breakdown
โข Sell Orders: 12
โข Days Active: 30 โ Since first launch
๐ Performance Metrics
โข Win Rate: 68.0% โ Profitable trades %
โข Profit Factor: 2.15 โ Gains รท Losses
โข Avg Win: $45.50 โ Average winning trade
โข Avg Loss: $28.75 โ Average losing trade
โข Expectancy: $6.25 โ Expected $ per trade
๐ Risk Metrics
โข Sharpe Ratio: 1.85 โ Risk-adjusted returns
โข Sortino Ratio: 2.41 โ Downside risk metric
โข Max Drawdown: 8.5% โ Worst decline from peak
โข Volatility: 12.3% โ Price volatility
โข VaR (95%): 3.2% โ Value at Risk
๐ฏ Best/Worst Performance
โข Largest Win: $125.00 โ Best single trade
โข Largest Loss: $75.00 โ Worst single trade
โข Max Consecutive Wins: 5 โ Winning streaks
โข Max Consecutive Losses: 2 โ Losing streaks
๐
Tracking Since: 2024-01-15
Following CCXT standards for exchange compatibility:
โ ๏ธ IMPORTANT SECURITY: Use the API Generator Key from https://app.hyperliquid.xyz/API for trading operations. DO NOT use your wallet's private key directly for security reasons. Generate a dedicated API key with appropriate permissions for trading through this bot.
# Hyperliquid API (CCXT Style)
HYPERLIQUID_SECRET_KEY=your_api_secret_key_here # โ Secret Key from API generator
HYPERLIQUID_WALLET_ADDRESS=your_api_wallet_address_here # โ API Wallet Address from generator
HYPERLIQUID_TESTNET=true
# Telegram Bot
TELEGRAM_BOT_TOKEN=your_token_from_botfather
TELEGRAM_CHAT_ID=your_chat_id_here
TELEGRAM_ENABLED=true
# Trading Settings
DEFAULT_TRADING_SYMBOL=BTC/USDC:USDC
DEFAULT_TRADE_AMOUNT=0.001
trading_stats.json
python utils/demo_stats.py
Shows you exactly what metrics the bot will track.
python -c "import sys; sys.path.insert(0, 'src'); from config import Config; Config.validate()"
# If the main script has issues
python utils/simple_chat_id.py
Guide | Purpose | Quick Link |
---|---|---|
Setup Guide | 5-minute installation | ๐ docs/setup.md |
Commands Reference | Complete command guide | ๐ docs/commands.md |
Project Structure | Detailed architecture | ๐ docs/project-structure.md |
Deployment Guide | Production deployment | ๐ docs/deployment.md |
System Integration | Advanced integration | ๐ docs/system-integration.md |
Documentation Index | All guides overview | ๐ docs/documentation-index.md |
# Check configuration
python -c "import sys; sys.path.insert(0, 'src'); from config import Config; Config.validate()"
# Try alternative Chat ID finder
python utils/simple_chat_id.py
logs/
directorypython trading_bot.py
runs everythingGet institutional-grade trading infrastructure with bulletproof stop loss management! ๐๐ฑ๐ฅ
This project is licensed under the MIT License - see the LICENSE file for details.
sl:price
syntax with edge case handling