Files
nofx/docs/guides/faq.en.md
Liu Xiang Qian 89bb8d3eb6 docs: Expand FAQ and clarify separation from TROUBLESHOOTING
Addressed review feedback on PR #226:
- FAQ and TROUBLESHOOTING serve different purposes and should both be kept
- FAQ: Quick Q&A format for common questions (now expanded)
- TROUBLESHOOTING: Detailed step-by-step diagnostic guide

Changes:
- Expanded FAQ from 26 lines to 200+ lines with 7 sections:
  * General Questions (What is NOFX, supported exchanges, profitability)
  * Setup & Configuration (requirements, API keys, subaccounts)
  * Trading Questions (decision frequency, position limits, customization)
  * Technical Issues (quick fixes for common errors)
  * AI & Model Questions (supported models, costs, learning)
  * Data & Privacy (storage, security, export)
  * Contributing (how to help, feature requests)

- Added cross-references between FAQ and TROUBLESHOOTING
- FAQ provides quick answers with links to detailed troubleshooting
- TROUBLESHOOTING remains comprehensive diagnostic guide

Both English and Chinese versions updated.

Fixes review comment from @reviewer on PR #226

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-02 11:04:58 +08:00

206 lines
5.8 KiB
Markdown

# Frequently Asked Questions (FAQ)
Quick answers to common questions. For detailed troubleshooting, see [Troubleshooting Guide](TROUBLESHOOTING.md).
---
## General Questions
### What is NOFX?
NOFX is an AI-powered cryptocurrency trading bot that uses large language models (LLMs) to make trading decisions on futures markets.
### Which exchanges are supported?
- ✅ Binance Futures
- ✅ Hyperliquid
- 🚧 More exchanges coming soon
### Is NOFX profitable?
AI trading is **experimental** and **not guaranteed** to be profitable. Always start with small amounts and never invest more than you can afford to lose.
### Can I run multiple traders simultaneously?
Yes! NOFX supports running multiple traders with different configurations, AI models, and trading strategies.
---
## Setup & Configuration
### What are the system requirements?
- **OS**: Linux, macOS, or Windows (Docker recommended)
- **RAM**: 2GB minimum, 4GB recommended
- **Disk**: 1GB for application + logs
- **Network**: Stable internet connection
### Do I need coding experience?
No! NOFX has a web UI for all configuration. However, basic command line knowledge helps with setup and troubleshooting.
### How do I get API keys?
1. **Binance**: Account → API Management → Create API → Enable Futures
2. **Hyperliquid**: Visit [Hyperliquid App](https://app.hyperliquid.xyz/) → API Settings
### Should I use a subaccount?
**Recommended**: Yes, use a subaccount dedicated to NOFX for better risk isolation. However, note that some subaccounts have restrictions (e.g., 5x max leverage on Binance).
---
## Trading Questions
### Why isn't my trader making any trades?
Common reasons:
- AI decided to "wait" due to market conditions
- Insufficient balance or margin
- Position limits reached (default: max 3 positions)
- See detailed diagnostics in [Troubleshooting Guide](TROUBLESHOOTING.md#-ai-always-says-wait--hold)
### How often does the AI make decisions?
Configurable! Default is every **3-5 minutes**. Too frequent = overtrading, too slow = missed opportunities.
### Can I customize the trading strategy?
Yes! You can:
- Adjust leverage settings
- Modify coin selection pool
- Change decision intervals
- Customize system prompts (advanced)
### What's the maximum number of concurrent positions?
Default: **3 positions**. This is a soft limit defined in the AI prompt, not hard-coded. See `decision/engine.go:266`.
---
## Technical Issues
### Binance Position Mode Error (code=-4061)
**Error**: `Order's position side does not match user's setting`
**Solution**: Switch to **Hedge Mode** (双向持仓)
1. Login to [Binance Futures](https://www.binance.com/en/futures/BTCUSDT)
2. Click **⚙️ Preferences** (top right)
3. Select **Position Mode****Hedge Mode**
4. ⚠️ Close all positions first
**Why**: NOFX uses `PositionSide(LONG/SHORT)` which requires Hedge Mode.
See [Issue #202](https://github.com/tinkle-community/nofx/issues/202) and [Troubleshooting Guide](TROUBLESHOOTING.md#-only-opening-short-positions-issue-202).
---
### Backend won't start / Port already in use
**Solution**:
```bash
# Check what's using port 8080
lsof -i :8080
# Change port in .env
NOFX_BACKEND_PORT=8081
```
---
### Frontend shows "Loading..." forever
**Quick Check**:
```bash
# Is backend running?
curl http://localhost:8080/api/health
# Should return: {"status":"ok"}
```
If not, check [Troubleshooting Guide](TROUBLESHOOTING.md#-frontend-cant-connect-to-backend).
---
### Database locked error
**Solution**:
```bash
# Stop all NOFX processes
docker compose down
# OR
pkill nofx
# Restart
docker compose up -d
```
---
## AI & Model Questions
### Which AI models are supported?
- DeepSeek (recommended for cost/performance)
- OpenAI GPT-4
- Claude (Anthropic)
- Custom models via API
### How much do API calls cost?
Depends on your model and decision frequency:
- **DeepSeek**: ~$0.10-0.50 per day (1 trader, 5min intervals)
- **GPT-4**: ~$2-5 per day
- **Claude**: ~$1-3 per day
### Can I use multiple AI models?
Yes! Each trader can use a different AI model. You can even A/B test different models.
### Does the AI learn from its mistakes?
Yes, to some extent. NOFX provides historical performance feedback in each decision prompt, allowing the AI to adjust its strategy.
---
## Data & Privacy
### Where is my data stored?
All data is stored **locally** on your machine in SQLite databases:
- `config.db` - Trader configurations
- `trading.db` - Trade history
- `decision_logs/` - AI decision records
### Is my API key secure?
API keys are stored in local databases. Never share your databases or `.env` files. We recommend using API keys with IP whitelist restrictions.
### Can I export my trading history?
Yes! Trading data is in SQLite format. You can query it directly:
```bash
sqlite3 trading.db "SELECT * FROM trades;"
```
---
## Troubleshooting
### Where can I find detailed troubleshooting?
See the comprehensive [Troubleshooting Guide](TROUBLESHOOTING.md) for:
- Step-by-step diagnostics
- Log collection methods
- Common error solutions
- Emergency reset procedures
### How do I report a bug?
1. Check [Troubleshooting Guide](TROUBLESHOOTING.md) first
2. Search [existing issues](https://github.com/tinkle-community/nofx/issues)
3. If not found, use our [Bug Report Template](../../.github/ISSUE_TEMPLATE/bug_report.md)
### Where can I get help?
- [GitHub Discussions](https://github.com/tinkle-community/nofx/discussions)
- [Telegram Community](https://t.me/nofx_dev_community)
- [GitHub Issues](https://github.com/tinkle-community/nofx/issues)
---
## Contributing
### Can I contribute to NOFX?
Yes! We welcome contributions:
- Bug fixes and features
- Documentation improvements
- Translations
- See [Contributing Guide](../CONTRIBUTING.md)
### How do I suggest new features?
Open a [Feature Request](https://github.com/tinkle-community/nofx/issues/new/choose) with your idea!
---
**Last Updated:** 2025-11-02