mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-06-06 05:51:19 +08:00
refactor: drop sqlite fallback and admin mode
This commit is contained in:
@@ -93,7 +93,7 @@ nofx/
|
||||
| `github.com/gin-gonic/gin` | HTTP API framework | v1.9+ |
|
||||
| `github.com/adshao/go-binance/v2` | Binance API client | v2.4+ |
|
||||
| `github.com/markcheno/go-talib` | Technical indicators (TA-Lib) | Latest |
|
||||
| `github.com/mattn/go-sqlite3` | SQLite database driver | v1.14+ |
|
||||
| `github.com/lib/pq` | PostgreSQL database driver | v1.10+ |
|
||||
| `github.com/golang-jwt/jwt/v5` | JWT authentication | v5.0+ |
|
||||
| `github.com/pquerna/otp` | 2FA/TOTP support | v1.4+ |
|
||||
| `golang.org/x/crypto` | Password hashing (bcrypt) | Latest |
|
||||
|
||||
@@ -93,7 +93,7 @@ nofx/
|
||||
| `github.com/gin-gonic/gin` | HTTP API 框架 | v1.9+ |
|
||||
| `github.com/adshao/go-binance/v2` | Binance API 客户端 | v2.4+ |
|
||||
| `github.com/markcheno/go-talib` | 技术指标(TA-Lib) | 最新 |
|
||||
| `github.com/mattn/go-sqlite3` | SQLite 数据库驱动 | v1.14+ |
|
||||
| `github.com/lib/pq` | PostgreSQL 数据库驱动 | v1.10+ |
|
||||
| `github.com/golang-jwt/jwt/v5` | JWT 认证 | v5.0+ |
|
||||
| `github.com/pquerna/otp` | 2FA/TOTP 支持 | v1.4+ |
|
||||
| `golang.org/x/crypto` | 密码哈希(bcrypt) | 最新 |
|
||||
@@ -282,7 +282,6 @@ GET /api/decisions/latest # 最近决策
|
||||
- 基于 JWT token 的认证
|
||||
- 使用 TOTP 的 2FA(Google Authenticator)
|
||||
- Bcrypt 密码哈希
|
||||
- 管理员模式(简化的单用户模式)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -152,18 +152,17 @@ Yes, to some extent. NOFX provides historical performance feedback in each decis
|
||||
## 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
|
||||
All data is stored **locally** in PostgreSQL (Docker volume `postgres_data`) plus:
|
||||
- `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:
|
||||
Yes! Use `pg_dump` or `psql` to export data:
|
||||
```bash
|
||||
sqlite3 trading.db "SELECT * FROM trades;"
|
||||
docker compose exec postgres \
|
||||
psql -U nofx -d nofx -c "SELECT * FROM trades;"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
@@ -152,18 +152,17 @@ docker compose up -d
|
||||
## 数据与隐私
|
||||
|
||||
### 我的数据存储在哪里?
|
||||
所有数据都**本地存储**在您的机器上,使用 SQLite 数据库:
|
||||
- `config.db` - 交易员配置
|
||||
- `trading.db` - 交易历史
|
||||
所有数据都**本地存储**在 PostgreSQL(Docker 卷 `postgres_data`)中,另有:
|
||||
- `decision_logs/` - AI 决策记录
|
||||
|
||||
### API 密钥安全吗?
|
||||
API 密钥存储在本地数据库中。永远不要分享您的数据库或 `.env` 文件。我们建议使用带 IP 白名单限制的 API 密钥。
|
||||
|
||||
### 可以导出交易历史吗?
|
||||
可以!交易数据是 SQLite 格式。您可以直接查询:
|
||||
可以!使用 `pg_dump` 或 `psql` 导出数据:
|
||||
```bash
|
||||
sqlite3 trading.db "SELECT * FROM trades;"
|
||||
docker compose exec postgres \
|
||||
psql -U nofx -d nofx -c "SELECT * FROM trades;"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user