Overview
TraderMagic is an AI-powered automated trading system that uses RSI technical indicators to make trading decisions. The system consists of four main components:
- Data Retrieval Service: Fetches RSI data from TAAPI.io
- AI Decision Engine: Uses Ollama LLM to analyze RSI data and decide whether to buy, sell, or hold
- Trade Execution Service: Connects to Alpaca for executing trades based on AI decisions
- Web Dashboard: This interface for monitoring trading activity in real-time
Required Accounts
To use TraderMagic, you'll need accounts with these services:
Provides technical analysis data (RSI values). Their free tier allows limited usage, but paid tiers offer more frequent updates and additional symbols.
Sign up for TAAPI
Executes trades based on system signals. Offers paper trading (simulated) for testing without using real money.
Sign up for Alpaca
Note: After creating accounts, you'll need to add your API keys to the .env file to connect the system to these services.
Dashboard Updates
This dashboard updates in two ways:
- Automatic updates: The dashboard refreshes every 15 seconds
- Manual refresh: Use the "Refresh" button for immediate updates
Both update methods only retrieve data from Redis cache, not directly from external APIs. This ensures no additional load on rate-limited services.
Account Summary
The account summary section provides key financial metrics:
- Portfolio Value: Total value of your account
- Cash Balance: Available cash in your account
- Buying Power: Available funds for trading
- Daily Change: Today's portfolio change, color-coded green for positive and red for negative changes
Theme Options
The dashboard supports three theme options, accessible via the theme selector in the top-right corner:
- Auto: Automatically matches your system's theme preference
- Light: Classic light theme for daytime use
- Dark: Reduced eye strain for nighttime use
TAAPI.io Rate Limits
The system is designed to respect TAAPI.io's rate limits based on your subscription tier:
| Tier |
Rate Limit |
Recommended Poll Interval |
| Free |
1 request / 15 seconds |
300 seconds (5 minutes) |
| Basic |
5 requests / 15 seconds |
60 seconds (1 minute) |
| Pro |
30 requests / 15 seconds |
10 seconds |
| Expert |
75 requests / 15 seconds |
5 seconds |
During initial startup, you may see 429 rate limit errors in the logs - this is expected while the services initialize and space out their requests.
Trading Information
The system trades a small percentage of your portfolio (default: 2%) and includes safeguards:
- Balance checking ensures trades are only executed when sufficient funds are available
- Minimum order size enforcement prevents very small trades
- Paper trading mode is enabled for safe testing (indicated by the blue "Paper Trading" badge)
Symbol Formats
The system supports two types of symbols:
- Cryptocurrencies: Use format like "BTC/USDT", "ETH/USDT", etc.
- Stocks: Use simple ticker symbols like "AAPL", "TSLA", etc. - these will automatically be converted to the right format
Note: Free TAAPI accounts are limited to specific symbols only. If you're using the free tier, you may need to upgrade for full symbol support.
Debug Mode
When running in debug mode (indicated by a yellow banner at the top), you can:
- Test Trading: Execute simulated trades directly from the dashboard
- Safe Testing: All trades are simulated locally with no API calls
- Instant Feedback: Get immediate responses about trade decisions
Debug mode is perfect for testing trading strategies and UI functionality without affecting your account.
Troubleshooting
If you encounter issues:
- Check Docker logs:
docker compose logs -f
- Ensure your API keys are correctly configured in the .env file
- Verify that all services are running:
docker compose ps
- Restart the system using the restart script:
./restart.sh
For more detailed information, refer to the README.md file in the project repository.