209 Commits

Author SHA1 Message Date
dienakdz 87f2845483 Refactor code for improved readability and consistency
- Cleaned up whitespace and formatting in various files including http.py, language.py, logger.py, safe_exec.py, and SQL migration scripts.
- Consolidated import statements and removed unnecessary blank lines.
- Updated logging configuration for better clarity.
- Enhanced the safe execution code with improved error handling and logging.
- Removed commented-out code and unnecessary variables in backfill_zero_trades.py and other scripts.
- Added a pyproject.toml for Ruff and Vulture configuration.
- Introduced requirements-dev.txt for development dependencies.
- Removed commented-out stock entries in init.sql for cleaner migration scripts.
2026-04-09 14:30:51 +07:00
dienakdz 103055b3df Refactor code structure for improved readability and maintainability 2026-04-08 10:00:42 +07:00
dienakdz 68b296117b Merge branch 'main' of https://github.com/brokermr810/QuantDinger 2026-04-08 09:12:41 +07:00
dienakdz c3cf230104 feat(trading-assistant): refactor strategy creation and enhance script mode functionality
- Removed conditional rendering for the assistant guide bar.
- Simplified strategy overview and strategy list item components.
- Introduced a new modal for selecting strategy mode.
- Enhanced strategy creation modal to support script strategies with a dedicated editor.
- Updated form handling for script strategies, including validation and submission logic.
- Improved user experience with better messaging and streamlined UI components.
- Updated translations for better clarity in Chinese.
2026-04-08 07:27:26 +07:00
Dinger 8563e4ea53 v3.0.1
Signed-off-by: Dinger <quantdinger@gmail.com>
2026-04-07 22:47:07 +08:00
dienakdz 2dc29a215e Translate Chinese comments and strings to English across multiple files; update user management views for consistency in language. 2026-04-07 17:31:18 +07:00
dienakdz aa09e85199 Refactor code structure for improved readability and maintainability 2026-04-07 09:12:02 +07:00
dienakdz 0818028b4c feat: add quick trade panel and strategy creation enhancements in indicator analysis 2026-04-07 07:44:43 +07:00
dienakdz cb49789bf4 feat: add RegisterResult component, ESLint config, and vue.config.js for project setup
- Created a new RegisterResult.vue component for displaying registration success.
- Added ESLint configuration for unit tests in the tests directory.
- Implemented vue.config.js for webpack configuration, including theme color support and proxy settings for development.
2026-04-07 07:25:38 +07:00
Dinger baa3182eca v3.0.1
Signed-off-by: Dinger <quantdinger@gmail.com>
2026-04-06 23:30:01 +08:00
Dinger de3fd0945b v3.0.1
Signed-off-by: Dinger <quantdinger@gmail.com>
2026-04-06 23:19:41 +08:00
dienakdz 106419c955 Import quantdinger_vue from feature-multi-user-postgresql 2026-04-06 17:04:22 +07:00
dienakdz 11e2e5aaa6 Refactor and translate comments and docstrings in utility modules to English for better clarity and maintainability. Update Gunicorn and application startup messages for consistency in language. Enhance documentation with English translations for better accessibility. 2026-04-06 16:47:36 +07:00
Dinger 3ca291a346 v3.0.1
Signed-off-by: Dinger <quantdinger@gmail.com>
2026-04-06 01:39:25 +08:00
Dinger 15c901364b v3.0.1
Signed-off-by: Dinger <quantdinger@gmail.com>
2026-03-25 18:08:45 +08:00
Dinger 05117f3f5b v3.0.1
Signed-off-by: Dinger <quantdinger@gmail.com>
2026-03-25 18:07:47 +08:00
Dinger c0cb332432 v2.2.3
Signed-off-by: Dinger <quantdinger@gmail.com>
2026-03-25 13:27:48 +08:00
Dinger 2d969d6661 chore(frontend): rebuild dist for exchange modal updates
- VERSION 3.0.4+build-20260324-2

- Includes IPv4/IPv6 whitelist display and related UI (source in local QuantDinger-Vue-src, not in repo)

Made-with: Cursor
2026-03-24 19:10:38 +08:00
Dinger 7626328c9c feat(backend): encrypt exchange credentials, remove IS_DEMO_MODE
- Fernet encrypt qd_exchange_credentials via SECRET_KEY (cryptography)

- Remove global read-only demo middleware; drop is_demo from auth payloads

- Egress whitelist: /api/credentials/egress-ip returns ipv4 + ipv6 (ipify)

- Exchange factory: demo/testnet URLs and OKX simulated-trading header

- Bitget spot connection test; misc route/service fixes

Made-with: Cursor
2026-03-24 19:10:18 +08:00
Dinger 2e9c7cd69e feat: AI analysis engine refactor, dark theme polish & virtual position management
Core changes:
- Refactor FastAnalysisService: single LLM multi-factor analysis replaces
  7-agent pipeline; add multi-timeframe consensus, threshold calibration,
  confidence calibration, multi-model ensemble voting
- Add RAG memory injection and reflection validation (analysis_memory +
  reflection worker)
- Simplify billing config: remove unused strategy_run/backtest/portfolio_monitor,
  add ai_code_gen separate billing (different token consumption scale)
- Settings hot-reload after save, no backend restart needed

Frontend:
- Global dark theme overhaul: pure black palette replacing blue-tinted colors
  across sidebar/header/dashboard/analysis/K-line/user-manage/profile/settings/billing
- Fix USDT payment modal dark theme (portal rendering broke CSS selectors)
- Refactor position modal: direction + quantity + entry price, remove add/reduce
  logic, show raw DB values on re-open, save exactly what user inputs
- Fix Polymarket prediction market dark text
- i18n for position modal title

Backend:
- Position management: one record per symbol (DELETE+INSERT replacing
  ON CONFLICT with side), fixes PnL showing 0 when switching long/short
- MarketDataCollector data fetching optimization
- portfolio_monitor scheduled monitoring improvements
- env.example reorganized: common config first, advanced config last

Documentation:
- README architecture diagram updated to FastAnalysisService flow
- Add virtual position, AI tuning config, billing items documentation
- Add INDICATOR_DEFINITIONS_CN.md, FRONTEND_FAST_ANALYSIS.md

Made-with: Cursor
2026-03-23 23:01:04 +08:00
Dinger 05f07ee544 refactor deployment config and exchange integrations
Simplify runtime configuration and remove legacy database and settings surface so new installs are easier to operate.
Refresh deployment assets, docs, and order execution behavior to keep the packaged app aligned with the current backend.

Made-with: Cursor
2026-03-21 18:32:04 +08:00
dinger 9473e50d59 feat: AI 即时分析计费/共识/校准与 Docker 前端构建
- 即时分析:先扣费、防重入(429)、失败退款;记忆库与离线校准 worker
- 多周期共识、客观分与设置项 AI_ANALYSIS_CONSENSUS_TIMEFRAMES
- Docker:前端多阶段构建(QuantDinger-Vue-src)、根目录 .dockerignore、compose 调整
- 同步 frontend/dist 静态资源

Made-with: Cursor
2026-03-20 21:08:26 +08:00
Jinyu Xu b91cfcc7fa chore(release): update social links and v2.2.3
- Update X/Discord links in docs and frontend dist
- Dashboard: report all-time total trades
- Notifications: add unread-count endpoint for badge

Made-with: Cursor
2026-03-17 20:30:04 +08:00
TIANHE cbe5d8dece docs: Update Chinese README with SECRET_KEY configuration instructions
- Add SECRET_KEY generation steps in quick start section
- Add dedicated SECRET_KEY generation section with helper scripts
- Add security warning about container not starting with default SECRET_KEY
- Sync with English README format
2026-03-12 01:18:51 +08:00
TIANHE ecc44ade59 fix: Fix max drawdown calculation and pandas fillna compatibility
- Fix max drawdown calculation in dashboard to use equity curve instead of cumulative profit
- Add pandas fillna(method=...) compatibility fix for older indicator code
- Cap drawdown percentage at 10000% to avoid display issues
2026-03-12 00:56:29 +08:00
TIANHE efae3480bf feat: Remove test connection button from strategy creation page and fix dark theme styles in profile page
- Remove test connection button and related code from strategy creation page
- Fix text colors in profile page dark theme (credits log, notification settings, exchange config, referral list)
- Update frontend build files
2026-03-12 00:37:11 +08:00
TIANHE b7451c63fb fix: Fix trading precision issues and improve error handling
- Fix quantity precision calculation for Binance, OKX, Bybit, Bitget, Deepcoin exchanges
- Improve OpenRouter API error handling with detailed error messages
- Add SECRET_KEY validation in Docker deployment entrypoint
- Fix K-line chart measurement tool click issue
- Adapt billing page text colors for dark theme
- Update frontend build files
2026-03-12 00:02:53 +08:00
TIANHE b21777e3a0 v2.2.2
Signed-off-by: TIANHE <TIANHE@GMAIL.COM>
2026-03-01 17:36:09 +08:00
TIANHE 355059491d v2.2.2
Signed-off-by: TIANHE <TIANHE@GMAIL.COM>
2026-03-01 17:32:59 +08:00
TIANHE fbc6358e13 v2.2.2 2026-03-01 17:31:48 +08:00
TIANHE 3eb1d9ff69 v2.2.2
Signed-off-by: TIANHE <TIANHE@GMAIL.COM>
2026-03-01 17:28:50 +08:00
TIANHE 2f0885e5dc v2.2.2
Signed-off-by: TIANHE <TIANHE@GMAIL.COM>
2026-03-01 17:26:16 +08:00
TIANHE db91fa4580 v2.2.2
Signed-off-by: TIANHE <TIANHE@GMAIL.COM>
2026-03-01 17:20:37 +08:00
TIANHE d60409f7f8 v2.2.2
Signed-off-by: TIANHE <TIANHE@GMAIL.COM>
2026-03-01 03:59:55 +08:00
TIANHE a6ea4d967c v2.2.2
Signed-off-by: TIANHE <TIANHE@GMAIL.COM>
2026-03-01 03:42:10 +08:00
TIANHE 7c067fe61c v2.2.1
Signed-off-by: TIANHE <TIANHE@GMAIL.COM>
2026-02-28 20:34:33 +08:00
TIANHE 3db3bb2a9a v2.2.1
Signed-off-by: TIANHE <TIANHE@GMAIL.COM>
2026-02-28 00:15:58 +08:00
TIANHE cf58ff40fa v2.2.1
Signed-off-by: TIANHE <TIANHE@GMAIL.COM>
2026-02-27 23:34:13 +08:00
TIANHE d92d4c53dc v2.2.1
Signed-off-by: TIANHE <TIANHE@GMAIL.COM>
2026-02-27 22:28:01 +08:00
TIANHE a90f336b93 fix: remove frontend source CI (moved to private repo), update README with Vibe Coding positioning 2026-02-27 20:29:59 +08:00
TIANHE b1e940ba12 V2.2.1
Signed-off-by: TIANHE <TIANHE@GMAIL.COM>
2026-02-27 20:07:06 +08:00
TIANHE abbad97bdd v2.2.1: frontend closed-source + Docker one-click deploy
- Remove frontend source code (now in private repo)
- Add pre-built frontend/dist/ with Nginx serving
- Simplify docker-compose.yml (no Node.js build needed)
- Update README with docs index and Docker deploy guide
- Add admin order list and AI analysis stats tabs
- Add quick trade API routes
- Clean up redundant files (package-lock.json, yarn.lock, .iml)
- Add GitHub Actions workflow for frontend update automation
2026-02-27 19:57:23 +08:00
TIANHE ffdd2ffbae V2.2.1: Membership & Billing, USDT TRC20 payment, VIP free indicators, AI Trading Radar, simplified strategy creation, system settings simplification, bug fixes and UI improvements 2026-02-27 01:57:04 +08:00
TIANHE ae82cc0d4e fix: Improve System Overview tab UI - user name truncation and status column style 2026-02-13 02:54:46 +08:00
TIANHE 4c73439bd6 feat: Add System Overview tab to User Management page (admin only)
- Add backend API endpoint /api/users/system-strategies for system-wide strategy data
- Query all strategies across all users with positions, PnL, trade stats
- Add summary statistics (total strategies, running count, total capital, total PnL/ROI)
- Support filtering by status (running/stopped) and search by strategy/symbol/user
- Add System Overview tab with summary cards and detailed strategy table
- Display user, strategy name, status, symbol, capital, PnL/ROI, positions, trades, indicator, exchange, timeframe, leverage
- Add i18n translations for zh-CN and en-US
- Lazy-load strategy data when tab is first accessed
2026-02-13 02:46:59 +08:00
TIANHE f0a5af595d fix: Fix indicator parameter configuration and Docker build issues
- Fix indicator parameter values being reset after modification in indicator-analysis page
- Fix Docker build nginx image pull failure (use specific version tag)
- Add Docker build scripts (PowerShell and Bash versions)
- Revert call_indicator feature (temporarily removed to avoid affecting existing indicator execution)
2026-02-13 02:33:00 +08:00
TIANHE e5bb37bcbb fix: Improve decimal precision handling across all exchange clients
- Add strict_precision parameter to _dec_str methods
- Modify quantity normalization methods to return (Decimal, precision) tuple
- Infer precision from stepSize/lotSz/qtyStep for accurate formatting
- Update all order placement methods to use precision information
- Fix LOT_SIZE filter errors by strictly limiting decimal places

Affected exchanges:
- Binance Spot & Futures
- OKX
- Bybit
- Bitget Spot & Futures
- Deepcoin

This ensures order quantities are formatted with correct precision matching exchange requirements.
2026-02-11 18:28:06 +08:00
TIANHE d875acd522 new
Signed-off-by: TIANHE <TIANHE@GMAIL.COM>
2026-02-10 15:25:21 +08:00
TIANHE a51184497d feat: Add cross-sectional strategy support
- Add cross-sectional strategy type (single vs cross-sectional)
- Support multi-symbol portfolio management with automatic ranking
- Add portfolio size, long ratio, and rebalance frequency configuration
- Implement parallel order execution for cross-sectional strategies
- Add frontend UI for strategy type selection and configuration
- Add i18n support (Chinese and English) for cross-sectional features
- Fix decimal precision issues in exchange order quantities
- Add last_rebalance_at field to database schema
- Add comprehensive documentation and examples

Database migration required: Add last_rebalance_at column to qd_strategies_trading table
2026-02-10 15:19:20 +08:00
Quantdinger a89cc9bee9 Merge pull request #32 from p369349074/main
fix bug: phone webhook check
2026-02-09 19:38:05 +08:00