Commit Graph

10 Commits

Author SHA1 Message Date
shinchan-zhai
2711701ec6 docs(nofxi): NOFX integration audit + plan
Full audit of NOFX's capabilities vs NOFXi's current integration status.
Priority roadmap: P0 (kernel+trader+market+mcp) → P1 (store+risk) → P2 (grid+web)
2026-03-22 23:10:58 +08:00
shinchan-zhai
3e5b280987 feat(nofxi): proactive intelligence - Sentinel, Brain, Learner
🧠 Brain (proactive intelligence):
- Receives signals from Sentinel and decides when to notify
- Signal debouncing (same type+symbol within 10min)
- Morning brief at 08:30, evening brief at 20:30 (AI-generated)
- Crypto news scanning every 5 minutes
- Auto-filters high-impact news by sentiment + relevance

👁️ Sentinel (market anomaly detection):
- Watches BTC/ETH/SOL by default (expandable)
- Price breakout detection (>3% in 5 minutes)
- Volume spike detection (>3x average)
- Funding rate anomaly detection (>0.1%)
- 60-second scan interval, 1-hour price history buffer

📰 News Monitor:
- CryptoCompare API (free, no auth)
- Keyword-based sentiment classification (bullish/bearish/neutral)
- Symbol extraction from headlines
- Deduplication via seen URLs

📚 Learner (trading memory):
- User profile analysis (win rate, preferred side, risk tolerance)
- Trading lessons storage (win/loss patterns, strategy notes)
- AI prediction tracking (log predictions → resolve with actual P/L)
- Prediction accuracy metrics per model

NOFXi is no longer a passive chatbot. It watches, thinks, learns, and acts.
2026-03-22 23:02:46 +08:00
shinchan-zhai
bdfad190ff fix(nofxi): prevent IME composition enter from sending message 2026-03-22 22:35:22 +08:00
shinchan-zhai
9098afd3cf feat(nofxi): full i18n bilingual support (zh/en)
Agent i18n:
- All command responses bilingual (help, status, positions, balance, trades, analysis, settings, errors)
- Language auto-detected from web UI lang toggle
- Stored per-user in SQLite preferences
- AI chat system prompt switches to Chinese/English based on user lang
- Trade confirmation prompts bilingual

Web UI:
- Sends lang parameter with every API request
- Agent extracts [lang:xx] prefix and persists preference

i18n message catalog: nofxi/internal/agent/i18n.go
2026-03-22 22:32:38 +08:00
shinchan-zhai
fb6665a795 feat(nofxi): i18n bilingual UI + professional trading terminal redesign
i18n:
- Full Chinese/English support (localStorage persisted)
- Toggle button in header (EN ↔ 中文)
- All UI elements translated: tabs, sidebar, hints, welcome message

UI improvements:
- Compact header (48px), tighter spacing throughout
- BTC/USDT info ticker bar (price, 24h vol, high/low, trades)
- Auto-refreshing market data (15s)
- Refined color scheme with lower contrast grid
- Smaller fonts, denser layout (pro terminal feel)
- Chart: added 5m timeframe, removed less common pairs

Backend:
- /api/klines endpoint (Binance futures, no auth)
- /api/ticker endpoint (24h stats)
2026-03-22 22:27:08 +08:00
shinchan-zhai
b72ef9e6df feat(nofxi): K-line chart with TradingView lightweight-charts
- Candlestick chart + volume histogram
- 8 trading pairs: BTC/ETH/SOL/BNB/XRP/DOGE/ADA/AVAX
- 5 timeframes: 15m/1H/4H/1D/1W
- Real-time price & 24h change display
- Auto-refresh every 30s
- Backend: /api/klines + /api/ticker (Binance futures API)
- Dark trading terminal theme, responsive resize
- Tab switching: Chat ↔ Chart
2026-03-22 22:18:48 +08:00
shinchan-zhai
c6f078b5cb feat(nofxi): redesign Web UI - professional trading platform style
- Dark trading terminal aesthetic (deep black + green/purple accents)
- Gradient logo, nav pills, status badge
- Sidebar: Quick Trade grid, Portfolio list, Monitor, Strategy
- Chat: card bubbles with avatars, timestamps, fade-in animation
- Typing indicator with bouncing dots
- Glowing input focus, keyboard hints
- Inter + JetBrains Mono fonts
- Mobile responsive
2026-03-22 22:12:43 +08:00
shinchan-zhai
deb0e843eb chore: gitignore secrets, db, binary 2026-03-22 22:04:53 +08:00
shinchan-zhai
34f5e6fe71 feat(nofxi): Phase 3 complete - Exchange factory, Web UI, Strategy runner, Docker
Exchange Factory:
- CreateTrader() supports Binance/OKX/Bybit/Bitget/KuCoin/Gate
- Auto-registers traders from config on startup
- Direct import of nofx/trader packages (merged into main module)

Web UI:
- Dark theme chat interface at :8900
- Quick action sidebar (analyze, watch, positions, balance)
- Real-time health check indicator
- Mobile responsive

Strategy Runner:
- /strategy start BTC 1h - AI auto-analyzes on interval
- /strategy stop <id> - stop strategy
- /strategy list - view active strategies
- Notifications pushed to Telegram on signals
- Configurable intervals: 15m/30m/1h/4h

Docker:
- Multi-stage Dockerfile (alpine, ~20MB)
- docker-compose.yml with volume persistence

Bug fixes:
- Fixed panic on empty exchanges config
- Fixed thinking mode response parsing (qwen3 content:null)
- Added request timeout (55s) in Telegram handler
- Better error logging
2026-03-22 22:04:37 +08:00
shinchan-zhai
cf7bf16c28 feat: init nofxi - AI Trading Agent module
NOFXi — Your AI Trading Agent, built on NOFX.

Architecture:
- Agent Core: intent routing, conversation memory, trade confirmation
- Memory: SQLite (trades, conversations, preferences, strategies)
- Thinking: LLM client (OpenAI/claw402/DeepSeek compatible)
- Execution: Bridge to NOFX trader engine (9 exchanges)
- Perception: Market monitor, price alerts, anomaly detection
- Interaction: Telegram bot + REST API + OpenAI-compatible endpoint

Features:
- Natural language trading (中英文)
- /buy /sell /analyze /watch /alert /positions /balance
- Daily P/L reports, portfolio risk checks
- Trade confirmation flow (safety first)
- Price polling and alert notifications
2026-03-22 17:48:14 +08:00