6 Commits
Author SHA1 Message Date
gavindiazandClaude Code 7e50a0fef6 feat(llm): provider-agnostic OpenAI-compatible client; FinBERT warm-up off the event loop
Replace the Google Gemini lock-in with a unified chat client usable with any
OpenAI-compatible /v1 endpoint (OpenAI, OpenRouter, DeepSeek, Moonshot, Qwen,
Ollama, Gemini-via-compat...). Switch provider purely via AI_BASE_URL/AI_MODEL.

- ai/llm_client.py (new): lazy openai SDK, per-candidate 429/503/timeout
  failover across AI_MODEL_FAILOVER, robust JSON extraction, reasoning-budget
  retry, image analysis via base64 data URI, singleton get_llm_client()
- settings.py: GeminiSettings -> LLMSettings (api_key/base_url/model/failover/
  vision_model), keeps GEMINI_API_KEY fallback so existing .env keeps working
- news_analyzer.py: analyze_with_gemini -> analyze_with_llm (same output keys);
  FinBERT now loads in a daemon warm-up thread with lexicon fallback - the
  transformers first import was blocking the asyncio main loop 15-45s
  (importlib.metadata full package scan); HF_ENDPOINT hf-mirror setdefault
- telegram_bot.py: news digest + AI-vision chart analysis via the LLM client
- requirements: google-genai -> openai>=1.0; docs/.env.example/README updated
  for the new provider-agnostic setup; dashboard meta updated

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-10-21 20:56:52 +08:00
Mazonia 560f53be5f Update startup script to enable active trading on boot by default and update README 2026-10-04 17:00:57 +00:00
Mazonia 944955f194 docs: update README with Temporal Self-Attention, stationarity features, news deduplication & dashboard features 2026-09-21 18:57:51 +00:00
Mazonia a7a2b93985 feat: implement autonomous self-learning and mistake adaptation engine
- Implemented TradeLearner with post-mortem mistake diagnostics and defensive rule formulation
- Added Mistake Memory Guard to screen prospective signals against past loss patterns and traps
- Dynamic Multi-Armed Bandit strategy multipliers (Scalping, Day, Swing) and adaptive confluence weighting
- Integrated with TradeExecutor, Bot position synchronization, and SignalAggregator
- Real-time Self-Learning HUD in modern glassmorphic web dashboard (/api/learning)
- Added /learning command and interactive callback button to Telegram Command Center
- Added TradeLesson and AdaptiveWeight persistence models in SQLite WAL database
- Updated documentation and README
2026-09-21 09:53:45 +00:00
Mazonia 39eb5d1af6 docs: update README with architecture, Telegram Command Center, and batch launchers 2026-09-21 01:57:50 +00:00
Mazonia e548b3daa2 Initial commit: XAUUSD AI Trading Bot with MT5, multi-strategy, sentiment analysis, and risk management 2026-09-21 00:57:06 +00:00