่ทณ่ฝฌ่‡ณ

๐Ÿ pip Installation Guide

Difficulty: โญโญ Medium
Time: 10 minutes


โœ… Prerequisites

  • Python 3.11 or higher (Get Python)
  • pip (Python package manager)
  • API Keys (Twelve Data, Alpha Vantage)

๐Ÿš€ Quick Start

1. Verify Python Version

python3 --version
# Should be 3.11 or higher

2. Install from PyPI

pip install openclaw-trading-assistant

3. Verify Installation

ta --version
# Output: OpenClaw Trading Assistant CLI v1.3.0

โš™๏ธ Configuration

1. Create Configuration Directory

mkdir -p ta-config && cd ta-config

2. Download Configuration Files

# Download .env template
curl -O https://raw.githubusercontent.com/XuXuClassMate/trading-assistant/main/.env.example
cp .env.example .env

# Download watchlist template
curl -O https://raw.githubusercontent.com/XuXuClassMate/trading-assistant/main/watchlist.txt.example
cp watchlist.txt.example watchlist.txt

3. Edit Configuration

# Edit .env with your API keys
nano .env  # or use your favorite editor

Required API Keys:

TWELVE_DATA_API_KEY=your_key_here
ALPHA_VANTAGE_API_KEY=your_key_here
LANGUAGE=en  # or 'zh' for Chinese


๐ŸŽฏ Usage

Interactive Mode

ta

Direct Commands

# Trading signals
ta sig

# Support/Resistance
ta sr

# Position calculator
ta pos --symbol NVDA --price 175 --capital 10000

# All analysis
ta all

Set Environment Variables

# Option 1: Export before running
export TWELVE_DATA_API_KEY=your_key
export ALPHA_VANTAGE_API_KEY=your_key
ta

# Option 2: Use .env file (automatic)
cd ta-config
ta

๐Ÿ“‹ Command Reference

Command Shortcut Description
ta - Start interactive mode
ta sig ta signals Generate trading signals
ta sr ta support-resistance Analyze support/resistance
ta pos ta position Calculate position size
ta alerts ta alert Manage price alerts
ta all ta analyze Run all analysis
ta v ta version Show version
ta h ta help Show help

๐Ÿ”ง Advanced Configuration

Custom Configuration Path

export TA_CONFIG_PATH=/path/to/your/config
ta

Debug Mode

export TA_DEBUG=true
ta

Custom Language

export LANGUAGE=zh
ta

๐Ÿ”„ Update

# Check for updates
pip list | grep openclaw-trading-assistant

# Update to latest version
pip install --upgrade openclaw-trading-assistant

# Verify update
ta --version

๐Ÿ—‘๏ธ Uninstall

pip uninstall openclaw-trading-assistant

โ“ Troubleshooting

Python Version Error

# Check Python version
python3 --version

# If < 3.11, upgrade Python
# macOS: brew install python@3.11
# Ubuntu: sudo apt install python3.11
# Windows: Download from python.org

Permission Denied

# Install for current user only
pip install --user openclaw-trading-assistant

# Or use sudo (not recommended)
sudo pip install openclaw-trading-assistant

Command Not Found

# Add pip bin directory to PATH
# Find pip path
pip show -f openclaw-trading-assistant | grep Location

# Add to PATH (example for ~/.bashrc or ~/.zshrc)
export PATH=$PATH:~/.local/bin
source ~/.bashrc  # or source ~/.zshrc

API Rate Limits

If you hit API rate limits: - Twelve Data: 800 calls/day (free tier) - Alpha Vantage: 25 calls/day (free tier)

Solutions: 1. Upgrade to paid tier 2. Reduce analysis frequency 3. Cache results locally


๐Ÿ“š Next Steps