1 line
12 KiB
JSON
1 line
12 KiB
JSON
{"repo": "0xweb3tech/nof1ai", "files": {"SETUP_INSTRUCTIONS.md": {"b181d35e8123e43e7513c0f9afc4a97024d1f7a5": {"t": 1785746618.5120125, "n": 6662, "h": "9db4c0aab60a49c4", "c": "# 🚀 Setup Instructions for nof1-agents\n\n## 📋 Complete Setup Checklist\n\nFollow these steps to get your autonomous trading bot running:\n\n---\n\n## ✅ Step 1: Prerequisites\n\n### Install Python 3.10\n\n**Check if installed:**\n```bash\npython3.10 --version\n```\n\n**If not installed:**\n\n**macOS:**\n```bash\nbrew install python@3.10\n```\n\n**Ubuntu/Debian:**\n```bash\nsudo apt update\nsudo apt install python3.10 python3.10-venv python3.10-dev\n```\n\n**Windows:** \nDownload from [python.org](https://www.python.org/downloads/release/python-3100/)\n\n---\n\n## ✅ Step 2: Clone Repository\n\n```bash\ngit clone <your-repository-url>\ncd nof1-agents\n```\n\n---\n\n## ✅ Step 3: Setup Virtual Environment\n\n```bash\n# Create virtual environment with Python 3.10\npython3.10 -m venv venv\n\n# Activate virtual environment\nsource venv/bin/activate # On Windows: venv\\Scripts\\activate\n\n# Verify activation (should show Python 3.10)\npython --version\n```\n\n---\n\n## ✅ Step 4: Install Dependencies\n\n```bash\n# Upgrade pip first\npip install --upgrade pip\n\n# Install all requirements\npip install -r requirements.txt\n\n# Verify installation\npython -c \"import pandas, pandas_ta, hyperliquid; print('✅ All dependencies installed')\"\n```\n\n---\n\n## ✅ Step 5: Get Your API Keys\n\n### 1. DeepSeek API Key\n\n1. Go to [https://platform.deepseek.com](https://platform.deepseek.com)\n2. Sign up for an account\n3. Navigate to API Keys section\n4. Create a new API key\n5. Copy the key (starts with `sk-`)\n\n**Cost:** Very cheap! ~$0.14 per 1M tokens\n\n### 2. HyperLiquid Credentials\n\nYou need two things:\n\n**a) Your Wallet Address** (public)\n- This is your Ethereum wallet address\n- Example: `0x1234...5678`\n- Copy from MetaMask or your wallet\n\n**b) Your Private Key** (KEEP SECRET!)\n- Export from MetaMask: Settings → Security → Export Private Key\n- Starts with `0x`\n- ⚠️ **NEVER SHARE THIS WITH ANYONE!**\n\n---\n\n## ✅ Step 6: Configure Environment\n\n```bash\n# Copy template\ncp env.example .env\n\n# Edit with your keys\nnano .env # or use: code .env, vim .env, etc.\n```\n\n**Fill in your keys in `.env`:**\n\n```bash\n# Get from https://platform.deepseek.com\nDEEPSEEK_KEY=sk-your-actual-deepseek-key-here\n\n# Your Ethereum private key (from MetaMask)\nHYPER_LIQUID_ETH_PRIVATE_KEY=0xyour-private-key-here\n\n# Your wallet address\nHYPER_LIQUID_MASTER_ADDRESS=0xyour-wallet-address-here\n```\n\n**Save and exit.**\n\n---\n\n## ✅ Step 7: Configure Trading Settings\n\nEdit `agents/agent_configs.py`:\n\n```bash\nnano agents/agent_configs.py # or your preferred editor\n```\n\n**Recommended settings for beginners:**\n\n```python\nCONFIG = {\n 'STARTING_CAPITAL_USD': 100, # Start small!\n 'SYMBOLS': ['BTC', 'ETH'], # Trade just 2 coins\n 'MAX_LEVERAGE': 5, # Lower leverage = safer\n 'MAX_POSITION_PERCENT': 50, # Use 50% of capital\n 'CHECK_INTERVAL_MINUTES': 5, # Check every 5 minutes\n 'MIN_CONFIDENCE_TO_TRADE': 0.75, # Higher confidence = fewer trades\n 'STOP_LOSS_PERCENT': 3.0, # Tighter stop loss\n 'TAKE_PROFIT_PERCENT': 10.0, # 10% profit target\n}\n```\n\n**Save and exit.**\n\n---\n\n## ✅ Step 8: Test Configuration\n\n```bash\n# Make sure venv is activated\nsource venv/bin/activate\n\n# Test imports\npython -c \"from agents.agent_configs import CONFIG; print('✅ Config loaded successfully')\"\n\n# Test API connection\npython -c \"from exchange.nice_funcs_hyperliquid import get_current_price; print(f'BTC Price: ${get_current_price(\\\"BTC\\\"):,.2f}')\"\n```\n\nIf both commands succeed, you're ready!\n\n---\n\n## ✅ Step 9: Run the Bot\n\n```bash\n# Make sure venv is activated\nsource venv/bin/activate\n\n# Run the trading bot\npython agents/deepseek_trader.py\n```\n\n**Expected output:**\n```\n🌙 DeepSeek Pure LLM Trader - Nof1 Style\n================================================================\n✅ DeepSeek ready: deepseek-chat\n📋 DeepSeek Trader Configuration:\n Exchange: hyperliquid\n Symbols: ['BTC', 'ETH']\n Starting Capital: $100.00\n Max Leverage: 5x\n Min Confidence: 75.0%\n\n🚀 Starting Pure LLM Trading Agent...\nPress Ctrl+C to stop\n\n📊 Collecting real-time data from HyperLiquid...\n```\n\n---\n\n## ✅ Step 10: Monitor & Stop\n\n### Monitor\n- Watch console for AI decisions\n- Check logs in `src/data/nof1-agents/`\n- Monitor your HyperLiquid account\n\n### Stop the Bot\nPress `Ctrl+C` to stop gracefully\n\n### Check Logs\n```bash\n# View reasoning traces\ncat src/data/nof1-agents/reasoning/deepseek_*.txt\n\n# View trade logs\ncat src/data/nof1-agents/trades/*.json\n```\n\n---\n\n## 🔧 Troubleshooting\n\n### Issue: \"ModuleNotFoundError\"\n```bash\n# Make sure venv is activated\nsource venv/bin/activate\n\n# Reinstall dependencies\npip install -r requirements.txt\n```\n\n### Issue: \"DEEPSEEK_KEY not found\"\n```bash\n# Check .env file exists\nls -la .env\n\n# Verify keys are set\ncat .env\n\n# Make sure no spaces around = sign\n# WRONG: DEEPSEEK_KEY = sk-...\n# RIGHT: DEEPSEEK_KEY=sk-...\n```\n\n### Issue: \"Can't connect to HyperLiquid\"\n```bash\n# Verify private key format\n# Should start with 0x\n# Example: 0x1234567890abcdef...\n\n# Test connection manually\npython -c \"from exchange.nice_funcs_hyperliquid import get_current_price; print(get_current_price('BTC'))\"\n```\n\n### Issue: Bot keeps saying \"DO_NOTHING\"\nThis is normal! The AI is being cautious. You can:\n- Lower `MIN_CONFIDENCE_TO_TRADE` to 0.65\n- Wait for better market conditions\n- Check that data is being collected properly\n\n---\n\n## 📚 Next Steps\n\n1. **Monitor First Hour** - Watch how AI makes decisions\n2. **Review Logs** - Check `src/data/nof1-agents/reasoning/`\n3. **Adjust Settings** - Tune based on performance\n4. **Scale Gradually** - Increase capital slowly\n5. **Read Full README** - [README.md](README.md) for advanced features\n\n---\n\n## ⚠️ Safety Reminders\n\n- ✅ Start with $50-100 maximum\n- ✅ Use low leverage (5x, not 20x!)\n- ✅ Monitor closely for first few hours\n- ✅ Understand you can lose all your capital\n- ✅ Never risk more than you can afford to lose\n\n---\n\n## 🆘 Need Help?\n\n1. Check [QUICKSTART.md](QUICKSTART.md) for quick answers\n2. Read [README.md](README.md) for detailed info\n3. Review [SECURITY.md](SECURITY.md) for key management\n4. Open GitHub issue for bugs\n5. Check logs in `src/data/nof1-agents/`\n\n---\n\n## ✅ Quick Command Reference\n\n```bash\n# Activate environment\nsource venv/bin/activate\n\n# Run bot\npython agents/deepseek_trader.py\n\n# Stop bot\nCtrl+C\n\n# View logs\ncat src/data/nof1-agents/reasoning/deepseek_*.txt\n\n# Test connection\npython -c \"from exchange.nice_funcs_hyperliquid import get_current_price; print(get_current_price('BTC'))\"\n\n# Check config\npython -c \"from agents.agent_configs import CONFIG; print(CONFIG)\"\n```\n\n---\n\n**You're all set! Happy trading! 🚀**\n\nRemember: Start small, monitor closely, trade responsibly.\n\n"}}, "QUICKSTART.md": {"b181d35e8123e43e7513c0f9afc4a97024d1f7a5": {"t": 1785746620.7757673, "n": 4549, "h": "85d4e8c8ddc1abd1", "c": "# ⚡ Quick Start Guide\n\nGet up and running in 5 minutes!\n\n## 🎯 Prerequisites\n\n- Python 3.10 installed\n- HyperLiquid wallet with some funds\n- DeepSeek API key\n\n## 📝 Step-by-Step Setup\n\n### 1️⃣ Install Python 3.10\n\n**Check if you have it:**\n```bash\npython3.10 --version\n```\n\n**Don't have it? Install:**\n\nmacOS:\n```bash\nbrew install python@3.10\n```\n\nUbuntu:\n```bash\nsudo apt update && sudo apt install python3.10 python3.10-venv python3.10-dev\n```\n\nWindows: Download from [python.org](https://www.python.org/downloads/release/python-3100/)\n\n---\n\n### 2️⃣ Setup Project\n\n```bash\n# Navigate to project directory\ncd nof1-agents\n\n# Create virtual environment\npython3.10 -m venv venv\n\n# Activate virtual environment\nsource venv/bin/activate # Windows: venv\\Scripts\\activate\n\n# Install dependencies\npip install -r requirements.txt\n```\n\n---\n\n### 3️⃣ Configure API Keys\n\n```bash\n# Copy environment template\ncp env.example .env\n\n# Edit with your keys\nnano .env # or use any text editor\n```\n\n**Fill in your keys:**\n\n```bash\n# Get from https://platform.deepseek.com\nDEEPSEEK_KEY=sk-your-actual-deepseek-key-here\n\n# Your Ethereum private key (starts with 0x)\nHYPER_LIQUID_ETH_PRIVATE_KEY=0xyour-private-key-here\n\n# Your wallet address (starts with 0x)\nHYPER_LIQUID_MASTER_ADDRESS=0xyour-wallet-address-here\n```\n\n**Where to get these:**\n- **DeepSeek API Key**: Sign up at [platform.deepseek.com](https://platform.deepseek.com)\n- **Private Key**: Export from MetaMask or your wallet\n- **Wallet Address**: Copy from MetaMask or your wallet\n\n---\n\n### 4️⃣ Configure Trading Settings (Optional)\n\nEdit `agents/agent_configs.py`:\n\n```python\nCONFIG = {\n 'STARTING_CAPITAL_USD': 500, # Change to your capital\n 'SYMBOLS': ['BTC', 'ETH'], # Coins to trade\n 'MAX_LEVERAGE': 20, # Lower for safer trading\n 'CHECK_INTERVAL_MINUTES': 3, # Check frequency\n 'MIN_CONFIDENCE_TO_TRADE': 0.65, # Higher = safer but fewer trades\n}\n```\n\n**Recommended for beginners:**\n- Start with $50-100 capital\n- Use 5-10x leverage (not 20x!)\n- Increase confidence to 0.75\n- Trade only BTC and ETH\n\n---\n\n### 5️⃣ Run the Bot\n\n```bash\n# Make sure venv is activated\nsource venv/bin/activate\n\n# Run!\npython agents/deepseek_trader.py\n```\n\n**Expected Output:**\n```\n🌙 DeepSeek Pure LLM Trader - Nof1 Style\n✅ DeepSeek ready: deepseek-chat\n📋 Configuration loaded\n🚀 Starting Pure LLM Trading Agent...\n\n📊 Collecting real-time data from HyperLiquid...\n 💰 Fetching account data...\n Account Value: $500.00\n Available Cash: $500.00\n```\n\n---\n\n### 6️⃣ Monitor & Stop\n\n**Watch the logs** - The bot will:\n- Print decisions every 3 minutes\n- Show reasoning and confidence\n- Log all trades\n\n**Stop the bot:**\n- Press `Ctrl+C` to stop gracefully\n\n**Check logs:**\n```bash\n# Reasoning traces\ncat src/data/nof1-agents/reasoning/deepseek_2025-10-27.txt\n\n# Trade logs\ncat src/data/nof1-agents/trades/2025-10-27_trades.json\n```\n\n---\n\n## 🛡️ Safety Checklist\n\nBefore running with real money:\n\n- [ ] I have backed up my private keys securely\n- [ ] I'm only using funds I can afford to lose\n- [ ] I've tested with small amounts first ($10-50)\n- [ ] I understand leverage increases both gains AND losses\n- [ ] I've set appropriate stop loss percentages\n- [ ] I'm monitoring the bot during the first few hours\n- [ ] I've read the risk warnings in README.md\n\n---\n\n## 🔧 Common Issues\n\n### \"ModuleNotFoundError: No module named 'pandas_ta'\"\n```bash\nsource venv/bin/activate\npip install -r requirements.txt\n```\n\n### \"DEEPSEEK_KEY not found\"\n```bash\n# Make sure .env file exists\nls -la .env\n\n# Check contents (keys should not be empty)\ncat .env\n```\n\n### \"Can't connect to HyperLiquid\"\n- Verify your private key starts with `0x`\n- Ensure wallet has some funds\n- Check internet connection\n\n### Bot keeps saying \"DO_NOTHING\"\n- This is normal - AI is being cautious\n- Lower `MIN_CONFIDENCE_TO_TRADE` to 0.60\n- Market conditions might not be favorable\n\n---\n\n## 📚 Next Steps\n\nOnce you're running:\n\n1. **Monitor for first hour** - Watch how AI makes decisions\n2. **Review logs** - Check reasoning traces to understand AI logic\n3. **Adjust settings** - Tune confidence, leverage, stop loss\n4. **Scale gradually** - Start small, increase capital slowly\n5. **Track performance** - Monitor P&L and win rate\n\n---\n\n## 🆘 Need Help?\n\n- Read full [README.md](README.md) for detailed info\n- Check [SECURITY.md](SECURITY.md) for key management\n- Open GitHub issue for bugs\n- Review logs in `src/data/nof1-agents/`\n\n---\n\n**Happy trading! Start small, trade safe, monitor closely. 🚀**\n\n"}}}} |