╔════════════════════════════════════════════════════════════════════════════╗
║                    REAL DATA INTEGRATION - QUICK START                     ║
║              Claude × DeepSeek Investment Advisory System v2.0             ║
╚════════════════════════════════════════════════════════════════════════════╝

✅ SYSTEM STATUS: OPERATIONAL (Ready for real API key configuration)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

📚 DOCUMENTATION FILES

1. REAL_DATA_SETUP_GUIDE.md
   └─ Complete setup guide with troubleshooting
   └─ How to obtain free API keys
   └─ Step-by-step configuration instructions

2. INTEGRATION_SUMMARY.md
   └─ What was done and why
   └─ System architecture overview
   └─ Performance metrics and limitations

3. VERIFICATION_CHECKLIST.md
   └─ 22-point checklist to verify system
   └─ API endpoint tests
   └─ Performance tests

4. QUICK_START.txt (this file)
   └─ Quick reference card

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

⚡ QUICK SETUP (5 minutes)

Step 1: Get Free API Key
  → Visit: https://www.alphavantage.co/api/
  → Copy your API key

Step 2: Update Configuration
  → nano /root/work/stock/.env
  → Find: ALPHA_VANTAGE_API_KEY=demo
  → Change to: ALPHA_VANTAGE_API_KEY=your_key_here
  → Save (Ctrl+X, Y, Enter)

Step 3: Start Ollama (on host machine, in separate terminal)
  → ollama serve

Step 4: Restart System
  → cd /root/work/stock
  → docker-compose down
  → docker-compose up -d --build
  → sleep 30

Step 5: Test It
  → curl -X POST http://localhost:8001/api/collab/recommend \
      -H "Content-Type: application/json" \
      -d '{"symbol": "AAPL"}'

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

🔑 API KEYS REFERENCE

Required:
  ├─ Alpha Vantage API Key
  │  ├─ URL: https://www.alphavantage.co/api/
  │  ├─ Cost: FREE
  │  ├─ Limit: 5 requests/min, unlimited total
  │  └─ Where to set: ALPHA_VANTAGE_API_KEY in .env

Optional:
  ├─ OpenExchangeRates
  │  ├─ URL: https://openexchangerates.org/
  │  ├─ Cost: FREE
  │  ├─ Limit: 1000 requests/month
  │  └─ Where to set: OPENEXCHANGERATES_API_KEY in .env
  │
  └─ Fixer.io
     ├─ URL: https://fixer.io/
     ├─ Cost: FREE
     ├─ Limit: 100 requests/month
     └─ Where to set: FIXER_API_KEY in .env

Already Configured:
  └─ OpenRouter (Claude 4.5): Already has API key

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

🧪 TEST ENDPOINTS

Health Check:
  curl http://localhost:8001/api/collab/health

US Stock (AAPL):
  curl -X POST http://localhost:8001/api/collab/recommend \
    -H "Content-Type: application/json" \
    -d '{"symbol": "AAPL"}'

Hong Kong Stock (Tencent):
  curl -X POST http://localhost:8001/api/collab/recommend \
    -H "Content-Type: application/json" \
    -d '{"symbol": "0700.HK"}'

Gold:
  curl -X POST http://localhost:8001/api/collab/recommend \
    -H "Content-Type: application/json" \
    -d '{"symbol": "GC=F"}'

Forex (EUR/USD):
  curl -X POST http://localhost:8001/api/collab/recommend \
    -H "Content-Type: application/json" \
    -d '{"symbol": "EURUSD=X"}'

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

📊 SUPPORTED ASSETS

Asset Class          Symbol Format    Example
─────────────────────────────────────────────────
US Stocks            SYMBOL           AAPL, MSFT, NVDA
Hong Kong Stocks     SYMBOL.HK        0700.HK (Tencent)
Commodities          SYMBOL=F         GC=F (Gold), SI=F (Silver)
Forex               FROM/TO=X         EURUSD=X, GBPUSD=X

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

🔧 COMMON COMMANDS

View .env file:
  cat /root/work/stock/.env

Edit .env file:
  nano /root/work/stock/.env

Check Docker status:
  docker-compose ps

View backend logs:
  docker logs stock_backend

Restart system:
  docker-compose restart

Full rebuild:
  cd /root/work/stock && docker-compose down && docker-compose up -d --build

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

⚙️ SYSTEM COMPONENTS

Backend API:        http://localhost:8001 (Port 8001)
Frontend:          http://localhost:8090 (Port 8090) [IP: 85.239.237.116]
Database:          localhost:5433 (PostgreSQL)
Cache:             localhost:6380 (Redis)
Admin Panel:       http://localhost:8091 (Adminer)
Ollama (local):    localhost:11434 (on host machine)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

📈 PERFORMANCE TARGETS

Response Time:
  ├─ Cold Cache (first request): 8-12 seconds
  └─ Warm Cache (cached data): 2-3 seconds

Data Update Frequency:
  ├─ Stock Quotes: 5-minute updates
  ├─ Daily Data: End-of-day updates
  ├─ Forex Rates: 1-hour cache
  └─ Technical Indicators: Real-time calculation

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

🚨 TROUBLESHOOTING

Issue: "ALPHA_VANTAGE_API_KEY is required"
  → Solution: Set real API key in .env, restart containers

Issue: No stock data returned
  → Solution: Check API key is valid, wait 1 min (rate limit), check logs

Issue: Ollama not available
  → Solution: Run "ollama serve" on host machine, verify connectivity

Issue: Container won't start
  → Solution: docker-compose logs stock_backend

Issue: Slow response times
  → Solution: Check Redis is running, clear cache if needed

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

📖 FOR MORE INFORMATION

Read the full setup guide:
  cat REAL_DATA_SETUP_GUIDE.md

Check what was integrated:
  cat INTEGRATION_SUMMARY.md

Verify your setup:
  cat VERIFICATION_CHECKLIST.md

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

✨ SYSTEM READY FOR PRODUCTION

All code is implemented, tested, and operational.
Just add your real API key and you're ready to go!

Questions? See REAL_DATA_SETUP_GUIDE.md for detailed troubleshooting.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Last Updated: 2025-11-12
Status: ✅ Production Ready
