AI quantitative trading platform for crypto, stocks, and forex with backtesting, live trading, market data, and multi-agent research.vibe-trading ,trading-agents,ai-trader,ai-trading
This report presents the forensic synthetic code analysis of brokermr810/QuantDinger, a Python project with 9,598 GitHub stars. SynthScan v2.0 examined 153,622 lines of code across 527 source files, recording 4297 pattern matches distributed across 20 syntactic categories. The overall adjusted score of 31.8 places this repository in the Strong AI signal band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 4297 distinct pattern matches across 20 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | docs/SCRIPT_CODE_DEVELOPMENT_GUIDE_EN.md | 104 | except Exception: | CODE |
| LOW | docs/SCRIPT_CODE_DEVELOPMENT_GUIDE_EN.md | 141 | except Exception: | CODE |
| LOW | docs/SCRIPT_CODE_DEVELOPMENT_GUIDE_EN.md | 248 | except Exception: | CODE |
| LOW | docs/SCRIPT_CODE_DEVELOPMENT_GUIDE_EN.md | 517 | except Exception: | CODE |
| MEDIUM | docs/SCRIPT_CODE_DEVELOPMENT_GUIDE_EN.md | 101 | def _run_budget(ctx): | CODE |
| MEDIUM | docs/SCRIPT_CODE_DEVELOPMENT_GUIDE_EN.md | 138 | def _side(ctx): | CODE |
| MEDIUM | docs/SCRIPT_CODE_DEVELOPMENT_GUIDE_EN.md | 514 | def _side(ctx): | CODE |
| LOW | docs/SCRIPT_CODE_DEVELOPMENT_GUIDE_CN.md | 104 | except Exception: | CODE |
| LOW | docs/SCRIPT_CODE_DEVELOPMENT_GUIDE_CN.md | 141 | except Exception: | CODE |
| LOW | docs/SCRIPT_CODE_DEVELOPMENT_GUIDE_CN.md | 248 | except Exception: | CODE |
| LOW | docs/SCRIPT_CODE_DEVELOPMENT_GUIDE_CN.md | 517 | except Exception: | CODE |
| MEDIUM | docs/SCRIPT_CODE_DEVELOPMENT_GUIDE_CN.md | 101 | def _run_budget(ctx): | CODE |
| MEDIUM | docs/SCRIPT_CODE_DEVELOPMENT_GUIDE_CN.md | 138 | def _side(ctx): | CODE |
| MEDIUM | docs/SCRIPT_CODE_DEVELOPMENT_GUIDE_CN.md | 514 | def _side(ctx): | CODE |
| LOW | scripts/check_version.py | 39 | except Exception: | CODE |
| LOW | mcp_server/src/quantdinger_mcp/server.py | 213 | except Exception: | CODE |
| LOW | mcp_server/src/quantdinger_mcp/server.py | 322 | except Exception: | CODE |
| LOW | mcp_server/src/quantdinger_mcp/server.py | 1231 | except Exception: | CODE |
| LOW | mcp_server/src/quantdinger_mcp/server.py | 1241 | except Exception: | CODE |
| LOW | mcp_server/src/quantdinger_mcp/security.py | 78 | except Exception: | CODE |
| LOW | mcp_server/src/quantdinger_mcp/security.py | 105 | except Exception: | CODE |
| LOW | backend_api_python/run.py | 14 | except Exception: | CODE |
| LOW | backend_api_python/run.py | 27 | except Exception: | CODE |
| LOW⚡ | backend_api_python/app/startup.py | 53 | except Exception as e: | CODE |
| LOW⚡ | backend_api_python/app/startup.py | 64 | except Exception as e: | CODE |
| LOW | backend_api_python/app/startup.py | 78 | except Exception as e: | CODE |
| LOW | backend_api_python/app/startup.py | 115 | except Exception as e: | CODE |
| LOW⚡ | backend_api_python/app/startup.py | 152 | except Exception as e: | CODE |
| LOW⚡ | backend_api_python/app/startup.py | 154 | except Exception as e: | CODE |
| LOW⚡ | backend_api_python/app/startup.py | 160 | except Exception as e: | CODE |
| LOW⚡ | backend_api_python/app/startup.py | 171 | except Exception: | CODE |
| LOW | backend_api_python/app/startup.py | 182 | except Exception as exc: | CODE |
| LOW | backend_api_python/app/startup.py | 203 | except Exception: | CODE |
| LOW | backend_api_python/app/startup.py | 208 | except Exception: | CODE |
| LOW | backend_api_python/app/_version.py | 66 | except Exception: | CODE |
| LOW | backend_api_python/app/__init__.py | 95 | except Exception as exc: | CODE |
| LOW | backend_api_python/app/__init__.py | 111 | except Exception as sample_exc: | CODE |
| LOW | backend_api_python/app/__init__.py | 113 | except Exception as e: | CODE |
| MEDIUM | backend_api_python/app/__init__.py | 90 | def _configure_ibkr_asyncio() -> None: | CODE |
| MEDIUM | backend_api_python/app/__init__.py | 99 | def _bootstrap_database() -> None: | CODE |
| LOW | backend_api_python/app/utils/json_helpers.py | 18 | except Exception: | CODE |
| LOW | backend_api_python/app/utils/auth.py | 75 | except Exception as e: | CODE |
| LOW | backend_api_python/app/utils/auth.py | 139 | except Exception as e: | CODE |
| LOW | backend_api_python/app/utils/db.py | 136 | except Exception as exc: | CODE |
| LOW | backend_api_python/app/utils/db.py | 161 | except Exception as exc: | CODE |
| LOW | backend_api_python/app/utils/db.py | 167 | except Exception as exc: | CODE |
| LOW | backend_api_python/app/utils/config_loader.py | 34 | except Exception as e: | CODE |
| LOW | backend_api_python/app/utils/config_loader.py | 222 | except Exception as e: | CODE |
| LOW | backend_api_python/app/utils/config_loader.py | 304 | except Exception as e: | CODE |
| LOW | backend_api_python/app/utils/request_guard.py | 37 | except Exception: | CODE |
| LOW | backend_api_python/app/utils/request_guard.py | 103 | except Exception: | CODE |
| LOW | backend_api_python/app/utils/request_guard.py | 123 | except Exception: | CODE |
| LOW | backend_api_python/app/utils/timeutil.py | 29 | except Exception: # pragma: no cover - fallback for very old runtimes | CODE |
| LOW | backend_api_python/app/utils/timeutil.py | 45 | except Exception: | CODE |
| LOW | backend_api_python/app/utils/timeutil.py | 80 | except Exception: | CODE |
| LOW | backend_api_python/app/utils/timeutil.py | 95 | except Exception: | CODE |
| LOW | backend_api_python/app/utils/safe_exec.py | 232 | except Exception as e: | CODE |
| LOW | backend_api_python/app/utils/safe_exec.py | 292 | except Exception as e: | CODE |
| LOW | backend_api_python/app/utils/safe_exec.py | 325 | except Exception as e: | CODE |
| LOW | backend_api_python/app/utils/safe_exec.py | 374 | except Exception: | CODE |
| 1864 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | mcp_server/tests/test_transport_resolution.py | 39 | def test_transport_default_is_stdio(monkeypatch, fresh_module): | CODE |
| LOW⚡ | mcp_server/tests/test_transport_resolution.py | 56 | def test_transport_aliases_resolve(monkeypatch, fresh_module, raw, expected): | CODE |
| LOW⚡ | mcp_server/tests/test_transport_resolution.py | 61 | def test_transport_unknown_exits(monkeypatch, fresh_module): | CODE |
| LOW⚡ | mcp_server/tests/test_transport_resolution.py | 67 | def test_apply_http_settings_without_error(monkeypatch, fresh_module): | CODE |
| LOW⚡ | mcp_server/tests/test_security_and_tools.py | 27 | def test_mcp_tool_registry_complete(fresh_module): | CODE |
| LOW⚡ | mcp_server/tests/test_security_and_tools.py | 34 | def test_ai_optimize_requires_confirmation(fresh_module): | CODE |
| LOW⚡ | mcp_server/tests/test_security_and_tools.py | 40 | def test_update_strategy_blocks_running_without_trade_scope(fresh_module): | CODE |
| LOW⚡ | mcp_server/tests/test_security_and_tools.py | 46 | def test_stop_strategy_requires_confirmation(fresh_module): | CODE |
| LOW⚡ | mcp_server/tests/test_security_and_tools.py | 52 | def test_place_quick_order_requires_confirmation(fresh_module): | CODE |
| LOW⚡ | mcp_server/tests/test_security_and_tools.py | 58 | def test_indicator_code_size_rejected_in_mcp(monkeypatch, fresh_module): | CODE |
| LOW | mcp_server/src/quantdinger_mcp/server.py | 691 | def get_indicator_authoring_contract() -> Any: | CODE |
| LOW | mcp_server/src/quantdinger_mcp/server.py | 1075 | def submit_experiment_pipeline(payload: dict, idempotency_key: str | None = None) -> Any: | CODE |
| LOW | mcp_server/src/quantdinger_mcp/server.py | 1213 | def _apply_http_settings_from_env() -> None: | CODE |
| LOW | mcp_server/src/quantdinger_mcp/security.py | 23 | def assert_indicator_code_size(code: str) -> None: | CODE |
| LOW | backend_api_python/app/startup.py | 38 | def _is_debug_reloader_parent() -> bool: | CODE |
| LOW⚡ | backend_api_python/app/startup.py | 57 | def start_pending_order_worker(): | CODE |
| LOW | backend_api_python/app/startup.py | 119 | def restore_running_strategies(): | CODE |
| LOW⚡ | backend_api_python/app/startup.py | 165 | def _schedule_post_restore_position_sync() -> None: | CODE |
| LOW | backend_api_python/app/utils/auth.py | 24 | def _configure_jwt_secret_warnings() -> None: | CODE |
| LOW | backend_api_python/app/utils/db.py | 98 | def _resolve_market_symbols_sql_path() -> Path: | CODE |
| LOW | backend_api_python/app/utils/local_brokers.py | 8 | def local_desktop_brokers_allowed() -> bool: | CODE |
| LOW | backend_api_python/app/utils/local_brokers.py | 14 | def desktop_broker_cloud_reject_message() -> str: | CODE |
| LOW | backend_api_python/app/utils/safe_exec.py | 128 | def _dangerous_pd_numpy_import(name: str) -> Optional[str]: | CODE |
| LOW | backend_api_python/app/utils/safe_exec.py | 298 | def safe_exec_with_validation( | CODE |
| LOW | backend_api_python/app/utils/safe_exec.py | 467 | def _string_has_forbidden_dunder(text: str) -> bool: | CODE |
| LOW | backend_api_python/app/utils/safe_exec.py | 478 | def _is_operator_accessor_call(node: Any) -> bool: | CODE |
| LOW | backend_api_python/app/utils/safe_exec.py | 504 | def _dangerous_pd_numpy_internal(root: Optional[str], attrs: list) -> Optional[str]: | CODE |
| LOW | backend_api_python/app/utils/market_visibility.py | 49 | def enabled_markets_whitelist() -> Set[str]: | CODE |
| LOW | backend_api_python/app/utils/trade_close_reason.py | 100 | def infer_legacy_close_reason( | CODE |
| LOW | backend_api_python/app/utils/trade_close_reason.py | 121 | def resolve_close_reason_for_record( | CODE |
| LOW⚡ | backend_api_python/app/utils/trade_net_pnl.py | 50 | def allocate_open_commissions_fifo(trades: List[Dict[str, Any]]) -> Dict[int, float]: | CODE |
| LOW⚡ | backend_api_python/app/utils/db_postgres.py | 207 | def _probe_pg_connection_limit(params: Dict[str, Any]) -> Optional[Dict[str, int]]: | CODE |
| LOW⚡ | backend_api_python/app/utils/db_postgres.py | 244 | def _resolve_effective_pool_limits(params: Dict[str, Any]) -> tuple[int, int]: | CODE |
| LOW | backend_api_python/app/utils/agent_auth.py | 152 | def ensure_agent_gateway_schema() -> None: | STRING |
| LOW | backend_api_python/app/utils/risk_guard.py | 26 | def trailing_exit_locks_net_profit( | CODE |
| LOW | backend_api_python/app/openapi/register.py | 53 | def register_human_blueprints(api: Api) -> None: | CODE |
| LOW | backend_api_python/app/openapi/register.py | 158 | def _normalize_operation_docs(op: dict) -> None: | CODE |
| LOW | backend_api_python/app/data_providers/heatmap.py | 106 | def _fetch_commodities_heatmap() -> List[Dict[str, Any]]: | CODE |
| LOW | …end_api_python/app/data_providers/economic_calendar.py | 169 | def get_economic_calendar_payload() -> Dict[str, Any]: | CODE |
| LOW | …end_api_python/app/data_providers/economic_calendar.py | 310 | def _fallback_calendar_payload( | CODE |
| LOW | …end_api_python/app/data_providers/economic_calendar.py | 361 | def _public_request_error_message(exc: requests.exceptions.RequestException) -> str: | CODE |
| LOW | …end_api_python/app/data_providers/economic_calendar.py | 369 | def _fetch_tradingeconomics_calendar() -> List[Dict[str, Any]]: | CODE |
| LOW | …end_api_python/app/data_providers/economic_calendar.py | 590 | def _normalize_tradingeconomics_event(row: Dict[str, Any], idx: int) -> Optional[Dict[str, Any]]: | CODE |
| LOW | …end_api_python/app/data_providers/economic_calendar.py | 743 | def _build_ai_calendar_insight(event: Dict[str, Any]) -> Dict[str, Any]: | CODE |
| LOW | …end_api_python/app/data_providers/economic_calendar.py | 1069 | def _tradingeconomics_row_has_figures(row: Dict[str, Any]) -> bool: | CODE |
| LOW | …end_api_python/app/data_providers/economic_calendar.py | 1082 | def _should_include_finnhub_row(row: Dict[str, Any], event_en: str) -> bool: | CODE |
| LOW | …end_api_python/app/data_providers/economic_calendar.py | 1094 | def _should_include_tradingeconomics_row(row: Dict[str, Any], event_en: str) -> bool: | CODE |
| LOW⚡ | backend_api_python/app/data_providers/__init__.py | 259 | def _schedule_background_refresh( | CODE |
| LOW | backend_api_python/app/data_providers/macro_series.py | 129 | def get_macro_series_provider() -> MacroSeriesProvider: | CODE |
| LOW⚡ | backend_api_python/app/data_providers/opportunities.py | 236 | def analyze_opportunities_crypto(opportunities: list): | CODE |
| LOW | backend_api_python/app/data_providers/opportunities.py | 85 | def _fetch_single_local_stock_quote(market: str, item: Dict[str, Any], *, fast: bool = False) -> Optional[Dict[str, Any] | CODE |
| LOW | backend_api_python/app/data_providers/opportunities.py | 138 | def fetch_stock_opportunity_prices() -> List[Dict[str, Any]]: | CODE |
| LOW | backend_api_python/app/data_providers/opportunities.py | 143 | def fetch_local_stock_opportunity_prices(market: str, limit: int = 15, *, fast: bool = False) -> List[Dict[str, Any]]: | CODE |
| LOW | backend_api_python/app/data_providers/opportunities.py | 283 | def analyze_opportunities_stocks(opportunities: list): | CODE |
| LOW | backend_api_python/app/data_providers/opportunities.py | 323 | def analyze_opportunities_local_stocks(opportunities: list, market: str): | CODE |
| LOW | backend_api_python/app/data_providers/opportunities.py | 384 | def analyze_opportunities_forex(opportunities: list): | CODE |
| LOW⚡ | backend_api_python/app/data_providers/crypto.py | 68 | def fetch_crypto_prices_yfinance() -> List[Dict[str, Any]]: | CODE |
| LOW | backend_api_python/app/data_providers/crypto.py | 175 | def fetch_crypto_heatmap_coingecko() -> List[Dict[str, Any]]: | CODE |
| LOW | backend_api_python/app/data_providers/crypto.py | 209 | def fetch_crypto_heatmap_coincap() -> List[Dict[str, Any]]: | CODE |
| LOW | …kend_api_python/app/data_providers/adanos_sentiment.py | 135 | def fetch_adanos_market_sentiment( | CODE |
| 1036 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | docker-compose.yml | 30 | # ======================== | COMMENT |
| MEDIUM | docker-compose.yml | 32 | # ======================== | COMMENT |
| MEDIUM | docker-compose.yml | 65 | # ======================== | COMMENT |
| MEDIUM | docker-compose.yml | 67 | # ======================== | COMMENT |
| MEDIUM | docker-compose.yml | 83 | # ======================== | COMMENT |
| MEDIUM | docker-compose.yml | 85 | # ======================== | COMMENT |
| MEDIUM | docker-compose.yml | 158 | # ======================== | COMMENT |
| MEDIUM | docker-compose.yml | 160 | # ======================== | COMMENT |
| MEDIUM | docker-compose.yml | 194 | # ======================== | COMMENT |
| MEDIUM | docker-compose.yml | 196 | # ======================== | COMMENT |
| MEDIUM | docs/NOTIFICATION_SMS_CONFIG_CH.md | 93 | # ========================= | COMMENT |
| MEDIUM | docs/NOTIFICATION_SMS_CONFIG_CH.md | 95 | # ========================= | COMMENT |
| MEDIUM | docs/NOTIFICATION_EMAIL_CONFIG_CH.md | 74 | # ========================= | COMMENT |
| MEDIUM | docs/NOTIFICATION_EMAIL_CONFIG_CH.md | 76 | # ========================= | COMMENT |
| MEDIUM⚡ | docs/NOTIFICATION_EMAIL_CONFIG_EN.md | 72 | # ========================= | COMMENT |
| MEDIUM⚡ | docs/NOTIFICATION_EMAIL_CONFIG_EN.md | 74 | # ========================= | COMMENT |
| MEDIUM⚡ | docs/NOTIFICATION_SMS_CONFIG_EN.md | 92 | # ========================= | COMMENT |
| MEDIUM⚡ | docs/NOTIFICATION_SMS_CONFIG_EN.md | 94 | # ========================= | COMMENT |
| MEDIUM⚡ | docs/examples/template_four_way_edge.py | 1 | # ============================================================ | COMMENT |
| MEDIUM⚡ | docs/examples/template_four_way_edge.py | 3 | # ------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | docs/examples/template_four_way_edge.py | 6 | # ============================================================ | COMMENT |
| MEDIUM⚡ | docs/examples/multi_indicator_composite.py | 1 | # ============================================================ | COMMENT |
| MEDIUM⚡ | docs/examples/multi_indicator_composite.py | 4 | # ============================================================ | COMMENT |
| MEDIUM⚡ | docs/examples/multi_indicator_composite.py | 11 | # ============================================================ | COMMENT |
| MEDIUM | docs/examples/cross_sectional_momentum_rsi.py | 1 | # ============================================================ | COMMENT |
| MEDIUM | docs/examples/cross_sectional_momentum_rsi.py | 5 | # ============================================================ | COMMENT |
| MEDIUM | docs/examples/cross_sectional_momentum_rsi.py | 20 | # ============================================================ | COMMENT |
| MEDIUM | docs/examples/dual_ma_with_params.py | 1 | # ============================================================ | COMMENT |
| MEDIUM | docs/examples/dual_ma_with_params.py | 4 | # ============================================================ | COMMENT |
| MEDIUM | docs/examples/dual_ma_with_params.py | 15 | # ============================================================ | COMMENT |
| MEDIUM | mcp_server/src/quantdinger_mcp/server.py | 294 | # ───────────────────────────── Read-class tools ───────────────────────────── | COMMENT |
| MEDIUM | mcp_server/src/quantdinger_mcp/server.py | 685 | # ───────────────────────────── Indicator workspace ───────────────────────────── | COMMENT |
| MEDIUM | mcp_server/src/quantdinger_mcp/server.py | 805 | # ───────────────────────────── Strategy workspace ───────────────────────────── | COMMENT |
| MEDIUM | mcp_server/src/quantdinger_mcp/server.py | 925 | # ───────────────────────────── Backtest / experiments ───────────────────────────── | COMMENT |
| MEDIUM | mcp_server/src/quantdinger_mcp/server.py | 1151 | # ───────────────────────────── Portfolio (read-only) ───────────────────────────── | COMMENT |
| MEDIUM | backend_api_python/app/utils/safe_exec.py | 24 | # ── Whitelisted builtins (strict) ────────────────────────────────────────── | COMMENT |
| MEDIUM | backend_api_python/app/utils/safe_exec.py | 186 | # ── Timeout (cross-platform) ────────────────────────────────────────────── | COMMENT |
| MEDIUM | backend_api_python/app/utils/safe_exec.py | 246 | # ── Core execution ───────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | backend_api_python/app/utils/safe_exec.py | 337 | # ── Subprocess isolation (medium-term) ───────────────────────────────────── | COMMENT |
| MEDIUM | backend_api_python/app/utils/safe_exec.py | 451 | # ── Static validation ────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | backend_api_python/app/utils/agent_jobs.py | 211 | # ──────────────────────────── progress / streaming ──────────────────────────── | COMMENT |
| MEDIUM | backend_api_python/app/utils/agent_auth.py | 163 | # ─────────────────────────── token primitives ─────────────────────────── | STRING |
| MEDIUM | backend_api_python/app/utils/agent_auth.py | 206 | # ─────────────────────────── rate limit (in-process) ─────────────────────────── | STRING |
| MEDIUM | backend_api_python/app/utils/agent_auth.py | 225 | # ─────────────────────────── verification ─────────────────────────── | STRING |
| MEDIUM | backend_api_python/app/utils/agent_auth.py | 267 | # ─────────────────────────── audit ─────────────────────────── | STRING |
| MEDIUM | backend_api_python/app/utils/agent_auth.py | 333 | # ─────────────────────────── decorator ─────────────────────────── | STRING |
| MEDIUM | backend_api_python/app/utils/agent_auth.py | 421 | # ─────────────────────────── idempotency ─────────────────────────── | STRING |
| MEDIUM | backend_api_python/app/utils/agent_auth.py | 458 | # ─────────────────────────── helpers for routes ─────────────────────────── | STRING |
| MEDIUM | backend_api_python/app/data_providers/__init__.py | 38 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | backend_api_python/app/data_providers/__init__.py | 45 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | backend_api_python/app/data_providers/__init__.py | 79 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | backend_api_python/app/data_providers/__init__.py | 81 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | backend_api_python/app/data_providers/__init__.py | 154 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | backend_api_python/app/data_providers/__init__.py | 156 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | backend_api_python/app/data_providers/opportunities.py | 232 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | backend_api_python/app/data_providers/opportunities.py | 234 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | backend_api_python/app/data_providers/opportunities.py | 18 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | backend_api_python/app/data_providers/opportunities.py | 20 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | …kend_api_python/app/data_sources/cn_hk_fundamentals.py | 491 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | …kend_api_python/app/data_sources/cn_hk_fundamentals.py | 493 | # --------------------------------------------------------------------------- | COMMENT |
| 212 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/check_mojibake.py | 9 | CODE | |
| LOW | scripts/bump_version.py | 12 | CODE | |
| LOW | scripts/check_version.py | 12 | CODE | |
| LOW | mcp_server/tests/test_transport_resolution.py | 11 | CODE | |
| LOW | mcp_server/tests/test_security_and_tools.py | 2 | CODE | |
| LOW | mcp_server/src/quantdinger_mcp/server.py | 26 | CODE | |
| LOW | mcp_server/src/quantdinger_mcp/security.py | 2 | CODE | |
| LOW | backend_api_python/app/startup.py | 2 | CODE | |
| LOW | backend_api_python/app/_version.py | 8 | CODE | |
| LOW | backend_api_python/app/__init__.py | 2 | CODE | |
| LOW | backend_api_python/app/__init__.py | 13 | CODE | |
| LOW | backend_api_python/app/__init__.py | 13 | CODE | |
| LOW | backend_api_python/app/__init__.py | 13 | CODE | |
| LOW | backend_api_python/app/__init__.py | 13 | CODE | |
| LOW | backend_api_python/app/__init__.py | 13 | CODE | |
| LOW | backend_api_python/app/__init__.py | 13 | CODE | |
| LOW | backend_api_python/app/__init__.py | 13 | CODE | |
| LOW | backend_api_python/app/config/__init__.py | 2 | CODE | |
| LOW | backend_api_python/app/config/__init__.py | 3 | CODE | |
| LOW | backend_api_python/app/config/__init__.py | 4 | CODE | |
| LOW | backend_api_python/app/config/__init__.py | 4 | CODE | |
| LOW | backend_api_python/app/config/__init__.py | 5 | CODE | |
| LOW | backend_api_python/app/config/__init__.py | 5 | CODE | |
| LOW | backend_api_python/app/config/__init__.py | 5 | CODE | |
| LOW | backend_api_python/app/config/__init__.py | 5 | CODE | |
| LOW | backend_api_python/app/config/__init__.py | 5 | CODE | |
| LOW | backend_api_python/app/config/__init__.py | 5 | CODE | |
| LOW | backend_api_python/app/config/__init__.py | 5 | CODE | |
| LOW | backend_api_python/app/utils/json_helpers.py | 3 | CODE | |
| LOW | backend_api_python/app/utils/db.py | 23 | CODE | |
| LOW | backend_api_python/app/utils/db.py | 23 | CODE | |
| LOW | backend_api_python/app/utils/local_brokers.py | 3 | CODE | |
| LOW | backend_api_python/app/utils/request_guard.py | 3 | CODE | |
| LOW | backend_api_python/app/utils/notification_display.py | 6 | CODE | |
| LOW | backend_api_python/app/utils/timeutil.py | 21 | CODE | |
| LOW | backend_api_python/app/utils/market_visibility.py | 27 | CODE | |
| LOW | backend_api_python/app/utils/technical_indicators.py | 8 | CODE | |
| LOW | backend_api_python/app/utils/technical_indicators.py | 12 | CODE | |
| LOW | backend_api_python/app/utils/__init__.py | 4 | CODE | |
| LOW | backend_api_python/app/utils/__init__.py | 5 | CODE | |
| LOW | backend_api_python/app/utils/__init__.py | 6 | CODE | |
| LOW | backend_api_python/app/utils/trade_close_reason.py | 6 | CODE | |
| LOW | backend_api_python/app/utils/trade_net_pnl.py | 10 | CODE | |
| LOW | backend_api_python/app/utils/agent_jobs.py | 20 | CODE | |
| LOW | backend_api_python/app/utils/resource_guard.py | 8 | CODE | |
| LOW | backend_api_python/app/utils/broker_session.py | 19 | CODE | |
| LOW | backend_api_python/app/utils/credential_crypto.py | 7 | CODE | |
| LOW | backend_api_python/app/utils/language.py | 8 | CODE | |
| LOW | backend_api_python/app/utils/strategy_runtime_logs.py | 3 | CODE | |
| LOW | backend_api_python/app/utils/agent_auth.py | 11 | CODE | |
| LOW | backend_api_python/app/utils/agent_auth.py | 15 | CODE | |
| LOW | backend_api_python/app/utils/risk_guard.py | 3 | CODE | |
| LOW | backend_api_python/app/utils/pnl.py | 2 | CODE | |
| LOW | backend_api_python/app/openapi/register.py | 8 | CODE | |
| LOW | backend_api_python/app/openapi/blueprint.py | 6 | CODE | |
| LOW | backend_api_python/app/openapi/__init__.py | 8 | CODE | |
| LOW | backend_api_python/app/openapi/helpers.py | 4 | CODE | |
| LOW | backend_api_python/app/openapi/helpers.py | 6 | CODE | |
| LOW | backend_api_python/app/openapi/schemas/__init__.py | 1 | CODE | |
| LOW | backend_api_python/app/openapi/schemas/__init__.py | 1 | CODE | |
| 395 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/check_mojibake.py | 74 | CODE | |
| LOW | mcp_server/src/quantdinger_mcp/security.py | 38 | CODE | |
| LOW | mcp_server/src/quantdinger_mcp/security.py | 84 | CODE | |
| LOW | backend_api_python/app/startup.py | 119 | CODE | |
| LOW | backend_api_python/app/utils/db.py | 145 | CODE | |
| LOW | backend_api_python/app/utils/config_loader.py | 229 | CODE | |
| LOW | backend_api_python/app/utils/request_guard.py | 55 | CODE | |
| LOW | backend_api_python/app/utils/timeutil.py | 50 | CODE | |
| LOW | backend_api_python/app/utils/safe_exec.py | 516 | CODE | |
| LOW | backend_api_python/app/utils/db_postgres.py | 456 | CODE | |
| LOW | backend_api_python/app/utils/agent_auth.py | 48 | CODE | |
| LOW | backend_api_python/app/openapi/register.py | 123 | CODE | |
| LOW | backend_api_python/app/openapi/register.py | 158 | CODE | |
| LOW | backend_api_python/app/data_providers/heatmap.py | 143 | CODE | |
| LOW | backend_api_python/app/data_providers/heatmap.py | 163 | CODE | |
| LOW | backend_api_python/app/data_providers/forex.py | 29 | CODE | |
| LOW | backend_api_python/app/data_providers/forex.py | 69 | CODE | |
| LOW | backend_api_python/app/data_providers/forex.py | 109 | CODE | |
| LOW | backend_api_python/app/data_providers/forex.py | 158 | CODE | |
| LOW | backend_api_python/app/data_providers/sentiment.py | 45 | CODE | |
| LOW | backend_api_python/app/data_providers/sentiment.py | 114 | CODE | |
| LOW | backend_api_python/app/data_providers/sentiment.py | 184 | CODE | |
| LOW | backend_api_python/app/data_providers/sentiment.py | 253 | CODE | |
| LOW | backend_api_python/app/data_providers/sentiment.py | 289 | CODE | |
| LOW | backend_api_python/app/data_providers/sentiment.py | 325 | CODE | |
| LOW | backend_api_python/app/data_providers/__init__.py | 306 | CODE | |
| LOW | backend_api_python/app/data_providers/opportunities.py | 85 | CODE | |
| LOW | backend_api_python/app/data_providers/opportunities.py | 143 | CODE | |
| LOW | backend_api_python/app/data_providers/opportunities.py | 236 | CODE | |
| LOW | backend_api_python/app/data_providers/opportunities.py | 283 | CODE | |
| LOW | backend_api_python/app/data_providers/opportunities.py | 323 | CODE | |
| LOW | backend_api_python/app/data_providers/opportunities.py | 384 | CODE | |
| LOW | backend_api_python/app/data_providers/crypto.py | 28 | CODE | |
| LOW | backend_api_python/app/data_providers/crypto.py | 68 | CODE | |
| LOW | backend_api_python/app/data_providers/commodities.py | 29 | CODE | |
| LOW | backend_api_python/app/data_providers/commodities.py | 67 | CODE | |
| LOW | backend_api_python/app/data_providers/commodities.py | 114 | CODE | |
| LOW | backend_api_python/app/data_providers/commodities.py | 161 | CODE | |
| LOW | backend_api_python/app/data_providers/indices.py | 30 | CODE | |
| LOW | backend_api_python/app/data_providers/news.py | 15 | CODE | |
| LOW | …kend_api_python/app/data_sources/cn_hk_fundamentals.py | 75 | CODE | |
| LOW | …kend_api_python/app/data_sources/cn_hk_fundamentals.py | 171 | CODE | |
| LOW | …kend_api_python/app/data_sources/cn_hk_fundamentals.py | 513 | CODE | |
| LOW | …kend_api_python/app/data_sources/cn_hk_fundamentals.py | 600 | CODE | |
| LOW | backend_api_python/app/data_sources/forex.py | 135 | CODE | |
| LOW | backend_api_python/app/data_sources/forex.py | 191 | CODE | |
| LOW | backend_api_python/app/data_sources/forex.py | 394 | CODE | |
| LOW | backend_api_python/app/data_sources/us_stock.py | 214 | CODE | |
| LOW | backend_api_python/app/data_sources/us_stock.py | 387 | CODE | |
| LOW | backend_api_python/app/data_sources/us_stock.py | 479 | CODE | |
| LOW | backend_api_python/app/data_sources/factory.py | 186 | CODE | |
| LOW | backend_api_python/app/data_sources/futures.py | 110 | CODE | |
| LOW | backend_api_python/app/data_sources/crypto.py | 39 | CODE | |
| LOW | backend_api_python/app/data_sources/crypto.py | 297 | CODE | |
| LOW | backend_api_python/app/data_sources/crypto.py | 329 | CODE | |
| LOW | backend_api_python/app/data_sources/crypto.py | 542 | CODE | |
| LOW | backend_api_python/app/data_sources/moex.py | 158 | CODE | |
| LOW | backend_api_python/app/data_sources/asia_stock_kline.py | 207 | CODE | |
| LOW | backend_api_python/app/data_sources/asia_stock_kline.py | 560 | CODE | |
| LOW | backend_api_python/app/data_sources/asia_stock_kline.py | 620 | CODE | |
| 258 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | backend_api_python/app/routes/quick_trade.py | 335 | # ---- market_type: leverage 1 => spot API, else perpetual (swap) ---- | COMMENT |
| MEDIUM | backend_api_python/app/routes/quick_trade.py | 446 | # ---- set leverage (futures only) ---- | COMMENT |
| MEDIUM | backend_api_python/app/routes/quick_trade.py | 482 | # 50 USDT notional at leverage=1 needs ~50 USDT collateral. Many users | COMMENT |
| MEDIUM⚡ | backend_api_python/app/routes/global_market.py | 146 | """Get comprehensive market sentiment indicators.""" | STRING |
| MEDIUM⚡ | backend_api_python/app/services/pending_order_worker.py | 1567 | # - For OKX swap, leverage must be set via private endpoint; otherwise exchange defaults apply. | COMMENT |
| MEDIUM⚡ | backend_api_python/app/services/pending_order_worker.py | 1568 | # - For other exchanges, leverage setting is not implemented yet in this local client. | COMMENT |
| MEDIUM⚡ | backend_api_python/app/services/pending_order_worker.py | 1616 | # Binance Futures leverage is per-symbol on the exchange side. | COMMENT |
| MEDIUM⚡ | backend_api_python/app/services/pending_order_worker.py | 1618 | # margin ~= notional (i.e., "margin = invested * leverage" when we sized using leverage). | COMMENT |
| MEDIUM⚡ | backend_api_python/app/services/pending_order_worker.py | 1624 | # Safer default: do NOT place orders with an unintended leverage. | COMMENT |
| MEDIUM | backend_api_python/app/services/strategy.py | 1371 | # clients can't re-introduce a divide-by-leverage branch. | COMMENT |
| MEDIUM | backend_api_python/app/services/llm.py | 813 | """Safe LLM call with robust JSON parsing and fallback structure.""" | STRING |
| MEDIUM | backend_api_python/app/services/trading_executor.py | 3485 | # TP / trailing are the underlying's % price move; leverage does not | COMMENT |
| LOW | backend_api_python/app/services/symbol_name.py | 226 | # 1) Seed (already in our DB — nothing to learn, just return). | COMMENT |
| MEDIUM⚡ | backend_api_python/app/services/portfolio_monitor.py | 357 | """Build a comprehensive text report (backward compatible).""" | STRING |
| MEDIUM | backend_api_python/app/services/backtest.py | 3207 | # Step percentages are the underlying's % price move directly (no leverage scaling). | COMMENT |
| MEDIUM | backend_api_python/app/services/live_trading/okx.py | 78 | # Best-effort cache for leverage settings to avoid spamming set-leverage on every tick. | COMMENT |
| MEDIUM⚡ | backend_api_python/app/services/live_trading/bybit.py | 857 | # Bybit leverage caps vary per symbol; keep best-effort. | COMMENT |
| MEDIUM⚡ | backend_api_python/app/services/live_trading/bitget.py | 952 | # For robust parsing: contractSize helps converting contracts->base if needed. | COMMENT |
| MEDIUM | backend_api_python/app/services/live_trading/bitget.py | 63 | # Best-effort cache for leverage settings to avoid spamming set-leverage on every tick. | COMMENT |
| MEDIUM⚡ | backend_api_python/app/services/live_trading/gate.py | 490 | # Gate expects ``leverage`` / ``cross_leverage_limit`` as **query parameters**, not JSON body | COMMENT |
| MEDIUM⚡ | backend_api_python/app/services/live_trading/gate.py | 491 | # (see gateapi-python: update_position_leverage). Cross / portfolio mode: leverage=0 + cross_leverage_limit. | COMMENT |
| MEDIUM | …d_api_python/app/services/usdt_payment/watchers/evm.py | 118 | # mainnet, and Etherscan's indexed tokentx endpoint is more robust | COMMENT |
| MEDIUM | backend_api_python/app/services/grid/engine.py | 739 | """One grid line's base quantity (amountPerGrid × leverage / price), exchange-normalized.""" | STRING |
| MEDIUM | backend_api_python/tests/test_experiment_services.py | 121 | # Distinct (atr_period, multiplier, leverage) combos must appear — verifies | COMMENT |
| MEDIUM | backend_api_python/tests/test_grid_engine.py | 84 | """100 USDT * 20% margin * 20x leverage ≈ 400 USDT notional at 72710.""" | STRING |
| MEDIUM | backend_api_python/tests/test_indicator_code_quality.py | 50 | # @strategy leverage 2 | COMMENT |
| MEDIUM⚡ | backend_api_python/tests/test_indicator_code_quality.py | 63 | cfg = StrategyConfigParser.parse("# @strategy leverage 5\n# @strategy stopLossPct 0.02\n") | STRING |
| MEDIUM⚡ | backend_api_python/tests/test_indicator_code_quality.py | 72 | # @strategy leverage 2 | COMMENT |
| MEDIUM⚡ | backend_api_python/tests/test_risk_pct_basis.py | 35 | # 92 / 100 = -8% > -9% — must NOT trigger even at 10x leverage. | COMMENT |
| MEDIUM | backend_api_python/tests/test_risk_pct_basis.py | 88 | # 16% price move required regardless of leverage. | COMMENT |
| MEDIUM | backend_api_python/scripts/simulate_trading_executor.py | 314 | # Your requested config (note: risk percentages are margin-based, executor divides by leverage). | COMMENT |
| MEDIUM⚡ | backend_api_python/scripts/simulate_trading_executor.py | 331 | # - move up enough to activate trailing (activation is divided by leverage in executor) | COMMENT |
| MEDIUM⚡ | backend_api_python/scripts/simulate_trading_executor.py | 334 | up = last_close * 1.02 # +2% (enough to activate when leverage=5) | CODE |
| MEDIUM⚡ | backend_api_python/scripts/simulate_trading_executor.py | 336 | pullback = high * (1 - 0.004) # -0.4% from high (enough to hit trailing when leverage=5) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | docs/OAUTH_CONFIG_EN.md | 17 | ### Step 1: Create a Google Cloud Project | COMMENT |
| LOW | docs/OAUTH_CONFIG_EN.md | 23 | ### Step 2: Configure OAuth Consent Screen | COMMENT |
| LOW | docs/OAUTH_CONFIG_EN.md | 35 | ### Step 3: Create OAuth 2.0 Client ID | COMMENT |
| LOW | docs/OAUTH_CONFIG_EN.md | 49 | ### Step 4: Configure .env File | COMMENT |
| LOW | docs/OAUTH_CONFIG_EN.md | 62 | ### Step 1: Create GitHub OAuth App | COMMENT |
| LOW | docs/OAUTH_CONFIG_EN.md | 75 | ### Step 2: Get Credentials | COMMENT |
| LOW | docs/OAUTH_CONFIG_EN.md | 81 | ### Step 3: Configure .env File | COMMENT |
| LOW⚡ | docs/OAUTH_CONFIG_EN.md | 96 | ### Step 1: Create Turnstile Widget | COMMENT |
| LOW⚡ | docs/OAUTH_CONFIG_EN.md | 106 | ### Step 2: Get Keys | COMMENT |
| LOW⚡ | docs/OAUTH_CONFIG_EN.md | 112 | ### Step 3: Configure .env File | COMMENT |
| LOW | docs/NOTIFICATION_EMAIL_CONFIG_EN.md | 48 | ### Step 1: Obtain SMTP Service Information | COMMENT |
| LOW⚡ | docs/NOTIFICATION_EMAIL_CONFIG_EN.md | 67 | ### Step 2: Configure Environment Variables | COMMENT |
| LOW | docs/NOTIFICATION_EMAIL_CONFIG_EN.md | 103 | ### Step 3: Enable Email Notifications in Strategy | COMMENT |
| LOW | docs/NOTIFICATION_SMS_CONFIG_EN.md | 45 | ### Step 1: Create a Twilio Account | COMMENT |
| LOW | docs/NOTIFICATION_SMS_CONFIG_EN.md | 57 | ### Step 2: Obtain API Credentials | COMMENT |
| LOW | docs/NOTIFICATION_SMS_CONFIG_EN.md | 71 | ### Step 3: Get a Phone Number | COMMENT |
| LOW⚡ | docs/NOTIFICATION_SMS_CONFIG_EN.md | 87 | ### Step 4: Configure Environment Variables | COMMENT |
| LOW | docs/NOTIFICATION_SMS_CONFIG_EN.md | 113 | ### Step 5: Enable SMS Notifications in Strategy | COMMENT |
| LOW | docs/NOTIFICATION_TELEGRAM_CONFIG_EN.md | 27 | ## Step 1: Create a Telegram Bot | COMMENT |
| LOW | docs/NOTIFICATION_TELEGRAM_CONFIG_EN.md | 38 | ## Step 2: Obtain Bot Token | COMMENT |
| LOW | docs/NOTIFICATION_TELEGRAM_CONFIG_EN.md | 50 | ## Step 3: Get Your User ID | COMMENT |
| LOW | docs/NOTIFICATION_TELEGRAM_CONFIG_EN.md | 77 | ## Step 4: Configure Environment Variables | COMMENT |
| LOW | docs/NOTIFICATION_TELEGRAM_CONFIG_EN.md | 90 | ## Step 5: Enable Telegram Notifications in Strategy | COMMENT |
| LOW⚡ | backend_api_python/app/routes/auth.py | 141 | # Step 1: Verify Turnstile (if enabled) | COMMENT |
| LOW⚡ | backend_api_python/app/routes/auth.py | 146 | # Step 2: Check rate limiting | COMMENT |
| LOW⚡ | backend_api_python/app/routes/auth.py | 153 | # Step 3: Authenticate | COMMENT |
| LOW | backend_api_python/app/routes/auth.py | 234 | # Step 4: Record successful login | COMMENT |
| LOW | …pi_python/app/services/usdt_payment/watchers/solana.py | 181 | # Step 1: resolve the watched account. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | backend_api_python/app/routes/indicator.py | 0 | insert into qd_indicator_codes (user_id, is_buy, end_time, name, code, description, publish_to_community, pricing_type, | STRING |
| HIGH | backend_api_python/app/services/builtin_indicators.py | 0 | insert into qd_indicator_codes (user_id, is_buy, end_time, name, code, description, publish_to_community, pricing_type, | STRING |
| HIGH | backend_api_python/app/services/indicator_workspace.py | 0 | insert into qd_indicator_codes (user_id, is_buy, end_time, name, code, description, publish_to_community, pricing_type, | STRING |
| HIGH | backend_api_python/app/services/trading_executor.py | 0 | insert into qd_strategy_notifications (user_id, strategy_id, symbol, signal_type, channels, title, message, payload_json | STRING |
| HIGH | backend_api_python/app/services/signal_notifier.py | 0 | insert into qd_strategy_notifications (user_id, strategy_id, symbol, signal_type, channels, title, message, payload_json | STRING |
| HIGH | backend_api_python/app/services/portfolio_monitor.py | 0 | insert into qd_strategy_notifications (user_id, strategy_id, symbol, signal_type, channels, title, message, payload_json | STRING |
| HIGH | backend_api_python/app/services/live_trading/bybit.py | 0 | convert decimal to string with controlled precision. bitget requires quantities to match sizestep/sizeplace precision. a | STRING |
| HIGH | …nd_api_python/app/services/live_trading/bitget_spot.py | 0 | convert decimal to string with controlled precision. bitget requires quantities to match sizestep/sizeplace precision. a | STRING |
| HIGH | backend_api_python/app/services/live_trading/bitget.py | 0 | convert decimal to string with controlled precision. bitget requires quantities to match sizestep/sizeplace precision. a | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | backend_api_python/run.py | 61 | def _set_if_blank(key: str, value: str) -> None: | CODE |
| LOW | backend_api_python/app/config/__init__.py | 15 | __all__ = [ | CODE |
| LOW | backend_api_python/app/utils/db.py | 204 | __all__ = [ | CODE |
| LOW | backend_api_python/app/utils/config_loader.py | 63 | def set_nested(cfg: Dict[str, Any], dotted_key: str, value: Any) -> None: | CODE |
| LOW | backend_api_python/app/utils/timeutil.py | 112 | __all__ = ["to_utc_iso"] | CODE |
| LOW | backend_api_python/app/utils/__init__.py | 8 | __all__ = ['get_logger', 'CacheManager', 'get_retry_session'] | CODE |
| LOW | backend_api_python/app/utils/agent_jobs.py | 292 | def _set_status(job_id: str, status: str, *, started_at: Optional[datetime] = None) -> None: | CODE |
| LOW | backend_api_python/app/utils/agent_jobs.py | 309 | def _set_result(job_id: str, result: Any) -> None: | CODE |
| LOW | backend_api_python/app/utils/agent_jobs.py | 324 | def _set_failure(job_id: str, error: str) -> None: | CODE |
| LOW | backend_api_python/app/utils/broker_session.py | 116 | __all__ = ['BrokerSessionRegistry'] | CODE |
| LOW | backend_api_python/app/openapi/schemas/__init__.py | 11 | __all__ = [ | CODE |
| LOW | backend_api_python/app/data_providers/news.py | 75 | __all__ = ["fetch_financial_news", "get_economic_calendar", "get_economic_calendar_payload"] | CODE |
| LOW | backend_api_python/app/data_sources/cache_manager.py | 23 | logger = logging.getLogger(__name__) | CODE |
| LOW | backend_api_python/app/data_sources/rate_limiter.py | 18 | logger = logging.getLogger(__name__) | CODE |
| LOW | backend_api_python/app/data_sources/__init__.py | 13 | __all__ = [ | CODE |
| LOW | backend_api_python/app/data_sources/__init__.py | 35 | __all__ = [ | CODE |
| LOW | backend_api_python/app/data_sources/circuit_breaker.py | 21 | logger = logging.getLogger(__name__) | CODE |
| LOW | backend_api_python/app/services/__init__.py | 15 | __all__ = [ | CODE |
| LOW⚡ | backend_api_python/app/services/trading_executor.py | 1779 | def _set_db_stopped_best_effort(reason: str) -> None: | CODE |
| LOW | backend_api_python/app/services/backtest.py | 2825 | def _set_sizing(prefix: str, idx: int, price: float, quote: float, base_qty: float) -> None: | CODE |
| LOW | backend_api_python/app/services/usdt_payment_service.py | 17 | __all__ = [ | CODE |
| LOW | …end_api_python/app/services/alpaca_trading/__init__.py | 19 | __all__ = ['AlpacaClient', 'AlpacaConfig', 'normalize_symbol', 'parse_symbol'] | CODE |
| LOW | …d_api_python/app/services/live_trading/binance_spot.py | 17 | logger = logging.getLogger(__name__) | CODE |
| LOW⚡ | backend_api_python/app/services/live_trading/okx.py | 21 | logger = logging.getLogger(__name__) | CODE |
| LOW | backend_api_python/app/services/live_trading/bybit.py | 23 | logger = logging.getLogger(__name__) | CODE |
| LOW | …nd_api_python/app/services/live_trading/bitget_spot.py | 26 | logger = logging.getLogger(__name__) | CODE |
| LOW⚡ | …nd_api_python/app/services/live_trading/spot_sizing.py | 16 | logger = logging.getLogger(__name__) | CODE |
| LOW | backend_api_python/app/services/live_trading/factory.py | 15 | logger = logging.getLogger(__name__) | CODE |
| LOW | backend_api_python/app/services/live_trading/bitget.py | 22 | logger = logging.getLogger(__name__) | CODE |
| LOW | backend_api_python/app/services/live_trading/gate.py | 27 | logger = logging.getLogger(__name__) | CODE |
| LOW | backend_api_python/app/services/live_trading/htx.py | 25 | logger = logging.getLogger(__name__) | CODE |
| LOW | backend_api_python/app/services/live_trading/base.py | 27 | logger = logging.getLogger(__name__) | CODE |
| LOW | backend_api_python/app/services/live_trading/binance.py | 20 | logger = logging.getLogger(__name__) | CODE |
| LOW⚡ | …hon/app/services/pending_orders/position_sync_cache.py | 109 | def set_exchange_sync_backoff(cache_key: str, seconds: Optional[float] = None) -> None: | CODE |
| LOW | …ckend_api_python/app/services/usdt_payment/__init__.py | 24 | __all__ = [ | CODE |
| LOW | …_python/app/services/usdt_payment/watchers/__init__.py | 27 | __all__ = ["IncomingTransfer", "WatcherResult", "get_watcher"] | CODE |
| LOW | …d_api_python/app/services/strategy_runtime/__init__.py | 8 | __all__ = [ | CODE |
| LOW | …ckend_api_python/app/services/ibkr_trading/__init__.py | 14 | __all__ = ['IBKRClient', 'IBKRConfig', 'normalize_symbol', 'parse_symbol'] | CODE |
| LOW | backend_api_python/app/services/experiment/evolution.py | 138 | def _set_nested(target: Dict[str, Any], parts: List[str], value: Any) -> None: | CODE |
| LOW | backend_api_python/app/services/experiment/__init__.py | 11 | __all__ = [ | CODE |
| LOW | backend_api_python/app/services/bot_scripts/__init__.py | 9 | __all__ = [ | CODE |
| LOW | backend_api_python/app/services/grid/__init__.py | 7 | __all__ = ["GridBotConfig", "GridEngine", "GridRestingRunner"] | CODE |
| LOW | backend_api_python/app/services/grid/engine.py | 117 | def set_runtime_params(self, params: Dict[str, Any]) -> None: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/generate-secret-key.sh | 9 | # Check if .env exists. | COMMENT |
| LOW | backend_api_python/docker-entrypoint.sh | 11 | # Check if .env file exists | COMMENT |
| LOW⚡ | backend_api_python/app/routes/auth.py | 159 | # Check if user has no password set (code-login user) | COMMENT |
| LOW | backend_api_python/app/routes/auth.py | 378 | # Check if user exists | COMMENT |
| LOW | backend_api_python/app/routes/auth.py | 383 | # Check if registration is enabled | COMMENT |
| LOW | backend_api_python/app/routes/auth.py | 674 | # Check if registration is enabled | COMMENT |
| LOW | backend_api_python/app/routes/auth.py | 723 | # Check if username already exists | COMMENT |
| LOW | backend_api_python/app/routes/auth.py | 728 | # Check if email already exists | COMMENT |
| LOW | backend_api_python/app/routes/indicator.py | 905 | # Check if any LLM provider is configured | COMMENT |
| LOW | backend_api_python/app/routes/portfolio.py | 86 | # Check if force refresh (skip cache) | COMMENT |
| LOW | backend_api_python/app/routes/portfolio.py | 316 | # Check if force refresh | COMMENT |
| LOW | backend_api_python/app/routes/portfolio.py | 728 | # Check if alert already exists for this position (unique constraint) | COMMENT |
| LOW | backend_api_python/app/services/pending_order_worker.py | 1475 | # Check if this is an IBKR client (US stocks) | COMMENT |
| LOW⚡ | backend_api_python/app/services/oauth_service.py | 681 | # Check if user has password (can't unlink last auth method) | COMMENT |
| LOW⚡ | backend_api_python/app/services/oauth_service.py | 689 | # Check if this is the only OAuth link | COMMENT |
| LOW | backend_api_python/app/services/oauth_service.py | 466 | # Check if OAuth link exists | COMMENT |
| LOW | backend_api_python/app/services/oauth_service.py | 516 | # Check if user exists with same email | COMMENT |
| LOW | backend_api_python/app/services/llm.py | 610 | # Check if we have API key for the detected provider | COMMENT |
| LOW | backend_api_python/app/services/security_service.py | 220 | # Check if still in block period | COMMENT |
| LOW⚡ | backend_api_python/app/services/email_service.py | 53 | # Check if email is properly configured | COMMENT |
| LOW | backend_api_python/app/services/email_service.py | 135 | # Check if locked due to too many failed attempts | COMMENT |
| LOW | backend_api_python/app/services/email_service.py | 171 | # Check if code matches | COMMENT |
| LOW | backend_api_python/app/services/portfolio_monitor.py | 1328 | # Check if we can trigger (not triggered yet, or repeat interval passed) | STRING |
| LOW | backend_api_python/app/services/user_service.py | 537 | # Check if user has no password (code-login user) | COMMENT |
| LOW | backend_api_python/app/services/user_service.py | 659 | # Check if username already exists | COMMENT |
| LOW | backend_api_python/app/services/backtest.py | 4256 | # Check if liquidation hit (safety net) | COMMENT |
| LOW⚡ | backend_api_python/app/services/backtest.py | 1040 | # Check if indices match | STRING |
| LOW⚡ | backend_api_python/app/services/backtest.py | 1044 | # Check if trade_direction is 'both' mode | STRING |
| LOW⚡ | backend_api_python/app/services/backtest.py | 1308 | # Check if new signal becomes effective | STRING |
| LOW | backend_api_python/app/services/backtest.py | 1132 | # Check if this signal candle has signals | STRING |
| LOW | backend_api_python/app/services/backtest.py | 1173 | # Check if signals might be in wrong format | STRING |
| LOW | backend_api_python/app/services/backtest.py | 1341 | # Check if signal can execute (based on current position) | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | README.md | 531 | ATLASCLOUD_API_KEY=your_api_key | CODE |
| HIGH | docs/README_CN.md | 494 | ATLASCLOUD_API_KEY=your_api_key | CODE |
| HIGH | backend_api_python/README.md | 70 | OPENROUTER_API_KEY=your_api_key | CODE |
| HIGH | backend_api_python/README.md | 79 | ATLASCLOUD_API_KEY=your_api_key | CODE |
| HIGH | backend_api_python/README.md | 157 | OPENROUTER_API_KEY=your_api_key | CODE |
| HIGH | backend_api_python/README.md | 164 | ATLASCLOUD_API_KEY=your_api_key | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | docker-compose.ghcr.yml | 1 | # QuantDinger Docker Compose - GHCR prebuilt images (zero-repo deploy) | COMMENT |
| LOW | docker-compose.ghcr.yml | 21 | # Database schema is bootstrapped automatically: the backend re-applies | COMMENT |
| LOW | install.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | docker-compose.build.yml | 1 | # Override file for local frontend builds. | COMMENT |
| LOW | docker-compose.yml | 1 | # QuantDinger Docker Compose - One-Click Deployment | COMMENT |
| LOW | docker-compose.yml | 161 | # Default behaviour: pull the prebuilt multi-arch image from GHCR. | COMMENT |
| LOW | docs/STRATEGY_DEV_GUIDE.md | 101 | At the top of the script, define name, description, tunable params, and strategy defaults. | COMMENT |
| LOW | docs/STRATEGY_DEV_GUIDE.md | 1221 | # exit_owner: indicator | COMMENT |
| LOW | docs/STRATEGY_DEV_GUIDE_CN.md | 101 | 脚本开头先定义名称、描述、可调参数、默认策略配置。 | COMMENT |
| LOW | docs/STRATEGY_DEV_GUIDE_CN.md | 1221 | 更好的写法(二选一,并在注释里写清楚): | COMMENT |
| LOW | docs/examples/template_four_way_edge.py | 1 | # ============================================================ | COMMENT |
| LOW | docs/examples/multi_indicator_composite.py | 1 | # ============================================================ | COMMENT |
| LOW | docs/examples/multi_indicator_composite.py | 21 | # === 参数声明 === | COMMENT |
| LOW | docs/examples/cross_sectional_momentum_rsi.py | 1 | # ============================================================ | COMMENT |
| LOW | docs/examples/cross_sectional_momentum_rsi.py | 61 | COMMENT | |
| LOW | docs/examples/dual_ma_with_params.py | 1 | # ============================================================ | COMMENT |
| LOW | docs/examples/dual_ma_with_params.py | 21 | # signal_form: four_way | COMMENT |
| LOW | .github/workflows/docker-publish.yml | 1 | name: Publish backend image to GHCR | COMMENT |
| LOW | backend_api_python/requirements.txt | 41 | # tavily-python>=0.3.0 | COMMENT |
| LOW | backend_api_python/app/services/builtin_indicators.py | 41 | # signal_form: four_way exit_owner: engine flip_mode: R2 | COMMENT |
| LOW | backend_api_python/app/services/builtin_indicators.py | 61 | "Classic SuperTrend: ATR-channel direction flip. Open on trend flip, " | COMMENT |
| LOW | …_api_python/app/services/indicator_default_template.py | 21 | safe_desc = (description or "").replace("\\", "\\\\").replace('"', '\\"') | COMMENT |
| LOW | backend_api_python/app/services/oauth_service.py | 161 | # FRONTEND_URL accepts a comma-separated list of origins (the same | COMMENT |
| LOW | backend_api_python/app/services/strategy.py | 1001 | # When credential_id is present, strip raw API keys to avoid | COMMENT |
| LOW | backend_api_python/app/services/trading_executor.py | 2281 | # ============================================ | COMMENT |
| LOW | backend_api_python/app/services/trading_executor.py | 5341 | COMMENT | |
| LOW | …d_api_python/app/services/usdt_payment/watchers/evm.py | 81 | "https://bsc-dataseed4.binance.org", | COMMENT |
| LOW | …d_api_python/app/services/usdt_payment/watchers/evm.py | 101 | # eth_getLogs; we cap at 4800 to stay safely under that. At 0.75s/block | COMMENT |
| LOW | …pi_python/app/services/usdt_payment/watchers/solana.py | 181 | # Step 1: resolve the watched account. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | backend_api_python/app/services/backtest.py | 2693 | if not buy_series.index.equals(df.index): | CODE |
| HIGH | backend_api_python/app/services/backtest.py | 2696 | if not sell_series.index.equals(df.index): | CODE |
| HIGH⚡ | backend_api_python/app/services/backtest.py | 1041 | if not sig_index.equals(df_index): | STRING |
| HIGH | backend_api_python/app/services/backtest.py | 1056 | if not buy_series.index.equals(df_signal.index): | STRING |
| HIGH | backend_api_python/app/services/backtest.py | 1059 | if not sell_series.index.equals(df_signal.index): | STRING |
| HIGH | backend_api_python/app/services/backtest.py | 1120 | if not norm_signals[sig_type].index.equals(df_signal.index): | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH⚡ | backend_api_python/app/services/ai_calibration.py | 148 | # Approx correctness rules (as requested) | COMMENT |
| HIGH | backend_api_python/app/services/ai_report_pdf.py | 103 | "This report is generated by AI for research only and is not investment advice." | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | mcp_server/src/quantdinger_mcp/server.py | 493 | CODE | |
| LOW | mcp_server/src/quantdinger_mcp/server.py | 931 | CODE | |
| LOW | backend_api_python/app/routes/global_market.py | 174 | CODE | |
| LOW | backend_api_python/app/services/trading_executor.py | 4319 | CODE | |
| LOW | backend_api_python/app/services/trading_executor.py | 5084 | CODE | |
| LOW | backend_api_python/app/services/community_service.py | 72 | CODE | |
| LOW | backend_api_python/app/services/backtest.py | 368 | CODE | |
| LOW | backend_api_python/app/services/backtest.py | 479 | CODE | |
| LOW | backend_api_python/app/services/backtest.py | 609 | CODE | |
| LOW | backend_api_python/app/services/backtest.py | 2025 | CODE | |
| LOW | backend_api_python/app/services/backtest.py | 2172 | CODE | |
| LOW | backend_api_python/app/services/backtest.py | 4570 | CODE | |
| LOW | …d_api_python/app/services/live_trading/binance_spot.py | 652 | CODE | |
| LOW | backend_api_python/app/services/live_trading/htx_v5.py | 370 | CODE | |
| LOW | backend_api_python/app/services/live_trading/records.py | 361 | CODE | |
| LOW | backend_api_python/app/services/live_trading/binance.py | 442 | CODE | |
| LOW | …api_python/app/services/pending_orders/fill_records.py | 20 | CODE | |
| LOW | …_python/app/services/strategy_runtime/order_intents.py | 79 | CODE | |
| LOW | …end_api_python/app/services/strategy_runtime/basket.py | 109 | CODE | |
| LOW | …d_api_python/app/services/strategy_runtime/identity.py | 76 | CODE | |
| LOW | backend_api_python/app/services/experiment/runner.py | 295 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | docker-compose.ghcr.yml | 18 | # - .env (optional) - docker compose orchestration knobs (IMAGE_TAG, ports, mirrors); | COMMENT |
| MEDIUM | docs/ARCHITECTURE.md | 52 | ai/ # skills, prompts, provider orchestration | CODE |
| MEDIUM | docs/SCRIPT_CODE_DEVELOPMENT_GUIDE_EN.md | 311 | # 8. Main orchestration only | COMMENT |
| MEDIUM | backend_api_python/README.md | 35 | ## Architecture and quality guardrails | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | backend_api_python/app/routes/auth.py | 141 | # Step 1: Verify Turnstile (if enabled) | COMMENT |
| LOW⚡ | backend_api_python/app/routes/auth.py | 146 | # Step 2: Check rate limiting | COMMENT |
| LOW⚡ | backend_api_python/app/routes/auth.py | 153 | # Step 3: Authenticate | COMMENT |
| LOW | backend_api_python/app/routes/auth.py | 234 | # Step 4: Record successful login | COMMENT |
| LOW | …pi_python/app/services/usdt_payment/watchers/solana.py | 181 | # Step 1: resolve the watched account. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | backend_api_python/app/routes/settings.py | 293 | 'default': 'admin@example.com', | CODE |
| LOW | backend_api_python/app/routes/settings.py | 1783 | if requested_admin_email and requested_admin_email != 'admin@example.com': | CODE |
| LOW | backend_api_python/app/services/security_service.py | 25 | 'placeholder', | CODE |
| LOW | backend_api_python/app/services/user_service.py | 277 | if email == 'admin@example.com': | CODE |
| LOW | backend_api_python/app/services/user_service.py | 278 | return {'synced': False, 'reason': 'placeholder'} | CODE |
| LOW | backend_api_python/app/services/user_service.py | 308 | if current_email and current_email != 'admin@example.com' and not overwrite_existing: | CODE |
| LOW | backend_api_python/app/services/user_service.py | 1018 | admin_email = os.getenv('ADMIN_EMAIL', 'admin@example.com') | CODE |
| LOW | backend_api_python/tests/test_db_log_noise_fixes.py | 78 | result = service.start_setup(9383, "user@example.com") | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | install.sh | 5 | # Usage: | COMMENT |
| LOW | docker-compose.build.yml | 2 | # Usage: | COMMENT |
| LOW | docker-compose.yml | 2 | # Usage: | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | backend_api_python/app/data_sources/factory.py | 135 | CODE | |
| MEDIUM | backend_api_python/app/data_sources/factory.py | 140 | CODE |