Open-source AI Trading OS, agent trading, and vibe trading, with Jev System One integration. Research, build Python strategies, backtest, and paper/live trade across crypto, stocks, and forex. Launch your own multi-tenant trading SaaS with built-in user management, billing, payments, and settlement.
This report summarizes scanner evidence for OpenByteInc/QuantDinger, a Python project with 12,666 GitHub stars. SynthScan examined 265,023 lines of code across 998 source files, recording 7112 pattern matches distributed across 20 syntactic categories. The legacy adjusted pattern signal is 32.0 (High pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 3786 finding(s).
Are imports declared and package/API names verified? 773 finding(s).
Are wrappers, guards, and repeated structures necessary? 5858 finding(s).
Which changes need focused human review? 7112 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 7112 distinct pattern matches across 20 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. 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 configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| 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_transport_resolution.py | 78 | def test_non_loopback_http_requires_auth(monkeypatch, fresh_module): | CODE |
| LOW⚡ | mcp_server/tests/test_transport_resolution.py | 86 | def test_non_loopback_http_accepts_distinct_strong_auth(monkeypatch, fresh_module): | CODE |
| LOW⚡ | mcp_server/tests/test_transport_resolution.py | 94 | def test_non_loopback_authenticated_http_requires_https(monkeypatch, fresh_module): | CODE |
| LOW⚡ | mcp_server/tests/test_transport_resolution.py | 104 | def test_invalid_numeric_env_uses_default(monkeypatch, fresh_module): | CODE |
| LOW⚡ | mcp_server/tests/test_security_and_tools.py | 32 | def test_mcp_tool_registry_complete(fresh_module): | CODE |
| LOW⚡ | mcp_server/tests/test_security_and_tools.py | 39 | def test_gateway_tools_do_not_advertise_an_inferred_result_wrapper(fresh_module): | CODE |
| LOW⚡ | mcp_server/tests/test_security_and_tools.py | 46 | def test_success_payload_is_preserved_without_a_result_wrapper(monkeypatch, fresh_module, body): | CODE |
| LOW⚡ | mcp_server/tests/test_security_and_tools.py | 53 | def test_health_failures_set_protocol_error(fresh_module, monkeypatch, failure): | CODE |
| LOW⚡ | mcp_server/tests/test_security_and_tools.py | 135 | def test_protocol_guard_denial_and_error_redaction(monkeypatch, fresh_module): | CODE |
| LOW⚡ | mcp_server/tests/test_security_and_tools.py | 145 | def test_successful_empty_snapshot_is_not_an_error(monkeypatch, fresh_module): | CODE |
| LOW⚡ | mcp_server/tests/test_security_and_tools.py | 153 | def test_strategy_authoring_contract_uses_agent_gateway(monkeypatch, fresh_module): | CODE |
| LOW⚡ | mcp_server/tests/test_security_and_tools.py | 165 | def test_package_version_matches_pyproject(): | CODE |
| LOW⚡ | mcp_server/tests/test_security_and_tools.py | 175 | def test_protocol_server_version_matches_package(fresh_module): | CODE |
| LOW⚡ | mcp_server/tests/test_security_and_tools.py | 181 | def test_create_strategy_uses_canonical_deployment_payload(monkeypatch, fresh_module): | CODE |
| LOW⚡ | mcp_server/tests/test_security_and_tools.py | 246 | def test_stop_strategy_requires_confirmation(fresh_module): | CODE |
| LOW⚡ | mcp_server/tests/test_security_and_tools.py | 252 | def test_place_quick_order_requires_confirmation(fresh_module): | CODE |
| LOW⚡ | mcp_server/tests/test_security_and_tools.py | 258 | def test_indicator_code_size_rejected_in_mcp(monkeypatch, fresh_module): | CODE |
| LOW | mcp_server/tests/test_security_and_tools.py | 74 | def test_health_success_stays_success(fresh_module, monkeypatch): | CODE |
| LOW | mcp_server/tests/test_security_and_tools.py | 85 | def test_mcp_tools_are_actually_registered(fresh_module): | CODE |
| LOW | mcp_server/tests/test_security_and_tools.py | 90 | def test_every_tool_has_explicit_risk_annotations(fresh_module): | CODE |
| LOW | mcp_server/tests/test_security_and_tools.py | 111 | def test_protocol_marks_gateway_and_business_failures(monkeypatch, fresh_module, status, body): | CODE |
| LOW | mcp_server/tests/test_security_and_tools.py | 124 | def test_protocol_marks_transport_failures(monkeypatch, fresh_module, exception_type): | CODE |
| LOW | mcp_server/tests/test_security_and_tools.py | 220 | def test_quick_order_forwards_native_protection(monkeypatch, fresh_module): | CODE |
| LOW | mcp_server/tests/test_security_and_tools.py | 294 | def test_strategy_source_workspace_payloads(monkeypatch, fresh_module): | CODE |
| LOW | mcp_server/tests/test_security_and_tools.py | 337 | def test_source_restore_and_paper_cancel_require_confirmation(fresh_module): | CODE |
| LOW | mcp_server/tests/test_security_and_tools.py | 357 | def test_redaction_handles_camel_case_and_deep_values(): | CODE |
| LOW | mcp_server/src/quantdinger_mcp/server.py | 558 | def get_indicator_authoring_contract() -> Any: | CODE |
| LOW | mcp_server/src/quantdinger_mcp/server.py | 679 | def get_strategy_authoring_contract() -> Any: | CODE |
| LOW | mcp_server/src/quantdinger_mcp/server.py | 754 | def list_strategy_source_versions(source_id: int) -> Any: | CODE |
| LOW | mcp_server/src/quantdinger_mcp/server.py | 760 | def restore_strategy_source_version( | CODE |
| LOW | mcp_server/src/quantdinger_mcp/server.py | 992 | def list_strategy_pending_orders(strategy_id: int, limit: int = 50, cursor: int = 0) -> Any: | CODE |
| LOW⚡ | mcp_server/src/quantdinger_mcp/server.py | 1103 | def _apply_http_settings_from_env() -> None: | CODE |
| LOW⚡ | mcp_server/src/quantdinger_mcp/server.py | 1124 | def _validate_network_security(transport: str) -> None: | CODE |
| LOW | mcp_server/src/quantdinger_mcp/security.py | 31 | def assert_indicator_code_size(code: str) -> None: | CODE |
| LOW⚡ | backend_api_python/app/startup.py | 74 | def start_pending_order_worker(): | CODE |
| LOW⚡ | backend_api_python/app/startup.py | 99 | def start_execution_stream_supervisor(): | CODE |
| LOW⚡ | backend_api_python/app/startup.py | 190 | def _schedule_post_restore_position_sync() -> None: | CODE |
| LOW⚡ | backend_api_python/app/startup.py | 261 | def _start_scheduler_services(*, include_celery_managed: bool = False) -> None: | CODE |
| LOW | backend_api_python/app/startup.py | 46 | def get_execution_stream_supervisor(): | CODE |
| LOW | backend_api_python/app/startup.py | 55 | def _is_debug_reloader_parent() -> bool: | CODE |
| LOW | backend_api_python/app/startup.py | 144 | def restore_running_strategies(): | CODE |
| LOW | backend_api_python/app/startup.py | 239 | def _start_trading_support_services(*, lease_guard=None) -> None: | CODE |
| LOW | backend_api_python/app/startup.py | 250 | def stop_trading_support_services() -> None: | CODE |
| LOW | backend_api_python/app/config/redis_urls.py | 38 | def celery_result_backend_url() -> str: | CODE |
| LOW | backend_api_python/app/runtime/roles.py | 29 | def strategy_commands_enabled() -> bool: | CODE |
| LOW | backend_api_python/app/utils/auth.py | 23 | def _configure_jwt_secret_warnings() -> None: | CODE |
| LOW | backend_api_python/app/utils/db.py | 107 | def _resolve_market_symbols_sql_path() -> Path: | CODE |
| LOW | backend_api_python/app/utils/db.py | 111 | def _resolve_strategy_templates_sql_path() -> Path: | CODE |
| LOW | backend_api_python/app/utils/db.py | 124 | def _migration_timeout_seconds(name: str, default: int) -> int: | STRING |
| LOW | backend_api_python/app/utils/db.py | 181 | def _apply_migration_component( | STRING |
| 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/local_brokers.py | 22 | def require_local_desktop_brokers_allowed() -> None: | CODE |
| LOW | backend_api_python/app/utils/trade_execution.py | 7 | def enrich_execution_reference(row): | CODE |
| LOW | backend_api_python/app/utils/safe_exec.py | 190 | def _dangerous_pd_numpy_import(name: str) -> Optional[str]: | CODE |
| LOW | backend_api_python/app/utils/safe_exec.py | 394 | def _assign_windows_process_memory_job(proc: Any, max_memory_mb: int) -> Any: | CODE |
| 3222 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/check_version.py | 39 | except Exception: | CODE |
| LOW | mcp_server/src/quantdinger_mcp/server.py | 226 | except Exception: | CODE |
| LOW⚡ | mcp_server/src/quantdinger_mcp/server.py | 1112 | except Exception: | CODE |
| LOW⚡ | mcp_server/src/quantdinger_mcp/server.py | 1117 | except Exception: | CODE |
| LOW | mcp_server/src/quantdinger_mcp/security.py | 84 | except Exception: | CODE |
| LOW | mcp_server/src/quantdinger_mcp/security.py | 109 | except Exception: | CODE |
| LOW | backend_api_python/run.py | 14 | except Exception: | CODE |
| LOW | backend_api_python/run.py | 28 | except Exception: | CODE |
| LOW | backend_api_python/env_sync_core.py | 88 | except Exception: | CODE |
| LOW⚡ | backend_api_python/app/startup.py | 70 | except Exception as e: | CODE |
| LOW⚡ | backend_api_python/app/startup.py | 81 | except Exception as e: | CODE |
| LOW⚡ | backend_api_python/app/startup.py | 95 | except Exception as e: | CODE |
| LOW⚡ | backend_api_python/app/startup.py | 103 | except Exception as e: | CODE |
| LOW⚡ | backend_api_python/app/startup.py | 177 | except Exception as e: | CODE |
| LOW⚡ | backend_api_python/app/startup.py | 179 | except Exception as e: | CODE |
| LOW⚡ | backend_api_python/app/startup.py | 185 | except Exception as e: | CODE |
| LOW⚡ | backend_api_python/app/startup.py | 196 | except Exception: | CODE |
| LOW⚡ | backend_api_python/app/startup.py | 269 | except Exception: | CODE |
| LOW⚡ | backend_api_python/app/startup.py | 276 | except Exception: | CODE |
| LOW⚡ | backend_api_python/app/startup.py | 285 | except Exception: | CODE |
| LOW⚡ | backend_api_python/app/startup.py | 291 | except Exception: | CODE |
| LOW | backend_api_python/app/startup.py | 140 | except Exception as e: | CODE |
| LOW | backend_api_python/app/startup.py | 207 | except Exception as exc: | CODE |
| LOW | backend_api_python/app/_version.py | 66 | except Exception: | CODE |
| LOW | backend_api_python/app/__init__.py | 21 | except Exception: | CODE |
| LOW | backend_api_python/app/__init__.py | 105 | except Exception as exc: | CODE |
| LOW | backend_api_python/app/__init__.py | 126 | except Exception as sample_exc: | CODE |
| LOW | backend_api_python/app/__init__.py | 128 | except Exception as e: | CODE |
| MEDIUM | backend_api_python/app/__init__.py | 100 | def _configure_ibkr_asyncio() -> None: | CODE |
| MEDIUM | backend_api_python/app/__init__.py | 109 | def _bootstrap_database() -> None: | CODE |
| LOW | backend_api_python/app/tasks/agent_jobs.py | 76 | except Exception as exc: | CODE |
| LOW | backend_api_python/app/utils/json_helpers.py | 18 | except Exception: | CODE |
| LOW | backend_api_python/app/utils/auth.py | 84 | except Exception as e: | CODE |
| LOW | backend_api_python/app/utils/auth.py | 193 | except Exception as e: | CODE |
| LOW | backend_api_python/app/utils/db.py | 235 | except Exception: | STRING |
| LOW | backend_api_python/app/utils/db.py | 238 | except Exception: | STRING |
| LOW | backend_api_python/app/utils/db.py | 344 | except Exception as exc: | STRING |
| LOW | backend_api_python/app/utils/db.py | 371 | except Exception as exc: | STRING |
| LOW | backend_api_python/app/utils/db.py | 377 | except Exception as exc: | STRING |
| LOW | backend_api_python/app/utils/config_loader.py | 34 | except Exception as e: | CODE |
| LOW | backend_api_python/app/utils/config_loader.py | 229 | except Exception as e: | CODE |
| LOW | backend_api_python/app/utils/config_loader.py | 311 | 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 | 107 | except Exception: | CODE |
| LOW | backend_api_python/app/utils/request_guard.py | 129 | 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 | 387 | except Exception as exc: | CODE |
| LOW | backend_api_python/app/utils/safe_exec.py | 569 | except Exception as e: | CODE |
| LOW | backend_api_python/app/utils/safe_exec.py | 622 | except Exception as e: | CODE |
| LOW | backend_api_python/app/utils/safe_exec.py | 1150 | except Exception as e: | CODE |
| LOW | backend_api_python/app/utils/cache.py | 90 | except Exception as e: | CODE |
| LOW⚡ | backend_api_python/app/utils/cache.py | 103 | except Exception as e: | CODE |
| LOW⚡ | backend_api_python/app/utils/cache.py | 111 | except Exception as e: | CODE |
| LOW⚡ | backend_api_python/app/utils/cache.py | 118 | except Exception as e: | CODE |
| LOW | backend_api_python/app/utils/trade_close_reason.py | 199 | except Exception: | CODE |
| LOW⚡ | backend_api_python/app/utils/trade_net_pnl.py | 39 | except Exception: | CODE |
| LOW⚡ | backend_api_python/app/utils/trade_net_pnl.py | 45 | except Exception: | CODE |
| 1918 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | mcp_server/src/quantdinger_mcp/server.py | 1112 | except Exception: | CODE |
| HIGH | backend_api_python/run.py | 14 | except Exception: | CODE |
| HIGH | backend_api_python/run.py | 28 | except Exception: | CODE |
| HIGH | backend_api_python/env_sync_core.py | 91 | except FileNotFoundError: | CODE |
| HIGH | backend_api_python/app/__init__.py | 21 | except Exception: | CODE |
| HIGH | backend_api_python/app/utils/db.py | 238 | except Exception: | CODE |
| HIGH | backend_api_python/app/utils/request_guard.py | 107 | except Exception: | CODE |
| HIGH | backend_api_python/app/utils/timeutil.py | 45 | except Exception: | CODE |
| HIGH | backend_api_python/app/utils/safe_exec.py | 484 | except ValueError: | CODE |
| HIGH | backend_api_python/app/utils/trade_net_pnl.py | 178 | except Exception: | CODE |
| HIGH | backend_api_python/app/utils/trade_net_pnl.py | 197 | except Exception: | CODE |
| HIGH | backend_api_python/app/utils/db_postgres.py | 212 | except Exception: | CODE |
| HIGH | backend_api_python/app/utils/db_postgres.py | 206 | except Exception: | CODE |
| HIGH | backend_api_python/app/utils/db_postgres.py | 249 | except Exception: | CODE |
| HIGH | backend_api_python/app/utils/db_postgres.py | 421 | except Exception: | CODE |
| HIGH | backend_api_python/app/utils/db_postgres.py | 777 | except Exception: | CODE |
| HIGH | backend_api_python/app/utils/db_postgres.py | 541 | except Exception: | CODE |
| HIGH | backend_api_python/app/utils/db_postgres.py | 762 | except Exception: | CODE |
| HIGH | backend_api_python/app/utils/db_postgres.py | 546 | except Exception: | CODE |
| HIGH | backend_api_python/app/utils/db_postgres.py | 563 | except Exception: | CODE |
| HIGH | backend_api_python/app/utils/agent_auth.py | 302 | except RuntimeError: | CODE |
| HIGH | backend_api_python/app/utils/safe_exec_worker.py | 155 | except Exception: | CODE |
| HIGH | backend_api_python/app/professional_report/snapshot.py | 31 | except (OverflowError, OSError, ValueError): | CODE |
| HIGH | backend_api_python/app/professional_report/snapshot.py | 48 | except ValueError: | CODE |
| HIGH | backend_api_python/app/data_providers/heatmap.py | 180 | except Exception: | CODE |
| HIGH | backend_api_python/app/data_providers/hk_research.py | 48 | except Exception: | CODE |
| HIGH | backend_api_python/app/data_providers/hk_research.py | 53 | except Exception: | CODE |
| HIGH | backend_api_python/app/data_providers/hk_research.py | 58 | except Exception: | CODE |
| HIGH | backend_api_python/app/data_providers/hk_research.py | 89 | except Exception: | CODE |
| HIGH | backend_api_python/app/data_providers/__init__.py | 326 | except Exception: | CODE |
| HIGH | backend_api_python/app/data_providers/us_research.py | 274 | except Exception: | CODE |
| HIGH | backend_api_python/app/data_providers/commodities.py | 92 | except Exception: | CODE |
| HIGH | backend_api_python/app/data_providers/news.py | 43 | except Exception: | CODE |
| HIGH | backend_api_python/app/data_providers/news.py | 56 | except Exception: | CODE |
| HIGH | …kend_api_python/app/data_sources/cn_hk_fundamentals.py | 687 | except ImportError: | CODE |
| HIGH | backend_api_python/app/data_sources/forex.py | 76 | except Exception: | CODE |
| HIGH | backend_api_python/app/data_sources/forex.py | 266 | except Exception: | CODE |
| HIGH | backend_api_python/app/data_sources/futures.py | 44 | except Exception: | CODE |
| HIGH | backend_api_python/app/data_sources/crypto.py | 684 | except Exception: | CODE |
| HIGH | backend_api_python/app/data_sources/tencent.py | 92 | except Exception: | CODE |
| HIGH | backend_api_python/app/data_sources/asia_stock_kline.py | 136 | except Exception: | CODE |
| HIGH | backend_api_python/app/routes/auth.py | 782 | except (ValueError, TypeError): | CODE |
| HIGH | backend_api_python/app/routes/auth.py | 447 | except (ValueError, TypeError): | CODE |
| HIGH | backend_api_python/app/routes/user.py | 1035 | except Exception: | CODE |
| HIGH | backend_api_python/app/routes/user.py | 1395 | except (TypeError, ValueError): | CODE |
| HIGH | backend_api_python/app/routes/quick_trade.py | 754 | except Exception: | CODE |
| HIGH | backend_api_python/app/routes/quick_trade.py | 156 | except Exception: | CODE |
| HIGH | backend_api_python/app/routes/quick_trade.py | 206 | except Exception: | CODE |
| HIGH | backend_api_python/app/routes/ai_chat.py | 824 | except Exception: | CODE |
| HIGH | backend_api_python/app/routes/ai_chat.py | 889 | except (TypeError, ValueError, OSError, OverflowError): | CODE |
| HIGH | backend_api_python/app/routes/ai_chat.py | 1852 | except Exception: | CODE |
| HIGH | backend_api_python/app/routes/ai_chat.py | 3323 | except Exception: | CODE |
| HIGH | backend_api_python/app/routes/ai_chat.py | 3329 | except Exception: | CODE |
| HIGH | backend_api_python/app/routes/strategy_notifications.py | 96 | except Exception: | CODE |
| HIGH | backend_api_python/app/routes/dashboard.py | 497 | except Exception: | CODE |
| HIGH | backend_api_python/app/routes/dashboard.py | 596 | except Exception: | CODE |
| HIGH | backend_api_python/app/routes/dashboard.py | 742 | except Exception: | CODE |
| HIGH | backend_api_python/app/routes/fast_analysis.py | 302 | except Exception: | CODE |
| HIGH | backend_api_python/app/routes/fast_analysis.py | 285 | except Exception: | CODE |
| HIGH | backend_api_python/app/routes/fast_analysis.py | 290 | except Exception: | CODE |
| 183 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | docker-compose.yml | 93 | # ======================== | COMMENT |
| MEDIUM | docker-compose.yml | 95 | # ======================== | COMMENT |
| MEDIUM | docker-compose.yml | 127 | # ======================== | COMMENT |
| MEDIUM | docker-compose.yml | 129 | # ======================== | COMMENT |
| MEDIUM | docker-compose.yml | 257 | # ======================== | COMMENT |
| MEDIUM | docker-compose.yml | 259 | # ======================== | COMMENT |
| MEDIUM | docker-compose.yml | 610 | # ======================== | COMMENT |
| MEDIUM | docker-compose.yml | 612 | # ======================== | COMMENT |
| MEDIUM | docker-compose.yml | 646 | # ======================== | COMMENT |
| MEDIUM | docker-compose.yml | 648 | # ======================== | COMMENT |
| MEDIUM | docs/deployment/NOTIFICATION_SMS_CONFIG_CN.md | 93 | # ========================= | COMMENT |
| MEDIUM | docs/deployment/NOTIFICATION_SMS_CONFIG_CN.md | 95 | # ========================= | COMMENT |
| MEDIUM⚡ | docs/deployment/NOTIFICATION_EMAIL_CONFIG_EN.md | 72 | # ========================= | COMMENT |
| MEDIUM⚡ | docs/deployment/NOTIFICATION_EMAIL_CONFIG_EN.md | 74 | # ========================= | COMMENT |
| MEDIUM⚡ | docs/deployment/NOTIFICATION_SMS_CONFIG_EN.md | 92 | # ========================= | COMMENT |
| MEDIUM⚡ | docs/deployment/NOTIFICATION_SMS_CONFIG_EN.md | 94 | # ========================= | COMMENT |
| MEDIUM | docs/deployment/NOTIFICATION_EMAIL_CONFIG_CN.md | 74 | # ========================= | COMMENT |
| MEDIUM | docs/deployment/NOTIFICATION_EMAIL_CONFIG_CN.md | 76 | # ========================= | COMMENT |
| MEDIUM | backend_api_python/app/utils/agent_jobs.py | 283 | # ──────────────────────────── progress / streaming ──────────────────────────── | COMMENT |
| MEDIUM | backend_api_python/app/utils/agent_auth.py | 350 | # ─────────────────────────── verification ─────────────────────────── | COMMENT |
| MEDIUM | backend_api_python/app/utils/agent_auth.py | 393 | # ─────────────────────────── audit ─────────────────────────── | COMMENT |
| MEDIUM | backend_api_python/app/utils/agent_auth.py | 483 | # ─────────────────────────── decorator ─────────────────────────── | COMMENT |
| MEDIUM | backend_api_python/app/utils/agent_auth.py | 739 | # ─────────────────────────── idempotency ─────────────────────────── | COMMENT |
| MEDIUM | backend_api_python/app/utils/agent_auth.py | 776 | # ─────────────────────────── helpers for routes ─────────────────────────── | COMMENT |
| MEDIUM | backend_api_python/app/utils/agent_auth.py | 202 | # ─────────────────────────── token primitives ─────────────────────────── | STRING |
| MEDIUM | backend_api_python/app/utils/agent_auth.py | 245 | # ─────────────────────────── distributed rate limit ─────────────────────────── | 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 | 520 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | …kend_api_python/app/data_sources/cn_hk_fundamentals.py | 522 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …kend_api_python/app/data_sources/cn_hk_fundamentals.py | 99 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …kend_api_python/app/data_sources/cn_hk_fundamentals.py | 101 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …kend_api_python/app/data_sources/cn_hk_fundamentals.py | 373 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | …kend_api_python/app/data_sources/cn_hk_fundamentals.py | 375 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | backend_api_python/app/data_sources/forex.py | 39 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | backend_api_python/app/data_sources/forex.py | 41 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | backend_api_python/app/data_sources/cache_manager.py | 172 | # ============================================ | COMMENT |
| MEDIUM | backend_api_python/app/data_sources/cache_manager.py | 173 | # ============================================ | COMMENT |
| MEDIUM | backend_api_python/app/data_sources/futures.py | 21 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | backend_api_python/app/data_sources/futures.py | 23 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | backend_api_python/app/data_sources/circuit_breaker.py | 152 | # ============================================ | COMMENT |
| MEDIUM⚡ | backend_api_python/app/data_sources/circuit_breaker.py | 153 | # ============================================ | COMMENT |
| MEDIUM⚡ | backend_api_python/app/data_sources/asia_stock_kline.py | 104 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | backend_api_python/app/data_sources/asia_stock_kline.py | 106 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | backend_api_python/app/data_sources/asia_stock_kline.py | 126 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | backend_api_python/app/data_sources/asia_stock_kline.py | 128 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | backend_api_python/app/data_sources/asia_stock_kline.py | 324 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | backend_api_python/app/data_sources/asia_stock_kline.py | 326 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | backend_api_python/app/data_sources/asia_stock_kline.py | 486 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | backend_api_python/app/data_sources/asia_stock_kline.py | 488 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | backend_api_python/app/routes/auth.py | 140 | # ============================================================================= | COMMENT |
| MEDIUM⚡ | backend_api_python/app/routes/auth.py | 142 | # ============================================================================= | COMMENT |
| 154 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/sync_env.py | 4 | CODE | |
| LOW | scripts/sync_env.py | 14 | CODE | |
| LOW | scripts/check_mojibake.py | 9 | CODE | |
| LOW | scripts/check_docs.py | 4 | 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/src/quantdinger_mcp/server.py | 7 | CODE | |
| LOW | mcp_server/src/quantdinger_mcp/security.py | 2 | CODE | |
| LOW | mcp_server/src/quantdinger_mcp/tool_contract.py | 4 | CODE | |
| LOW | backend_api_python/env_sync_core.py | 3 | CODE | |
| LOW | backend_api_python/app/startup.py | 2 | CODE | |
| LOW | backend_api_python/app/_version.py | 8 | CODE | |
| LOW | backend_api_python/app/celery_app.py | 3 | CODE | |
| LOW | backend_api_python/app/__init__.py | 2 | CODE | |
| LOW | backend_api_python/app/__init__.py | 28 | CODE | |
| LOW | backend_api_python/app/__init__.py | 28 | CODE | |
| LOW | backend_api_python/app/tasks/maintenance.py | 3 | CODE | |
| LOW | backend_api_python/app/tasks/agent_jobs.py | 3 | CODE | |
| LOW | backend_api_python/app/tasks/fast_analysis.py | 3 | 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/config/redis_urls.py | 3 | CODE | |
| LOW | backend_api_python/app/runtime/roles.py | 3 | CODE | |
| LOW | backend_api_python/app/runtime/__init__.py | 3 | CODE | |
| LOW | backend_api_python/app/runtime/__init__.py | 3 | CODE | |
| LOW | backend_api_python/app/runtime/process.py | 3 | CODE | |
| LOW | backend_api_python/app/utils/json_helpers.py | 3 | CODE | |
| LOW | backend_api_python/app/utils/db.py | 24 | CODE | |
| LOW | backend_api_python/app/utils/db.py | 24 | CODE | |
| LOW | backend_api_python/app/utils/db.py | 24 | 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 | 19 | CODE | |
| LOW | backend_api_python/app/utils/resource_guard.py | 8 | CODE | |
| LOW | backend_api_python/app/utils/logger.py | 3 | CODE | |
| LOW | backend_api_python/app/utils/broker_session.py | 19 | CODE | |
| LOW | backend_api_python/app/utils/numeric_precision.py | 3 | CODE | |
| LOW | backend_api_python/app/utils/credential_crypto.py | 8 | CODE | |
| LOW | backend_api_python/app/utils/language.py | 8 | CODE | |
| LOW | backend_api_python/app/utils/strategy_runtime_logs.py | 3 | CODE | |
| 698 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/check_mojibake.py | 80 | CODE | |
| LOW | scripts/check_docs.py | 49 | CODE | |
| LOW | mcp_server/src/quantdinger_mcp/security.py | 43 | CODE | |
| LOW | mcp_server/src/quantdinger_mcp/security.py | 90 | CODE | |
| LOW | backend_api_python/app/startup.py | 144 | CODE | |
| LOW | backend_api_python/app/utils/db.py | 355 | CODE | |
| LOW | backend_api_python/app/utils/config_loader.py | 236 | 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 | 863 | CODE | |
| LOW | backend_api_python/app/utils/safe_exec.py | 1067 | CODE | |
| LOW | backend_api_python/app/utils/safe_exec.py | 346 | CODE | |
| LOW | backend_api_python/app/utils/agent_jobs.py | 81 | CODE | |
| LOW | backend_api_python/app/utils/agent_jobs.py | 333 | CODE | |
| LOW | backend_api_python/app/utils/db_postgres.py | 496 | CODE | |
| LOW | backend_api_python/app/utils/agent_auth.py | 49 | CODE | |
| LOW | backend_api_python/app/observability/metrics.py | 72 | CODE | |
| LOW | backend_api_python/app/openapi/register.py | 134 | CODE | |
| LOW | backend_api_python/app/openapi/register.py | 169 | CODE | |
| LOW | backend_api_python/app/professional_report/snapshot.py | 215 | CODE | |
| LOW | …_api_python/app/professional_report/features/crypto.py | 139 | CODE | |
| LOW | …_api_python/app/professional_report/features/crypto.py | 292 | CODE | |
| LOW | …_api_python/app/professional_report/features/crypto.py | 421 | CODE | |
| LOW | …_api_python/app/professional_report/features/crypto.py | 513 | 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/hk_research.py | 217 | CODE | |
| LOW | backend_api_python/app/data_providers/__init__.py | 306 | CODE | |
| LOW | backend_api_python/app/data_providers/us_research.py | 560 | 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 | …kend_api_python/app/data_providers/company_research.py | 94 | CODE | |
| LOW | …kend_api_python/app/data_providers/company_research.py | 240 | 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 | backend_api_python/app/workers/lease_heartbeat.py | 107 | CODE | |
| LOW | backend_api_python/app/workers/trading.py | 166 | CODE | |
| LOW | backend_api_python/app/workers/trading.py | 209 | CODE | |
| LOW | backend_api_python/app/workers/trading.py | 396 | CODE | |
| LOW | …kend_api_python/app/data_sources/cn_hk_fundamentals.py | 103 | CODE | |
| 321 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | backend_api_python/run.py | 62 | def _set_if_blank(key: str, value: str) -> None: | CODE |
| LOW | backend_api_python/app/celery_app.py | 94 | __all__ = ["celery_app"] | CODE |
| LOW | backend_api_python/app/config/__init__.py | 15 | __all__ = [ | CODE |
| LOW | backend_api_python/app/runtime/__init__.py | 5 | __all__ = ["ProcessRole", "current_process_role"] | CODE |
| LOW | backend_api_python/app/utils/db.py | 414 | __all__ = [ | CODE |
| LOW | backend_api_python/app/utils/config_loader.py | 70 | 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/broker_session.py | 119 | __all__ = ['BrokerSessionRegistry'] | CODE |
| LOW | backend_api_python/app/utils/numeric_precision.py | 75 | __all__ = [ | CODE |
| LOW⚡ | backend_api_python/app/utils/safe_exec_worker.py | 259 | def set_universe(self, *args: Any, **kwargs: Any) -> None: | CODE |
| LOW⚡ | backend_api_python/app/utils/safe_exec_worker.py | 262 | def set_benchmark(self, *args: Any, **kwargs: Any) -> None: | CODE |
| LOW⚡ | backend_api_python/app/utils/safe_exec_worker.py | 268 | def set_warmup(self, *args: Any, **kwargs: Any) -> None: | CODE |
| LOW⚡ | backend_api_python/app/utils/safe_exec_worker.py | 274 | def set_metadata(self, *args: Any, **kwargs: Any) -> None: | CODE |
| LOW | backend_api_python/app/observability/__init__.py | 10 | __all__ = ["init_http_observability"] | CODE |
| LOW | backend_api_python/app/observability/db_metrics.py | 31 | __all__ = [ | CODE |
| LOW | backend_api_python/app/openapi/schemas/__init__.py | 11 | __all__ = [ | CODE |
| LOW | …end_api_python/app/professional_report/llm_contract.py | 104 | __all__ = ["FastAnalysisNarrative", "validate_llm_analysis"] | CODE |
| LOW | backend_api_python/app/professional_report/__init__.py | 9 | __all__ = ["build_professional_report"] | CODE |
| LOW | backend_api_python/app/professional_report/narrative.py | 77 | __all__ = ["has_mojibake", "normalize_report_text", "numeric_tokens", "validate_evidence_claims"] | CODE |
| LOW | backend_api_python/app/professional_report/builder.py | 754 | __all__ = ["build_professional_report"] | CODE |
| LOW | backend_api_python/app/professional_report/contracts.py | 366 | __all__ = [ | CODE |
| LOW | backend_api_python/app/professional_report/risk.py | 216 | __all__ = ["build_risk_plan"] | CODE |
| LOW | backend_api_python/app/professional_report/prompt.py | 183 | __all__ = ["build_professional_analysis_prompt"] | CODE |
| LOW | backend_api_python/app/professional_report/quality.py | 189 | __all__ = ["apply_quality_gate", "assess_snapshot_quality"] | CODE |
| LOW | backend_api_python/app/professional_report/snapshot.py | 466 | __all__ = ["build_evidence_snapshot"] | CODE |
| LOW | …pi_python/app/professional_report/providers/catalog.py | 573 | __all__ = [ | CODE |
| LOW | …i_python/app/professional_report/providers/__init__.py | 22 | __all__ = [ | CODE |
| LOW | …_api_python/app/professional_report/features/equity.py | 164 | __all__ = ["build_equity_features"] | CODE |
| LOW | …pi_python/app/professional_report/features/__init__.py | 7 | __all__ = [ | CODE |
| LOW | …_api_python/app/professional_report/features/crypto.py | 775 | __all__ = ["VERSION", "build_crypto_features", "extract_crypto_features"] | CODE |
| LOW | backend_api_python/app/data_providers/hk_research.py | 275 | __all__ = [ | CODE |
| LOW | backend_api_python/app/data_providers/us_research.py | 617 | __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/data_sources/native_crypto.py | 628 | __all__ = [ | CODE |
| LOW | backend_api_python/app/events/dispatcher.py | 82 | __all__ = ["StrategyDueDispatcher"] | CODE |
| LOW | backend_api_python/app/events/protocol.py | 297 | __all__ = [ | CODE |
| LOW | backend_api_python/app/events/__init__.py | 19 | __all__ = [ | CODE |
| LOW | backend_api_python/app/events/bar_clock.py | 266 | __all__ = [ | CODE |
| LOW | backend_api_python/app/events/bus.py | 118 | __all__ = ["EventBus", "EventSubscription", "InMemoryEventBus"] | CODE |
| LOW | backend_api_python/app/events/topics.py | 98 | __all__ = ["TopicSpec", "event_topic_map", "topic_for_event", "topic_specs"] | CODE |
| LOW | backend_api_python/app/events/kafka.py | 300 | __all__ = [ | CODE |
| LOW | backend_api_python/app/events/evaluator.py | 252 | __all__ = ["StrategyEvaluationBatchHandler"] | CODE |
| LOW | …nd_api_python/app/services/shared_market_price_feed.py | 229 | __all__ = [ | CODE |
| LOW | backend_api_python/app/services/event_inbox.py | 272 | __all__ = [ | CODE |
| LOW | …pi_python/app/services/strategy_event_subscriptions.py | 210 | __all__ = [ | CODE |
| LOW | backend_api_python/app/services/virtual_trading.py | 853 | __all__ = [ | CODE |
| LOW | backend_api_python/app/services/ai_copilot_store.py | 440 | def update_request_usage(cur, request_id: int, **values: Any) -> None: | CODE |
| LOW | …nd_api_python/app/services/distributed_runtime_host.py | 201 | __all__ = ["DistributedRuntimeHost"] | CODE |
| LOW | backend_api_python/app/services/trading_executor.py | 63 | __all__ = ["TradingExecutor", "live_history_days"] | CODE |
| LOW | backend_api_python/app/services/trading_executor.py | 158 | def set_runtime_fencing_token(self, strategy_id: int, fencing_token: int) -> None: | CODE |
| LOW | backend_api_python/app/services/strategy_daily_pnl.py | 476 | __all__ = [ | STRING |
| LOW | …end_api_python/app/services/virtual_execution_costs.py | 106 | __all__ = [ | 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 |
| 45 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | backend_api_python/app/routes/quick_trade.py | 435 | # Swap input is margin and expands by leverage. | COMMENT |
| MEDIUM | backend_api_python/app/routes/quick_trade.py | 528 | # 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 | …end_api_python/app/services/ai_generation_contracts.py | 97 | ## Contract leverage | COMMENT |
| MEDIUM⚡ | backend_api_python/app/services/pending_order_worker.py | 1826 | # - 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 | 1827 | # - For other exchanges, leverage setting is not implemented yet in this local client. | COMMENT |
| MEDIUM | backend_api_python/app/services/llm.py | 1405 | """Safe LLM call with robust JSON parsing and fallback structure.""" | STRING |
| LOW | backend_api_python/app/services/symbol_name.py | 229 | # 1) Seed (already in our DB — nothing to learn, just return). | COMMENT |
| MEDIUM | backend_api_python/app/services/indicator_workspace.py | 66 | "# @strategy, # signal_form, # exit_owner, # flip_mode, # timeframe, risk, leverage, trade direction, stop l | CODE |
| MEDIUM⚡ | backend_api_python/app/services/portfolio_monitor.py | 464 | """Build a comprehensive text report (backward compatible).""" | STRING |
| 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 | …hon/app/services/live_trading/account_configuration.py | 97 | """Apply requested leverage and margin mode or reject the order.""" | STRING |
| MEDIUM | backend_api_python/app/services/live_trading/bitget.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/gate.py | 901 | # Gate expects ``leverage`` / ``cross_leverage_limit`` as **query parameters**, not JSON body | COMMENT |
| MEDIUM | backend_api_python/app/services/live_trading/gate.py | 902 | # (see gateapi-python: update_position_leverage). Cross / portfolio mode: leverage=0 + cross_leverage_limit. | COMMENT |
| MEDIUM | backend_api_python/app/services/live_trading/binance.py | 1086 | """Read back symbol-level margin mode and leverage from positionRisk. | STRING |
| 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 | 1569 | """One grid line's base quantity (amountPerGrid × leverage / price), exchange-normalized.""" | STRING |
| MEDIUM | backend_api_python/tests/test_grid_engine.py | 508 | """100 USDT * 20% margin * 20x leverage ≈ 400 USDT notional at 72710.""" | STRING |
| MEDIUM⚡ | backend_api_python/tests/test_indicator_code_quality.py | 74 | # @strategy leverage 2 | COMMENT |
| MEDIUM⚡ | backend_api_python/tests/test_risk_pct_basis.py | 62 | # 92 / 100 = -8% > -9% — must NOT trigger even at 10x leverage. | COMMENT |
| MEDIUM | backend_api_python/tests/test_risk_pct_basis.py | 114 | # 16% price move required regardless of leverage. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | …api_python/app/services/strategy_command_repository.py | 0 | select 1 from qd_strategy_runtime_leases where strategy_id = %s and fencing_token = %s and lease_expires_at >= now() lim | STRING |
| HIGH | backend_api_python/app/services/strategy.py | 0 | select 1 from qd_strategy_runtime_leases where strategy_id = %s and fencing_token = %s and lease_expires_at >= now() lim | STRING |
| HIGH | …_api_python/app/services/strategy_v2/live_execution.py | 0 | select 1 from qd_strategy_runtime_leases where strategy_id = %s and fencing_token = %s and lease_expires_at >= now() lim | 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 |
| HIGH | backend_api_python/tests/test_agent_current_contract.py | 0 | def initialize(context): context.set_universe(["usstock:aapl"]) context.subscribe(frequency="1d") def handle_data(contex | STRING |
| HIGH | backend_api_python/tests/test_strategy_evolution.py | 0 | def initialize(context): context.set_universe(["usstock:aapl"]) context.subscribe(frequency="1d") def handle_data(contex | STRING |
| HIGH | backend_api_python/tests/test_strategy_v2_service.py | 0 | def initialize(context): context.set_universe(["usstock:aapl"]) context.subscribe(frequency="1d") def handle_data(contex | STRING |
| HIGH | backend_api_python/tests/test_strategy_v2_runtime.py | 0 | def initialize(context): context.set_universe(["usstock:aapl"]) context.subscribe(frequency="1d") def handle_data(contex | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | docs/deployment/OAUTH_CONFIG_EN.md | 17 | ### Step 1: Create a Google Cloud Project | COMMENT |
| LOW | docs/deployment/OAUTH_CONFIG_EN.md | 23 | ### Step 2: Configure OAuth Consent Screen | COMMENT |
| LOW | docs/deployment/OAUTH_CONFIG_EN.md | 35 | ### Step 3: Create OAuth 2.0 Client ID | COMMENT |
| LOW | docs/deployment/OAUTH_CONFIG_EN.md | 49 | ### Step 4: Configure .env File | COMMENT |
| LOW | docs/deployment/OAUTH_CONFIG_EN.md | 62 | ### Step 1: Create GitHub OAuth App | COMMENT |
| LOW | docs/deployment/OAUTH_CONFIG_EN.md | 75 | ### Step 2: Get Credentials | COMMENT |
| LOW | docs/deployment/OAUTH_CONFIG_EN.md | 81 | ### Step 3: Configure .env File | COMMENT |
| LOW⚡ | docs/deployment/OAUTH_CONFIG_EN.md | 96 | ### Step 1: Create Turnstile Widget | COMMENT |
| LOW⚡ | docs/deployment/OAUTH_CONFIG_EN.md | 106 | ### Step 2: Get Keys | COMMENT |
| LOW⚡ | docs/deployment/OAUTH_CONFIG_EN.md | 112 | ### Step 3: Configure .env File | COMMENT |
| LOW | docs/deployment/NOTIFICATION_EMAIL_CONFIG_EN.md | 48 | ### Step 1: Obtain SMTP Service Information | COMMENT |
| LOW⚡ | docs/deployment/NOTIFICATION_EMAIL_CONFIG_EN.md | 67 | ### Step 2: Configure Environment Variables | COMMENT |
| LOW | docs/deployment/NOTIFICATION_EMAIL_CONFIG_EN.md | 103 | ### Step 3: Enable Email Notifications in Strategy | COMMENT |
| LOW | docs/deployment/NOTIFICATION_SMS_CONFIG_EN.md | 45 | ### Step 1: Create a Twilio Account | COMMENT |
| LOW | docs/deployment/NOTIFICATION_SMS_CONFIG_EN.md | 57 | ### Step 2: Obtain API Credentials | COMMENT |
| LOW | docs/deployment/NOTIFICATION_SMS_CONFIG_EN.md | 71 | ### Step 3: Get a Phone Number | COMMENT |
| LOW⚡ | docs/deployment/NOTIFICATION_SMS_CONFIG_EN.md | 87 | ### Step 4: Configure Environment Variables | COMMENT |
| LOW | docs/deployment/NOTIFICATION_SMS_CONFIG_EN.md | 113 | ### Step 5: Enable SMS Notifications in Strategy | COMMENT |
| LOW | docs/deployment/NOTIFICATION_TELEGRAM_CONFIG_EN.md | 27 | ## Step 1: Create a Telegram Bot | COMMENT |
| LOW | docs/deployment/NOTIFICATION_TELEGRAM_CONFIG_EN.md | 36 | ## Step 2: Obtain Bot Token | COMMENT |
| LOW | docs/deployment/NOTIFICATION_TELEGRAM_CONFIG_EN.md | 48 | ## Step 3: Get Your User ID | COMMENT |
| LOW | docs/deployment/NOTIFICATION_TELEGRAM_CONFIG_EN.md | 71 | ## Step 4: Configure Environment Variables | COMMENT |
| LOW | docs/deployment/NOTIFICATION_TELEGRAM_CONFIG_EN.md | 84 | ## Step 5: Enable Telegram Notifications in Strategy | COMMENT |
| LOW⚡ | backend_api_python/app/routes/auth.py | 175 | # Step 1: Verify Turnstile (if enabled) | COMMENT |
| LOW⚡ | backend_api_python/app/routes/auth.py | 184 | # Step 2: Check rate limiting | COMMENT |
| LOW⚡ | backend_api_python/app/routes/auth.py | 191 | # Step 3: Authenticate | COMMENT |
| LOW | backend_api_python/app/routes/auth.py | 272 | # Step 4: Record successful login | COMMENT |
| LOW | …pi_python/app/services/usdt_payment/watchers/solana.py | 183 | # Step 1: resolve the watched account. | COMMENT |
| 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 | 197 | # Check if user has no password set (code-login user) | COMMENT |
| LOW | backend_api_python/app/routes/auth.py | 416 | # Check if user exists | COMMENT |
| LOW | backend_api_python/app/routes/auth.py | 421 | # Check if registration is enabled | COMMENT |
| LOW | backend_api_python/app/routes/auth.py | 719 | # Check if registration is enabled | COMMENT |
| LOW | backend_api_python/app/routes/auth.py | 764 | # Check if username already exists | COMMENT |
| LOW | backend_api_python/app/routes/auth.py | 769 | # Check if email already exists | 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 | 1727 | # 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 | 1144 | # Check if we have API key for the detected provider | COMMENT |
| LOW | backend_api_python/app/services/security_service.py | 275 | # 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 | 1530 | # Check if we can trigger (not triggered yet, or repeat interval passed) | STRING |
| LOW | backend_api_python/app/services/user_service.py | 644 | # Check if user has no password (code-login user) | COMMENT |
| LOW | backend_api_python/app/services/user_service.py | 766 | # Check if username already exists | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | backend_api_python/app/services/strategy_v2/runtime.py | 252 | key not in updated or not frame.equals(updated[key].iloc[:len(frame)]) | CODE |
| HIGH | backend_api_python/app/services/strategy_v2/runtime.py | 452 | or not cached.index.equals(frame.index[:cached_length]) | CODE |
| HIGH | backend_api_python/app/services/strategy_v2/data.py | 304 | if any(not baseline.equals(rows.iloc[index]) for index in range(1, len(rows))): | CODE |
| HIGH | …ckend_api_python/tests/test_strategy_v2_market_data.py | 643 | assert second.equals(first) | CODE |
| HIGH | backend_api_python/tests/test_llm_litellm_provider.py | 268 | b'data: {"choices":[{"delta":{"content":"partial"},"finish_reason":null}]}', | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | mcp_server/src/quantdinger_mcp/server.py | 385 | CODE | |
| LOW | mcp_server/src/quantdinger_mcp/server.py | 629 | CODE | |
| LOW | backend_api_python/app/professional_report/snapshot.py | 142 | CODE | |
| LOW | backend_api_python/app/routes/user.py | 873 | CODE | |
| LOW | backend_api_python/app/routes/global_market.py | 174 | CODE | |
| LOW | backend_api_python/app/routes/ai_chat.py | 731 | CODE | |
| LOW | backend_api_python/app/services/pending_order_worker.py | 2848 | CODE | |
| LOW | backend_api_python/app/services/ai_copilot_store.py | 274 | CODE | |
| LOW | backend_api_python/app/services/community_service.py | 251 | CODE | |
| LOW | backend_api_python/app/services/community_service.py | 593 | CODE | |
| LOW | backend_api_python/app/services/research_agent.py | 151 | CODE | |
| LOW | backend_api_python/app/services/live_trading/htx_v5.py | 370 | CODE | |
| LOW | backend_api_python/app/services/live_trading/records.py | 478 | CODE | |
| LOW | backend_api_python/app/services/strategy_v2/service.py | 44 | CODE | |
| LOW | backend_api_python/app/services/strategy_v2/service.py | 145 | CODE | |
| LOW | backend_api_python/app/services/strategy_v2/runtime.py | 1704 | CODE | |
| LOW | …api_python/app/services/pending_orders/fill_records.py | 126 | CODE | |
| LOW | …pi_python/app/services/execution_streams/repository.py | 15 | CODE | |
| LOW | …_python/app/services/strategy_runtime/order_intents.py | 84 | CODE | |
| LOW | …d_api_python/app/services/strategy_runtime/identity.py | 75 | CODE | |
| LOW | backend_api_python/app/services/grid/engine.py | 1943 | CODE | |
| LOW | backend_api_python/app/services/grid/fill_handler.py | 27 | CODE | |
| LOW | backend_api_python/app/services/grid/fill_handler.py | 103 | CODE |
| 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 | 405 | "disclaimer": "This report is generated by AI for research only and is not investment advice.", | 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 | # `migrations/init.sql` idempotently on every start, so no host-side SQL | 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 | .github/workflows/docker-publish.yml | 1 | name: Publish backend image to GHCR | COMMENT |
| LOW | backend_api_python/requirements.txt | 41 | # Durable background jobs and periodic maintenance | COMMENT |
| LOW | backend_api_python/app/services/builtin_indicators.py | 41 | # * output['signals'] is chart-only and never drives orders by itself | 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/usdt_payment/service.py | 101 | updated_at TIMESTAMP DEFAULT NOW() | 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 | min_ts = int(ct.timestamp()) - 60 if ct else None | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | backend_api_python/app/routes/auth.py | 175 | # Step 1: Verify Turnstile (if enabled) | COMMENT |
| LOW⚡ | backend_api_python/app/routes/auth.py | 184 | # Step 2: Check rate limiting | COMMENT |
| LOW⚡ | backend_api_python/app/routes/auth.py | 191 | # Step 3: Authenticate | COMMENT |
| LOW | backend_api_python/app/routes/auth.py | 272 | # Step 4: Record successful login | COMMENT |
| LOW | …pi_python/app/services/usdt_payment/watchers/solana.py | 183 | # Step 1: resolve the watched account. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | docker-compose.ghcr.yml | 17 | # - .env contains backend runtime settings and Docker Compose orchestration knobs. | COMMENT |
| MEDIUM | docs/architecture/ARCHITECTURE.md | 52 | ai/ # skills, prompts, provider orchestration | CODE |
| MEDIUM | docs/architecture/V6_HYPERSCALE_ARCHITECTURE_PLAN.md | 793 | ### Phase 2: event-driven bar evaluation | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | backend_api_python/app/routes/settings.py | 339 | 'default': 'admin@example.com', | CODE |
| LOW | backend_api_python/app/routes/settings.py | 2264 | if requested_admin_email and requested_admin_email != 'admin@example.com': | CODE |
| LOW | backend_api_python/app/services/security_service.py | 28 | 'placeholder', | CODE |
| LOW | backend_api_python/app/services/user_service.py | 384 | if email == 'admin@example.com': | CODE |
| LOW | backend_api_python/app/services/user_service.py | 385 | return {'synced': False, 'reason': 'placeholder'} | CODE |
| LOW | backend_api_python/app/services/user_service.py | 415 | if current_email and current_email != 'admin@example.com' and not overwrite_existing: | CODE |
| LOW | backend_api_python/app/services/user_service.py | 1128 | admin_email = os.getenv('ADMIN_EMAIL', 'admin@example.com') | CODE |
| LOW | backend_api_python/tests/test_db_log_noise_fixes.py | 80 | result = service.start_setup(9383, "user@example.com") | CODE |
| LOW | …ckend_api_python/tests/test_initial_password_policy.py | 88 | "email": "admin@example.com", | CODE |
| LOW | …ckend_api_python/tests/test_initial_password_policy.py | 162 | "email": "admin@example.com", | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | backend_api_python/app/data_sources/factory.py | 139 | CODE | |
| MEDIUM | backend_api_python/app/data_sources/factory.py | 144 | CODE | |
| MEDIUM | …kend_api_python/tests/test_ai_chat_snapshot_quality.py | 238 | 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 |