Troubleshooting & FAQ

Solutions for common issues and answers to frequently asked questions.

Installation & Setup

npm install fails with permission errors▼
Try clearing npm cache and using sudo if necessary:

npm cache clean --force npm install

Or on Windows, run as Administrator. If using WSL, make sure your project isn't in /mnt (Windows mount) as file permissions behave differently.

Cannot find Node.js or npm after installation▼
Node.js may not be in your PATH. Try:

node --version npm --version

If these don't work, reinstall Node.js and make sure to check "Add to PATH" during installation. Then restart your terminal.

API credentials are not being read from .env.local▼
Make sure your .env.local file:

1. Exists in the project root 2. Uses exact variable names (case-sensitive) 3. Has no spaces around = signs 4. Has been saved 5. Restart the bot for changes to take effect

Example format:
EXCHANGE_KEY=abc123
EXCHANGE_SECRET=xyz789

Trading & Performance

Bot not placing any trades▼
Check these common causes:
1. Market conditions: Check if trend/signals exist
2. Configuration: Is MIN_SIGNAL_STRENGTH too high?
3. Balance: Do you have enough funds?
4. Timeframe: Are you on correct timeframe?
5. Indicators: Check RSI/EMA values
Increase verbosity to see debug logs:
export DEBUG=* and check output.
Trades are losing money consistently▼
This is normal initially. Try:
1. Run backtest first: npm run backtest
2. Check strategy configuration
3. Verify stop-loss and take-profit ratios
4. Try different timeframe
5. Reduce position size
6. Run paper trading first
7. Check market conditions (avoid choppy/sideways markets)
Getting liquidated despite stop-loss▼
On leveraged trading:

1. Use lower leverage (1-2x max) 2. Increase stop-loss buffer 3. Reduce position size 4. Use post-only orders 5. Monitor gaps and limit moves 6. Set daily loss limits

Consider trading spot markets first to avoid liquidation risk.

Paper trading works but live trading fails▼
Check these common differences:
1. Slippage: Real orders have slippage, paper doesn't
2. Latency: Network delays can affect entry
3. Fees: Exchange fees reduce profit
4. Minimum size: Order too small?
5. API limits: Rate limited by exchange?

Start with very small real positions and scale up.

Technical Issues

WebSocket connection keeps disconnecting▼
This is usually a network issue:

1. Check internet connection 2. Increase reconnection timeout in config 3. Use fewer concurrent streams 4. Check firewall/proxy settings 5. Try connecting from different network

Configuration:
WS_RECONNECT_ATTEMPTS: 10
WS_RECONNECT_DELAY: 5000
High CPU/Memory usage▼
Reduce resource usage:
1. Lower timeframe (1m uses less memory than 1h)
2. Reduce number of indicators
3. Reduce MAX_CONCURRENT_TRADES
4. Clear old logs: npm run clean-logs
5. Monitor with: ps aux | grep edison

Consider running on dedicated server for production.

Backtest takes forever to complete▼
Speed up backtesting:

1. Use shorter date range 2. Reduce number of strategies 3. Increase timeframe 4. Upgrade CPU/RAM 5. Close other applications

Optional: npm run backtest --fast (reduced optimization)
Getting "API Rate Limit" errors▼
Reduce API call frequency:

1. Increase candle timeframe 2. Reduce number of symbols 3. Decrease polling frequency 4. Add delays between requests 5. Use different API key if available

Configuration:
API_CALL_DELAY: 100 # milliseconds
RATE_LIMIT_BUFFER: 0.8 # Use only 80% of limit

Configuration Issues

Configuration changes don't take effect▼
Always restart the bot after config changes:
1. Stop the bot (Ctrl+C)
2. Make configuration changes
3. Save the file
4. Restart: npm run start:live
Some settings may require recompile:
npm run build
Invalid configuration error▼
Check your config file for:

1. JSON syntax errors (use JSON validator) 2. Missing required fields 3. Wrong data types (string vs number) 4. Out-of-range values 5. Typos in parameter names

Validate: npm run validate-config
Strategy not matching my parameters▼
Verify:
1. Strategy ID matches enabled strategy
2. All required parameters set
3. Check parameter ranges
4. Restart bot after changes
5. Check logs: grep "Strategy" logs.txt

Account & Security

How do I securely store API keys?▼
Best practices:

1. Never commit .env files to git 2. Add .env* to .gitignore 3. Use environment variables 4. Restrict API key permissions (read-only if possible) 5. Use IP whitelist on exchange 6. Rotate keys regularly 7. Use different key for paper trading

Example permissions:
- Read: ✓
- Spot trade: ✓ (paper trading)
- Futures: ✗ (until ready)
- Withdrawal: ✗
Can EDISON be used on multiple accounts?▼
Yes, use multiple config files:

config-account1.json config-account2.json

Run multiple instances:
npm run start:live -- --config config-account1.json
npm run start:live -- --config config-account2.json

⚠️ Watch for API rate limits across instances.

Can't find your issue?

Check the documentation or search GitHub issues for similar problems. The community is helpful!

Join GitHub Discussions →