Repository Analysis

brokermr810/QuantDinger

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

31.8 Strong AI signal View on GitHub

Analysis Overview

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).

31.8
Adjusted Score
31.8
Raw Score
100%
Time Factor
2026-07-13
Last Push
9.6K
Stars
Python
Language
153.6K
Lines of Code
527
Files
4.3K
Pattern Hits
2026-07-14
Scan Date
0.04
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

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.

Severity Breakdown

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.

CRITICAL 0HIGH 23MEDIUM 376LOW 3898

Directory Score Breakdown

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.

Pattern Findings

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.

Excessive Try-Catch Wrapping1924 hits · 1757 pts
SeverityFileLineSnippetContext
LOWdocs/SCRIPT_CODE_DEVELOPMENT_GUIDE_EN.md104 except Exception:CODE
LOWdocs/SCRIPT_CODE_DEVELOPMENT_GUIDE_EN.md141 except Exception:CODE
LOWdocs/SCRIPT_CODE_DEVELOPMENT_GUIDE_EN.md248except Exception:CODE
LOWdocs/SCRIPT_CODE_DEVELOPMENT_GUIDE_EN.md517 except Exception:CODE
MEDIUMdocs/SCRIPT_CODE_DEVELOPMENT_GUIDE_EN.md101def _run_budget(ctx):CODE
MEDIUMdocs/SCRIPT_CODE_DEVELOPMENT_GUIDE_EN.md138def _side(ctx):CODE
MEDIUMdocs/SCRIPT_CODE_DEVELOPMENT_GUIDE_EN.md514def _side(ctx):CODE
LOWdocs/SCRIPT_CODE_DEVELOPMENT_GUIDE_CN.md104 except Exception:CODE
LOWdocs/SCRIPT_CODE_DEVELOPMENT_GUIDE_CN.md141 except Exception:CODE
LOWdocs/SCRIPT_CODE_DEVELOPMENT_GUIDE_CN.md248except Exception:CODE
LOWdocs/SCRIPT_CODE_DEVELOPMENT_GUIDE_CN.md517 except Exception:CODE
MEDIUMdocs/SCRIPT_CODE_DEVELOPMENT_GUIDE_CN.md101def _run_budget(ctx):CODE
MEDIUMdocs/SCRIPT_CODE_DEVELOPMENT_GUIDE_CN.md138def _side(ctx):CODE
MEDIUMdocs/SCRIPT_CODE_DEVELOPMENT_GUIDE_CN.md514def _side(ctx):CODE
LOWscripts/check_version.py39 except Exception:CODE
LOWmcp_server/src/quantdinger_mcp/server.py213 except Exception:CODE
LOWmcp_server/src/quantdinger_mcp/server.py322 except Exception:CODE
LOWmcp_server/src/quantdinger_mcp/server.py1231 except Exception:CODE
LOWmcp_server/src/quantdinger_mcp/server.py1241 except Exception:CODE
LOWmcp_server/src/quantdinger_mcp/security.py78 except Exception:CODE
LOWmcp_server/src/quantdinger_mcp/security.py105 except Exception:CODE
LOWbackend_api_python/run.py14except Exception:CODE
LOWbackend_api_python/run.py27except Exception:CODE
LOWbackend_api_python/app/startup.py53 except Exception as e:CODE
LOWbackend_api_python/app/startup.py64 except Exception as e:CODE
LOWbackend_api_python/app/startup.py78 except Exception as e:CODE
LOWbackend_api_python/app/startup.py115 except Exception as e:CODE
LOWbackend_api_python/app/startup.py152 except Exception as e:CODE
LOWbackend_api_python/app/startup.py154 except Exception as e:CODE
LOWbackend_api_python/app/startup.py160 except Exception as e:CODE
LOWbackend_api_python/app/startup.py171 except Exception:CODE
LOWbackend_api_python/app/startup.py182 except Exception as exc:CODE
LOWbackend_api_python/app/startup.py203 except Exception:CODE
LOWbackend_api_python/app/startup.py208 except Exception:CODE
LOWbackend_api_python/app/_version.py66 except Exception:CODE
LOWbackend_api_python/app/__init__.py95 except Exception as exc:CODE
LOWbackend_api_python/app/__init__.py111 except Exception as sample_exc:CODE
LOWbackend_api_python/app/__init__.py113 except Exception as e:CODE
MEDIUMbackend_api_python/app/__init__.py90def _configure_ibkr_asyncio() -> None:CODE
MEDIUMbackend_api_python/app/__init__.py99def _bootstrap_database() -> None:CODE
LOWbackend_api_python/app/utils/json_helpers.py18 except Exception:CODE
LOWbackend_api_python/app/utils/auth.py75 except Exception as e:CODE
LOWbackend_api_python/app/utils/auth.py139 except Exception as e:CODE
LOWbackend_api_python/app/utils/db.py136 except Exception as exc:CODE
LOWbackend_api_python/app/utils/db.py161 except Exception as exc:CODE
LOWbackend_api_python/app/utils/db.py167 except Exception as exc:CODE
LOWbackend_api_python/app/utils/config_loader.py34 except Exception as e:CODE
LOWbackend_api_python/app/utils/config_loader.py222 except Exception as e:CODE
LOWbackend_api_python/app/utils/config_loader.py304 except Exception as e:CODE
LOWbackend_api_python/app/utils/request_guard.py37 except Exception:CODE
LOWbackend_api_python/app/utils/request_guard.py103 except Exception:CODE
LOWbackend_api_python/app/utils/request_guard.py123 except Exception:CODE
LOWbackend_api_python/app/utils/timeutil.py29except Exception: # pragma: no cover - fallback for very old runtimesCODE
LOWbackend_api_python/app/utils/timeutil.py45 except Exception:CODE
LOWbackend_api_python/app/utils/timeutil.py80 except Exception:CODE
LOWbackend_api_python/app/utils/timeutil.py95 except Exception:CODE
LOWbackend_api_python/app/utils/safe_exec.py232 except Exception as e:CODE
LOWbackend_api_python/app/utils/safe_exec.py292 except Exception as e:CODE
LOWbackend_api_python/app/utils/safe_exec.py325 except Exception as e:CODE
LOWbackend_api_python/app/utils/safe_exec.py374 except Exception:CODE
1864 more matches not shown…
Hyper-Verbose Identifiers1096 hits · 1140 pts
SeverityFileLineSnippetContext
LOWmcp_server/tests/test_transport_resolution.py39def test_transport_default_is_stdio(monkeypatch, fresh_module):CODE
LOWmcp_server/tests/test_transport_resolution.py56def test_transport_aliases_resolve(monkeypatch, fresh_module, raw, expected):CODE
LOWmcp_server/tests/test_transport_resolution.py61def test_transport_unknown_exits(monkeypatch, fresh_module):CODE
LOWmcp_server/tests/test_transport_resolution.py67def test_apply_http_settings_without_error(monkeypatch, fresh_module):CODE
LOWmcp_server/tests/test_security_and_tools.py27def test_mcp_tool_registry_complete(fresh_module):CODE
LOWmcp_server/tests/test_security_and_tools.py34def test_ai_optimize_requires_confirmation(fresh_module):CODE
LOWmcp_server/tests/test_security_and_tools.py40def test_update_strategy_blocks_running_without_trade_scope(fresh_module):CODE
LOWmcp_server/tests/test_security_and_tools.py46def test_stop_strategy_requires_confirmation(fresh_module):CODE
LOWmcp_server/tests/test_security_and_tools.py52def test_place_quick_order_requires_confirmation(fresh_module):CODE
LOWmcp_server/tests/test_security_and_tools.py58def test_indicator_code_size_rejected_in_mcp(monkeypatch, fresh_module):CODE
LOWmcp_server/src/quantdinger_mcp/server.py691def get_indicator_authoring_contract() -> Any:CODE
LOWmcp_server/src/quantdinger_mcp/server.py1075def submit_experiment_pipeline(payload: dict, idempotency_key: str | None = None) -> Any:CODE
LOWmcp_server/src/quantdinger_mcp/server.py1213def _apply_http_settings_from_env() -> None:CODE
LOWmcp_server/src/quantdinger_mcp/security.py23def assert_indicator_code_size(code: str) -> None:CODE
LOWbackend_api_python/app/startup.py38def _is_debug_reloader_parent() -> bool:CODE
LOWbackend_api_python/app/startup.py57def start_pending_order_worker():CODE
LOWbackend_api_python/app/startup.py119def restore_running_strategies():CODE
LOWbackend_api_python/app/startup.py165def _schedule_post_restore_position_sync() -> None:CODE
LOWbackend_api_python/app/utils/auth.py24def _configure_jwt_secret_warnings() -> None:CODE
LOWbackend_api_python/app/utils/db.py98def _resolve_market_symbols_sql_path() -> Path:CODE
LOWbackend_api_python/app/utils/local_brokers.py8def local_desktop_brokers_allowed() -> bool:CODE
LOWbackend_api_python/app/utils/local_brokers.py14def desktop_broker_cloud_reject_message() -> str:CODE
LOWbackend_api_python/app/utils/safe_exec.py128def _dangerous_pd_numpy_import(name: str) -> Optional[str]:CODE
LOWbackend_api_python/app/utils/safe_exec.py298def safe_exec_with_validation(CODE
LOWbackend_api_python/app/utils/safe_exec.py467def _string_has_forbidden_dunder(text: str) -> bool:CODE
LOWbackend_api_python/app/utils/safe_exec.py478def _is_operator_accessor_call(node: Any) -> bool:CODE
LOWbackend_api_python/app/utils/safe_exec.py504def _dangerous_pd_numpy_internal(root: Optional[str], attrs: list) -> Optional[str]:CODE
LOWbackend_api_python/app/utils/market_visibility.py49def enabled_markets_whitelist() -> Set[str]:CODE
LOWbackend_api_python/app/utils/trade_close_reason.py100def infer_legacy_close_reason(CODE
LOWbackend_api_python/app/utils/trade_close_reason.py121def resolve_close_reason_for_record(CODE
LOWbackend_api_python/app/utils/trade_net_pnl.py50def allocate_open_commissions_fifo(trades: List[Dict[str, Any]]) -> Dict[int, float]:CODE
LOWbackend_api_python/app/utils/db_postgres.py207def _probe_pg_connection_limit(params: Dict[str, Any]) -> Optional[Dict[str, int]]:CODE
LOWbackend_api_python/app/utils/db_postgres.py244def _resolve_effective_pool_limits(params: Dict[str, Any]) -> tuple[int, int]:CODE
LOWbackend_api_python/app/utils/agent_auth.py152def ensure_agent_gateway_schema() -> None:STRING
LOWbackend_api_python/app/utils/risk_guard.py26def trailing_exit_locks_net_profit(CODE
LOWbackend_api_python/app/openapi/register.py53def register_human_blueprints(api: Api) -> None:CODE
LOWbackend_api_python/app/openapi/register.py158 def _normalize_operation_docs(op: dict) -> None:CODE
LOWbackend_api_python/app/data_providers/heatmap.py106def _fetch_commodities_heatmap() -> List[Dict[str, Any]]:CODE
LOW…end_api_python/app/data_providers/economic_calendar.py169def get_economic_calendar_payload() -> Dict[str, Any]:CODE
LOW…end_api_python/app/data_providers/economic_calendar.py310def _fallback_calendar_payload(CODE
LOW…end_api_python/app/data_providers/economic_calendar.py361def _public_request_error_message(exc: requests.exceptions.RequestException) -> str:CODE
LOW…end_api_python/app/data_providers/economic_calendar.py369def _fetch_tradingeconomics_calendar() -> List[Dict[str, Any]]:CODE
LOW…end_api_python/app/data_providers/economic_calendar.py590def _normalize_tradingeconomics_event(row: Dict[str, Any], idx: int) -> Optional[Dict[str, Any]]:CODE
LOW…end_api_python/app/data_providers/economic_calendar.py743def _build_ai_calendar_insight(event: Dict[str, Any]) -> Dict[str, Any]:CODE
LOW…end_api_python/app/data_providers/economic_calendar.py1069def _tradingeconomics_row_has_figures(row: Dict[str, Any]) -> bool:CODE
LOW…end_api_python/app/data_providers/economic_calendar.py1082def _should_include_finnhub_row(row: Dict[str, Any], event_en: str) -> bool:CODE
LOW…end_api_python/app/data_providers/economic_calendar.py1094def _should_include_tradingeconomics_row(row: Dict[str, Any], event_en: str) -> bool:CODE
LOWbackend_api_python/app/data_providers/__init__.py259def _schedule_background_refresh(CODE
LOWbackend_api_python/app/data_providers/macro_series.py129def get_macro_series_provider() -> MacroSeriesProvider:CODE
LOWbackend_api_python/app/data_providers/opportunities.py236def analyze_opportunities_crypto(opportunities: list):CODE
LOWbackend_api_python/app/data_providers/opportunities.py85def _fetch_single_local_stock_quote(market: str, item: Dict[str, Any], *, fast: bool = False) -> Optional[Dict[str, Any]CODE
LOWbackend_api_python/app/data_providers/opportunities.py138def fetch_stock_opportunity_prices() -> List[Dict[str, Any]]:CODE
LOWbackend_api_python/app/data_providers/opportunities.py143def fetch_local_stock_opportunity_prices(market: str, limit: int = 15, *, fast: bool = False) -> List[Dict[str, Any]]:CODE
LOWbackend_api_python/app/data_providers/opportunities.py283def analyze_opportunities_stocks(opportunities: list):CODE
LOWbackend_api_python/app/data_providers/opportunities.py323def analyze_opportunities_local_stocks(opportunities: list, market: str):CODE
LOWbackend_api_python/app/data_providers/opportunities.py384def analyze_opportunities_forex(opportunities: list):CODE
LOWbackend_api_python/app/data_providers/crypto.py68def fetch_crypto_prices_yfinance() -> List[Dict[str, Any]]:CODE
LOWbackend_api_python/app/data_providers/crypto.py175def fetch_crypto_heatmap_coingecko() -> List[Dict[str, Any]]:CODE
LOWbackend_api_python/app/data_providers/crypto.py209def fetch_crypto_heatmap_coincap() -> List[Dict[str, Any]]:CODE
LOW…kend_api_python/app/data_providers/adanos_sentiment.py135def fetch_adanos_market_sentiment(CODE
1036 more matches not shown…
Decorative Section Separators272 hits · 919 pts
SeverityFileLineSnippetContext
MEDIUMdocker-compose.yml30 # ========================COMMENT
MEDIUMdocker-compose.yml32 # ========================COMMENT
MEDIUMdocker-compose.yml65 # ========================COMMENT
MEDIUMdocker-compose.yml67 # ========================COMMENT
MEDIUMdocker-compose.yml83 # ========================COMMENT
MEDIUMdocker-compose.yml85 # ========================COMMENT
MEDIUMdocker-compose.yml158 # ========================COMMENT
MEDIUMdocker-compose.yml160 # ========================COMMENT
MEDIUMdocker-compose.yml194 # ========================COMMENT
MEDIUMdocker-compose.yml196 # ========================COMMENT
MEDIUMdocs/NOTIFICATION_SMS_CONFIG_CH.md93# =========================COMMENT
MEDIUMdocs/NOTIFICATION_SMS_CONFIG_CH.md95# =========================COMMENT
MEDIUMdocs/NOTIFICATION_EMAIL_CONFIG_CH.md74# =========================COMMENT
MEDIUMdocs/NOTIFICATION_EMAIL_CONFIG_CH.md76# =========================COMMENT
MEDIUMdocs/NOTIFICATION_EMAIL_CONFIG_EN.md72# =========================COMMENT
MEDIUMdocs/NOTIFICATION_EMAIL_CONFIG_EN.md74# =========================COMMENT
MEDIUMdocs/NOTIFICATION_SMS_CONFIG_EN.md92# =========================COMMENT
MEDIUMdocs/NOTIFICATION_SMS_CONFIG_EN.md94# =========================COMMENT
MEDIUMdocs/examples/template_four_way_edge.py1# ============================================================COMMENT
MEDIUMdocs/examples/template_four_way_edge.py3# ------------------------------------------------------------COMMENT
MEDIUMdocs/examples/template_four_way_edge.py6# ============================================================COMMENT
MEDIUMdocs/examples/multi_indicator_composite.py1# ============================================================COMMENT
MEDIUMdocs/examples/multi_indicator_composite.py4# ============================================================COMMENT
MEDIUMdocs/examples/multi_indicator_composite.py11# ============================================================COMMENT
MEDIUMdocs/examples/cross_sectional_momentum_rsi.py1# ============================================================COMMENT
MEDIUMdocs/examples/cross_sectional_momentum_rsi.py5# ============================================================COMMENT
MEDIUMdocs/examples/cross_sectional_momentum_rsi.py20# ============================================================COMMENT
MEDIUMdocs/examples/dual_ma_with_params.py1# ============================================================COMMENT
MEDIUMdocs/examples/dual_ma_with_params.py4# ============================================================COMMENT
MEDIUMdocs/examples/dual_ma_with_params.py15# ============================================================COMMENT
MEDIUMmcp_server/src/quantdinger_mcp/server.py294# ───────────────────────────── Read-class tools ─────────────────────────────COMMENT
MEDIUMmcp_server/src/quantdinger_mcp/server.py685# ───────────────────────────── Indicator workspace ─────────────────────────────COMMENT
MEDIUMmcp_server/src/quantdinger_mcp/server.py805# ───────────────────────────── Strategy workspace ─────────────────────────────COMMENT
MEDIUMmcp_server/src/quantdinger_mcp/server.py925# ───────────────────────────── Backtest / experiments ─────────────────────────────COMMENT
MEDIUMmcp_server/src/quantdinger_mcp/server.py1151# ───────────────────────────── Portfolio (read-only) ─────────────────────────────COMMENT
MEDIUMbackend_api_python/app/utils/safe_exec.py24# ── Whitelisted builtins (strict) ──────────────────────────────────────────COMMENT
MEDIUMbackend_api_python/app/utils/safe_exec.py186# ── Timeout (cross-platform) ──────────────────────────────────────────────COMMENT
MEDIUMbackend_api_python/app/utils/safe_exec.py246# ── Core execution ─────────────────────────────────────────────────────────COMMENT
MEDIUMbackend_api_python/app/utils/safe_exec.py337# ── Subprocess isolation (medium-term) ─────────────────────────────────────COMMENT
MEDIUMbackend_api_python/app/utils/safe_exec.py451# ── Static validation ──────────────────────────────────────────────────────COMMENT
MEDIUMbackend_api_python/app/utils/agent_jobs.py211# ──────────────────────────── progress / streaming ────────────────────────────COMMENT
MEDIUMbackend_api_python/app/utils/agent_auth.py163# ─────────────────────────── token primitives ───────────────────────────STRING
MEDIUMbackend_api_python/app/utils/agent_auth.py206# ─────────────────────────── rate limit (in-process) ───────────────────────────STRING
MEDIUMbackend_api_python/app/utils/agent_auth.py225# ─────────────────────────── verification ───────────────────────────STRING
MEDIUMbackend_api_python/app/utils/agent_auth.py267# ─────────────────────────── audit ───────────────────────────STRING
MEDIUMbackend_api_python/app/utils/agent_auth.py333# ─────────────────────────── decorator ───────────────────────────STRING
MEDIUMbackend_api_python/app/utils/agent_auth.py421# ─────────────────────────── idempotency ───────────────────────────STRING
MEDIUMbackend_api_python/app/utils/agent_auth.py458# ─────────────────────────── helpers for routes ───────────────────────────STRING
MEDIUMbackend_api_python/app/data_providers/__init__.py38# ---------------------------------------------------------------------------COMMENT
MEDIUMbackend_api_python/app/data_providers/__init__.py45# ---------------------------------------------------------------------------COMMENT
MEDIUMbackend_api_python/app/data_providers/__init__.py79# ---------------------------------------------------------------------------COMMENT
MEDIUMbackend_api_python/app/data_providers/__init__.py81# ---------------------------------------------------------------------------COMMENT
MEDIUMbackend_api_python/app/data_providers/__init__.py154# ---------------------------------------------------------------------------COMMENT
MEDIUMbackend_api_python/app/data_providers/__init__.py156# ---------------------------------------------------------------------------COMMENT
MEDIUMbackend_api_python/app/data_providers/opportunities.py232# ---------------------------------------------------------------------------COMMENT
MEDIUMbackend_api_python/app/data_providers/opportunities.py234# ---------------------------------------------------------------------------COMMENT
MEDIUMbackend_api_python/app/data_providers/opportunities.py18# ---------------------------------------------------------------------------COMMENT
MEDIUMbackend_api_python/app/data_providers/opportunities.py20# ---------------------------------------------------------------------------COMMENT
MEDIUM…kend_api_python/app/data_sources/cn_hk_fundamentals.py491# ---------------------------------------------------------------------------COMMENT
MEDIUM…kend_api_python/app/data_sources/cn_hk_fundamentals.py493# ---------------------------------------------------------------------------COMMENT
212 more matches not shown…
Unused Imports455 hits · 425 pts
SeverityFileLineSnippetContext
LOWscripts/check_mojibake.py9CODE
LOWscripts/bump_version.py12CODE
LOWscripts/check_version.py12CODE
LOWmcp_server/tests/test_transport_resolution.py11CODE
LOWmcp_server/tests/test_security_and_tools.py2CODE
LOWmcp_server/src/quantdinger_mcp/server.py26CODE
LOWmcp_server/src/quantdinger_mcp/security.py2CODE
LOWbackend_api_python/app/startup.py2CODE
LOWbackend_api_python/app/_version.py8CODE
LOWbackend_api_python/app/__init__.py2CODE
LOWbackend_api_python/app/__init__.py13CODE
LOWbackend_api_python/app/__init__.py13CODE
LOWbackend_api_python/app/__init__.py13CODE
LOWbackend_api_python/app/__init__.py13CODE
LOWbackend_api_python/app/__init__.py13CODE
LOWbackend_api_python/app/__init__.py13CODE
LOWbackend_api_python/app/__init__.py13CODE
LOWbackend_api_python/app/config/__init__.py2CODE
LOWbackend_api_python/app/config/__init__.py3CODE
LOWbackend_api_python/app/config/__init__.py4CODE
LOWbackend_api_python/app/config/__init__.py4CODE
LOWbackend_api_python/app/config/__init__.py5CODE
LOWbackend_api_python/app/config/__init__.py5CODE
LOWbackend_api_python/app/config/__init__.py5CODE
LOWbackend_api_python/app/config/__init__.py5CODE
LOWbackend_api_python/app/config/__init__.py5CODE
LOWbackend_api_python/app/config/__init__.py5CODE
LOWbackend_api_python/app/config/__init__.py5CODE
LOWbackend_api_python/app/utils/json_helpers.py3CODE
LOWbackend_api_python/app/utils/db.py23CODE
LOWbackend_api_python/app/utils/db.py23CODE
LOWbackend_api_python/app/utils/local_brokers.py3CODE
LOWbackend_api_python/app/utils/request_guard.py3CODE
LOWbackend_api_python/app/utils/notification_display.py6CODE
LOWbackend_api_python/app/utils/timeutil.py21CODE
LOWbackend_api_python/app/utils/market_visibility.py27CODE
LOWbackend_api_python/app/utils/technical_indicators.py8CODE
LOWbackend_api_python/app/utils/technical_indicators.py12CODE
LOWbackend_api_python/app/utils/__init__.py4CODE
LOWbackend_api_python/app/utils/__init__.py5CODE
LOWbackend_api_python/app/utils/__init__.py6CODE
LOWbackend_api_python/app/utils/trade_close_reason.py6CODE
LOWbackend_api_python/app/utils/trade_net_pnl.py10CODE
LOWbackend_api_python/app/utils/agent_jobs.py20CODE
LOWbackend_api_python/app/utils/resource_guard.py8CODE
LOWbackend_api_python/app/utils/broker_session.py19CODE
LOWbackend_api_python/app/utils/credential_crypto.py7CODE
LOWbackend_api_python/app/utils/language.py8CODE
LOWbackend_api_python/app/utils/strategy_runtime_logs.py3CODE
LOWbackend_api_python/app/utils/agent_auth.py11CODE
LOWbackend_api_python/app/utils/agent_auth.py15CODE
LOWbackend_api_python/app/utils/risk_guard.py3CODE
LOWbackend_api_python/app/utils/pnl.py2CODE
LOWbackend_api_python/app/openapi/register.py8CODE
LOWbackend_api_python/app/openapi/blueprint.py6CODE
LOWbackend_api_python/app/openapi/__init__.py8CODE
LOWbackend_api_python/app/openapi/helpers.py4CODE
LOWbackend_api_python/app/openapi/helpers.py6CODE
LOWbackend_api_python/app/openapi/schemas/__init__.py1CODE
LOWbackend_api_python/app/openapi/schemas/__init__.py1CODE
395 more matches not shown…
Deep Nesting318 hits · 226 pts
SeverityFileLineSnippetContext
LOWscripts/check_mojibake.py74CODE
LOWmcp_server/src/quantdinger_mcp/security.py38CODE
LOWmcp_server/src/quantdinger_mcp/security.py84CODE
LOWbackend_api_python/app/startup.py119CODE
LOWbackend_api_python/app/utils/db.py145CODE
LOWbackend_api_python/app/utils/config_loader.py229CODE
LOWbackend_api_python/app/utils/request_guard.py55CODE
LOWbackend_api_python/app/utils/timeutil.py50CODE
LOWbackend_api_python/app/utils/safe_exec.py516CODE
LOWbackend_api_python/app/utils/db_postgres.py456CODE
LOWbackend_api_python/app/utils/agent_auth.py48CODE
LOWbackend_api_python/app/openapi/register.py123CODE
LOWbackend_api_python/app/openapi/register.py158CODE
LOWbackend_api_python/app/data_providers/heatmap.py143CODE
LOWbackend_api_python/app/data_providers/heatmap.py163CODE
LOWbackend_api_python/app/data_providers/forex.py29CODE
LOWbackend_api_python/app/data_providers/forex.py69CODE
LOWbackend_api_python/app/data_providers/forex.py109CODE
LOWbackend_api_python/app/data_providers/forex.py158CODE
LOWbackend_api_python/app/data_providers/sentiment.py45CODE
LOWbackend_api_python/app/data_providers/sentiment.py114CODE
LOWbackend_api_python/app/data_providers/sentiment.py184CODE
LOWbackend_api_python/app/data_providers/sentiment.py253CODE
LOWbackend_api_python/app/data_providers/sentiment.py289CODE
LOWbackend_api_python/app/data_providers/sentiment.py325CODE
LOWbackend_api_python/app/data_providers/__init__.py306CODE
LOWbackend_api_python/app/data_providers/opportunities.py85CODE
LOWbackend_api_python/app/data_providers/opportunities.py143CODE
LOWbackend_api_python/app/data_providers/opportunities.py236CODE
LOWbackend_api_python/app/data_providers/opportunities.py283CODE
LOWbackend_api_python/app/data_providers/opportunities.py323CODE
LOWbackend_api_python/app/data_providers/opportunities.py384CODE
LOWbackend_api_python/app/data_providers/crypto.py28CODE
LOWbackend_api_python/app/data_providers/crypto.py68CODE
LOWbackend_api_python/app/data_providers/commodities.py29CODE
LOWbackend_api_python/app/data_providers/commodities.py67CODE
LOWbackend_api_python/app/data_providers/commodities.py114CODE
LOWbackend_api_python/app/data_providers/commodities.py161CODE
LOWbackend_api_python/app/data_providers/indices.py30CODE
LOWbackend_api_python/app/data_providers/news.py15CODE
LOW…kend_api_python/app/data_sources/cn_hk_fundamentals.py75CODE
LOW…kend_api_python/app/data_sources/cn_hk_fundamentals.py171CODE
LOW…kend_api_python/app/data_sources/cn_hk_fundamentals.py513CODE
LOW…kend_api_python/app/data_sources/cn_hk_fundamentals.py600CODE
LOWbackend_api_python/app/data_sources/forex.py135CODE
LOWbackend_api_python/app/data_sources/forex.py191CODE
LOWbackend_api_python/app/data_sources/forex.py394CODE
LOWbackend_api_python/app/data_sources/us_stock.py214CODE
LOWbackend_api_python/app/data_sources/us_stock.py387CODE
LOWbackend_api_python/app/data_sources/us_stock.py479CODE
LOWbackend_api_python/app/data_sources/factory.py186CODE
LOWbackend_api_python/app/data_sources/futures.py110CODE
LOWbackend_api_python/app/data_sources/crypto.py39CODE
LOWbackend_api_python/app/data_sources/crypto.py297CODE
LOWbackend_api_python/app/data_sources/crypto.py329CODE
LOWbackend_api_python/app/data_sources/crypto.py542CODE
LOWbackend_api_python/app/data_sources/moex.py158CODE
LOWbackend_api_python/app/data_sources/asia_stock_kline.py207CODE
LOWbackend_api_python/app/data_sources/asia_stock_kline.py560CODE
LOWbackend_api_python/app/data_sources/asia_stock_kline.py620CODE
258 more matches not shown…
AI Slop Vocabulary34 hits · 108 pts
SeverityFileLineSnippetContext
MEDIUMbackend_api_python/app/routes/quick_trade.py335 # ---- market_type: leverage 1 => spot API, else perpetual (swap) ----COMMENT
MEDIUMbackend_api_python/app/routes/quick_trade.py446 # ---- set leverage (futures only) ----COMMENT
MEDIUMbackend_api_python/app/routes/quick_trade.py482 # 50 USDT notional at leverage=1 needs ~50 USDT collateral. Many usersCOMMENT
MEDIUMbackend_api_python/app/routes/global_market.py146 """Get comprehensive market sentiment indicators."""STRING
MEDIUMbackend_api_python/app/services/pending_order_worker.py1567 # - For OKX swap, leverage must be set via private endpoint; otherwise exchange defaults apply.COMMENT
MEDIUMbackend_api_python/app/services/pending_order_worker.py1568 # - For other exchanges, leverage setting is not implemented yet in this local client.COMMENT
MEDIUMbackend_api_python/app/services/pending_order_worker.py1616 # Binance Futures leverage is per-symbol on the exchange side.COMMENT
MEDIUMbackend_api_python/app/services/pending_order_worker.py1618 # margin ~= notional (i.e., "margin = invested * leverage" when we sized using leverage).COMMENT
MEDIUMbackend_api_python/app/services/pending_order_worker.py1624 # Safer default: do NOT place orders with an unintended leverage.COMMENT
MEDIUMbackend_api_python/app/services/strategy.py1371 # clients can't re-introduce a divide-by-leverage branch.COMMENT
MEDIUMbackend_api_python/app/services/llm.py813 """Safe LLM call with robust JSON parsing and fallback structure."""STRING
MEDIUMbackend_api_python/app/services/trading_executor.py3485 # TP / trailing are the underlying's % price move; leverage does notCOMMENT
LOWbackend_api_python/app/services/symbol_name.py226 # 1) Seed (already in our DB — nothing to learn, just return).COMMENT
MEDIUMbackend_api_python/app/services/portfolio_monitor.py357 """Build a comprehensive text report (backward compatible)."""STRING
MEDIUMbackend_api_python/app/services/backtest.py3207 # Step percentages are the underlying's % price move directly (no leverage scaling).COMMENT
MEDIUMbackend_api_python/app/services/live_trading/okx.py78 # Best-effort cache for leverage settings to avoid spamming set-leverage on every tick.COMMENT
MEDIUMbackend_api_python/app/services/live_trading/bybit.py857 # Bybit leverage caps vary per symbol; keep best-effort.COMMENT
MEDIUMbackend_api_python/app/services/live_trading/bitget.py952 # For robust parsing: contractSize helps converting contracts->base if needed.COMMENT
MEDIUMbackend_api_python/app/services/live_trading/bitget.py63 # Best-effort cache for leverage settings to avoid spamming set-leverage on every tick.COMMENT
MEDIUMbackend_api_python/app/services/live_trading/gate.py490 # Gate expects ``leverage`` / ``cross_leverage_limit`` as **query parameters**, not JSON bodyCOMMENT
MEDIUMbackend_api_python/app/services/live_trading/gate.py491 # (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.py118# mainnet, and Etherscan's indexed tokentx endpoint is more robustCOMMENT
MEDIUMbackend_api_python/app/services/grid/engine.py739 """One grid line's base quantity (amountPerGrid × leverage / price), exchange-normalized."""STRING
MEDIUMbackend_api_python/tests/test_experiment_services.py121 # Distinct (atr_period, multiplier, leverage) combos must appear — verifiesCOMMENT
MEDIUMbackend_api_python/tests/test_grid_engine.py84 """100 USDT * 20% margin * 20x leverage ≈ 400 USDT notional at 72710."""STRING
MEDIUMbackend_api_python/tests/test_indicator_code_quality.py50# @strategy leverage 2COMMENT
MEDIUMbackend_api_python/tests/test_indicator_code_quality.py63 cfg = StrategyConfigParser.parse("# @strategy leverage 5\n# @strategy stopLossPct 0.02\n")STRING
MEDIUMbackend_api_python/tests/test_indicator_code_quality.py72# @strategy leverage 2COMMENT
MEDIUMbackend_api_python/tests/test_risk_pct_basis.py35 # 92 / 100 = -8% > -9% — must NOT trigger even at 10x leverage.COMMENT
MEDIUMbackend_api_python/tests/test_risk_pct_basis.py88 # 16% price move required regardless of leverage.COMMENT
MEDIUMbackend_api_python/scripts/simulate_trading_executor.py314 # Your requested config (note: risk percentages are margin-based, executor divides by leverage).COMMENT
MEDIUMbackend_api_python/scripts/simulate_trading_executor.py331 # - move up enough to activate trailing (activation is divided by leverage in executor)COMMENT
MEDIUMbackend_api_python/scripts/simulate_trading_executor.py334 up = last_close * 1.02 # +2% (enough to activate when leverage=5)CODE
MEDIUMbackend_api_python/scripts/simulate_trading_executor.py336 pullback = high * (1 - 0.004) # -0.4% from high (enough to hit trailing when leverage=5)CODE
Structural Annotation Overuse28 hits · 47 pts
SeverityFileLineSnippetContext
LOWdocs/OAUTH_CONFIG_EN.md17### Step 1: Create a Google Cloud ProjectCOMMENT
LOWdocs/OAUTH_CONFIG_EN.md23### Step 2: Configure OAuth Consent ScreenCOMMENT
LOWdocs/OAUTH_CONFIG_EN.md35### Step 3: Create OAuth 2.0 Client IDCOMMENT
LOWdocs/OAUTH_CONFIG_EN.md49### Step 4: Configure .env FileCOMMENT
LOWdocs/OAUTH_CONFIG_EN.md62### Step 1: Create GitHub OAuth AppCOMMENT
LOWdocs/OAUTH_CONFIG_EN.md75### Step 2: Get CredentialsCOMMENT
LOWdocs/OAUTH_CONFIG_EN.md81### Step 3: Configure .env FileCOMMENT
LOWdocs/OAUTH_CONFIG_EN.md96### Step 1: Create Turnstile WidgetCOMMENT
LOWdocs/OAUTH_CONFIG_EN.md106### Step 2: Get KeysCOMMENT
LOWdocs/OAUTH_CONFIG_EN.md112### Step 3: Configure .env FileCOMMENT
LOWdocs/NOTIFICATION_EMAIL_CONFIG_EN.md48### Step 1: Obtain SMTP Service InformationCOMMENT
LOWdocs/NOTIFICATION_EMAIL_CONFIG_EN.md67### Step 2: Configure Environment VariablesCOMMENT
LOWdocs/NOTIFICATION_EMAIL_CONFIG_EN.md103### Step 3: Enable Email Notifications in StrategyCOMMENT
LOWdocs/NOTIFICATION_SMS_CONFIG_EN.md45### Step 1: Create a Twilio AccountCOMMENT
LOWdocs/NOTIFICATION_SMS_CONFIG_EN.md57### Step 2: Obtain API CredentialsCOMMENT
LOWdocs/NOTIFICATION_SMS_CONFIG_EN.md71### Step 3: Get a Phone NumberCOMMENT
LOWdocs/NOTIFICATION_SMS_CONFIG_EN.md87### Step 4: Configure Environment VariablesCOMMENT
LOWdocs/NOTIFICATION_SMS_CONFIG_EN.md113### Step 5: Enable SMS Notifications in StrategyCOMMENT
LOWdocs/NOTIFICATION_TELEGRAM_CONFIG_EN.md27## Step 1: Create a Telegram BotCOMMENT
LOWdocs/NOTIFICATION_TELEGRAM_CONFIG_EN.md38## Step 2: Obtain Bot TokenCOMMENT
LOWdocs/NOTIFICATION_TELEGRAM_CONFIG_EN.md50## Step 3: Get Your User IDCOMMENT
LOWdocs/NOTIFICATION_TELEGRAM_CONFIG_EN.md77## Step 4: Configure Environment VariablesCOMMENT
LOWdocs/NOTIFICATION_TELEGRAM_CONFIG_EN.md90## Step 5: Enable Telegram Notifications in StrategyCOMMENT
LOWbackend_api_python/app/routes/auth.py141 # Step 1: Verify Turnstile (if enabled)COMMENT
LOWbackend_api_python/app/routes/auth.py146 # Step 2: Check rate limitingCOMMENT
LOWbackend_api_python/app/routes/auth.py153 # Step 3: AuthenticateCOMMENT
LOWbackend_api_python/app/routes/auth.py234 # Step 4: Record successful loginCOMMENT
LOW…pi_python/app/services/usdt_payment/watchers/solana.py181 # Step 1: resolve the watched account.COMMENT
Cross-File Repetition9 hits · 45 pts
SeverityFileLineSnippetContext
HIGHbackend_api_python/app/routes/indicator.py0insert into qd_indicator_codes (user_id, is_buy, end_time, name, code, description, publish_to_community, pricing_type, STRING
HIGHbackend_api_python/app/services/builtin_indicators.py0insert into qd_indicator_codes (user_id, is_buy, end_time, name, code, description, publish_to_community, pricing_type, STRING
HIGHbackend_api_python/app/services/indicator_workspace.py0insert into qd_indicator_codes (user_id, is_buy, end_time, name, code, description, publish_to_community, pricing_type, STRING
HIGHbackend_api_python/app/services/trading_executor.py0insert into qd_strategy_notifications (user_id, strategy_id, symbol, signal_type, channels, title, message, payload_jsonSTRING
HIGHbackend_api_python/app/services/signal_notifier.py0insert into qd_strategy_notifications (user_id, strategy_id, symbol, signal_type, channels, title, message, payload_jsonSTRING
HIGHbackend_api_python/app/services/portfolio_monitor.py0insert into qd_strategy_notifications (user_id, strategy_id, symbol, signal_type, channels, title, message, payload_jsonSTRING
HIGHbackend_api_python/app/services/live_trading/bybit.py0convert decimal to string with controlled precision. bitget requires quantities to match sizestep/sizeplace precision. aSTRING
HIGH…nd_api_python/app/services/live_trading/bitget_spot.py0convert decimal to string with controlled precision. bitget requires quantities to match sizestep/sizeplace precision. aSTRING
HIGHbackend_api_python/app/services/live_trading/bitget.py0convert decimal to string with controlled precision. bitget requires quantities to match sizestep/sizeplace precision. aSTRING
Modern Structural Boilerplate43 hits · 44 pts
SeverityFileLineSnippetContext
LOWbackend_api_python/run.py61 def _set_if_blank(key: str, value: str) -> None:CODE
LOWbackend_api_python/app/config/__init__.py15__all__ = [CODE
LOWbackend_api_python/app/utils/db.py204__all__ = [CODE
LOWbackend_api_python/app/utils/config_loader.py63 def set_nested(cfg: Dict[str, Any], dotted_key: str, value: Any) -> None:CODE
LOWbackend_api_python/app/utils/timeutil.py112__all__ = ["to_utc_iso"]CODE
LOWbackend_api_python/app/utils/__init__.py8__all__ = ['get_logger', 'CacheManager', 'get_retry_session']CODE
LOWbackend_api_python/app/utils/agent_jobs.py292def _set_status(job_id: str, status: str, *, started_at: Optional[datetime] = None) -> None:CODE
LOWbackend_api_python/app/utils/agent_jobs.py309def _set_result(job_id: str, result: Any) -> None:CODE
LOWbackend_api_python/app/utils/agent_jobs.py324def _set_failure(job_id: str, error: str) -> None:CODE
LOWbackend_api_python/app/utils/broker_session.py116__all__ = ['BrokerSessionRegistry']CODE
LOWbackend_api_python/app/openapi/schemas/__init__.py11__all__ = [CODE
LOWbackend_api_python/app/data_providers/news.py75__all__ = ["fetch_financial_news", "get_economic_calendar", "get_economic_calendar_payload"]CODE
LOWbackend_api_python/app/data_sources/cache_manager.py23logger = logging.getLogger(__name__)CODE
LOWbackend_api_python/app/data_sources/rate_limiter.py18logger = logging.getLogger(__name__)CODE
LOWbackend_api_python/app/data_sources/__init__.py13__all__ = [CODE
LOWbackend_api_python/app/data_sources/__init__.py35__all__ = [CODE
LOWbackend_api_python/app/data_sources/circuit_breaker.py21logger = logging.getLogger(__name__)CODE
LOWbackend_api_python/app/services/__init__.py15__all__ = [CODE
LOWbackend_api_python/app/services/trading_executor.py1779 def _set_db_stopped_best_effort(reason: str) -> None:CODE
LOWbackend_api_python/app/services/backtest.py2825 def _set_sizing(prefix: str, idx: int, price: float, quote: float, base_qty: float) -> None:CODE
LOWbackend_api_python/app/services/usdt_payment_service.py17__all__ = [CODE
LOW…end_api_python/app/services/alpaca_trading/__init__.py19__all__ = ['AlpacaClient', 'AlpacaConfig', 'normalize_symbol', 'parse_symbol']CODE
LOW…d_api_python/app/services/live_trading/binance_spot.py17logger = logging.getLogger(__name__)CODE
LOWbackend_api_python/app/services/live_trading/okx.py21logger = logging.getLogger(__name__)CODE
LOWbackend_api_python/app/services/live_trading/bybit.py23logger = logging.getLogger(__name__)CODE
LOW…nd_api_python/app/services/live_trading/bitget_spot.py26logger = logging.getLogger(__name__)CODE
LOW…nd_api_python/app/services/live_trading/spot_sizing.py16logger = logging.getLogger(__name__)CODE
LOWbackend_api_python/app/services/live_trading/factory.py15logger = logging.getLogger(__name__)CODE
LOWbackend_api_python/app/services/live_trading/bitget.py22logger = logging.getLogger(__name__)CODE
LOWbackend_api_python/app/services/live_trading/gate.py27logger = logging.getLogger(__name__)CODE
LOWbackend_api_python/app/services/live_trading/htx.py25logger = logging.getLogger(__name__)CODE
LOWbackend_api_python/app/services/live_trading/base.py27logger = logging.getLogger(__name__)CODE
LOWbackend_api_python/app/services/live_trading/binance.py20logger = logging.getLogger(__name__)CODE
LOW…hon/app/services/pending_orders/position_sync_cache.py109def set_exchange_sync_backoff(cache_key: str, seconds: Optional[float] = None) -> None:CODE
LOW…ckend_api_python/app/services/usdt_payment/__init__.py24__all__ = [CODE
LOW…_python/app/services/usdt_payment/watchers/__init__.py27__all__ = ["IncomingTransfer", "WatcherResult", "get_watcher"]CODE
LOW…d_api_python/app/services/strategy_runtime/__init__.py8__all__ = [CODE
LOW…ckend_api_python/app/services/ibkr_trading/__init__.py14__all__ = ['IBKRClient', 'IBKRConfig', 'normalize_symbol', 'parse_symbol']CODE
LOWbackend_api_python/app/services/experiment/evolution.py138 def _set_nested(target: Dict[str, Any], parts: List[str], value: Any) -> None:CODE
LOWbackend_api_python/app/services/experiment/__init__.py11__all__ = [CODE
LOWbackend_api_python/app/services/bot_scripts/__init__.py9__all__ = [CODE
LOWbackend_api_python/app/services/grid/__init__.py7__all__ = ["GridBotConfig", "GridEngine", "GridRestingRunner"]CODE
LOWbackend_api_python/app/services/grid/engine.py117 def set_runtime_params(self, params: Dict[str, Any]) -> None:CODE
Redundant / Tautological Comments32 hits · 38 pts
SeverityFileLineSnippetContext
LOWscripts/generate-secret-key.sh9# Check if .env exists.COMMENT
LOWbackend_api_python/docker-entrypoint.sh11# Check if .env file existsCOMMENT
LOWbackend_api_python/app/routes/auth.py159 # Check if user has no password set (code-login user)COMMENT
LOWbackend_api_python/app/routes/auth.py378 # Check if user existsCOMMENT
LOWbackend_api_python/app/routes/auth.py383 # Check if registration is enabledCOMMENT
LOWbackend_api_python/app/routes/auth.py674 # Check if registration is enabledCOMMENT
LOWbackend_api_python/app/routes/auth.py723 # Check if username already existsCOMMENT
LOWbackend_api_python/app/routes/auth.py728 # Check if email already existsCOMMENT
LOWbackend_api_python/app/routes/indicator.py905 # Check if any LLM provider is configuredCOMMENT
LOWbackend_api_python/app/routes/portfolio.py86 # Check if force refresh (skip cache)COMMENT
LOWbackend_api_python/app/routes/portfolio.py316 # Check if force refreshCOMMENT
LOWbackend_api_python/app/routes/portfolio.py728 # Check if alert already exists for this position (unique constraint)COMMENT
LOWbackend_api_python/app/services/pending_order_worker.py1475 # Check if this is an IBKR client (US stocks)COMMENT
LOWbackend_api_python/app/services/oauth_service.py681 # Check if user has password (can't unlink last auth method)COMMENT
LOWbackend_api_python/app/services/oauth_service.py689 # Check if this is the only OAuth linkCOMMENT
LOWbackend_api_python/app/services/oauth_service.py466 # Check if OAuth link existsCOMMENT
LOWbackend_api_python/app/services/oauth_service.py516 # Check if user exists with same emailCOMMENT
LOWbackend_api_python/app/services/llm.py610 # Check if we have API key for the detected providerCOMMENT
LOWbackend_api_python/app/services/security_service.py220 # Check if still in block periodCOMMENT
LOWbackend_api_python/app/services/email_service.py53 # Check if email is properly configuredCOMMENT
LOWbackend_api_python/app/services/email_service.py135 # Check if locked due to too many failed attemptsCOMMENT
LOWbackend_api_python/app/services/email_service.py171 # Check if code matchesCOMMENT
LOWbackend_api_python/app/services/portfolio_monitor.py1328 # Check if we can trigger (not triggered yet, or repeat interval passed)STRING
LOWbackend_api_python/app/services/user_service.py537 # Check if user has no password (code-login user)COMMENT
LOWbackend_api_python/app/services/user_service.py659 # Check if username already existsCOMMENT
LOWbackend_api_python/app/services/backtest.py4256 # Check if liquidation hit (safety net)COMMENT
LOWbackend_api_python/app/services/backtest.py1040 # Check if indices matchSTRING
LOWbackend_api_python/app/services/backtest.py1044 # Check if trade_direction is 'both' modeSTRING
LOWbackend_api_python/app/services/backtest.py1308 # Check if new signal becomes effectiveSTRING
LOWbackend_api_python/app/services/backtest.py1132 # Check if this signal candle has signalsSTRING
LOWbackend_api_python/app/services/backtest.py1173 # Check if signals might be in wrong formatSTRING
LOWbackend_api_python/app/services/backtest.py1341 # Check if signal can execute (based on current position)STRING
Magic Placeholder Names6 hits · 30 pts
SeverityFileLineSnippetContext
HIGHREADME.md531ATLASCLOUD_API_KEY=your_api_keyCODE
HIGHdocs/README_CN.md494ATLASCLOUD_API_KEY=your_api_keyCODE
HIGHbackend_api_python/README.md70OPENROUTER_API_KEY=your_api_keyCODE
HIGHbackend_api_python/README.md79ATLASCLOUD_API_KEY=your_api_keyCODE
HIGHbackend_api_python/README.md157OPENROUTER_API_KEY=your_api_keyCODE
HIGHbackend_api_python/README.md164ATLASCLOUD_API_KEY=your_api_keyCODE
Over-Commented Block29 hits · 27 pts
SeverityFileLineSnippetContext
LOWdocker-compose.ghcr.yml1# QuantDinger Docker Compose - GHCR prebuilt images (zero-repo deploy)COMMENT
LOWdocker-compose.ghcr.yml21# Database schema is bootstrapped automatically: the backend re-appliesCOMMENT
LOWinstall.sh1#!/usr/bin/env bashCOMMENT
LOWdocker-compose.build.yml1# Override file for local frontend builds.COMMENT
LOWdocker-compose.yml1# QuantDinger Docker Compose - One-Click DeploymentCOMMENT
LOWdocker-compose.yml161 # Default behaviour: pull the prebuilt multi-arch image from GHCR.COMMENT
LOWdocs/STRATEGY_DEV_GUIDE.md101At the top of the script, define name, description, tunable params, and strategy defaults.COMMENT
LOWdocs/STRATEGY_DEV_GUIDE.md1221# exit_owner: indicatorCOMMENT
LOWdocs/STRATEGY_DEV_GUIDE_CN.md101脚本开头先定义名称、描述、可调参数、默认策略配置。COMMENT
LOWdocs/STRATEGY_DEV_GUIDE_CN.md1221更好的写法(二选一,并在注释里写清楚):COMMENT
LOWdocs/examples/template_four_way_edge.py1# ============================================================COMMENT
LOWdocs/examples/multi_indicator_composite.py1# ============================================================COMMENT
LOWdocs/examples/multi_indicator_composite.py21# === 参数声明 ===COMMENT
LOWdocs/examples/cross_sectional_momentum_rsi.py1# ============================================================COMMENT
LOWdocs/examples/cross_sectional_momentum_rsi.py61COMMENT
LOWdocs/examples/dual_ma_with_params.py1# ============================================================COMMENT
LOWdocs/examples/dual_ma_with_params.py21# signal_form: four_wayCOMMENT
LOW.github/workflows/docker-publish.yml1name: Publish backend image to GHCRCOMMENT
LOWbackend_api_python/requirements.txt41# tavily-python>=0.3.0COMMENT
LOWbackend_api_python/app/services/builtin_indicators.py41# signal_form: four_way exit_owner: engine flip_mode: R2COMMENT
LOWbackend_api_python/app/services/builtin_indicators.py61 "Classic SuperTrend: ATR-channel direction flip. Open on trend flip, "COMMENT
LOW…_api_python/app/services/indicator_default_template.py21 safe_desc = (description or "").replace("\\", "\\\\").replace('"', '\\"')COMMENT
LOWbackend_api_python/app/services/oauth_service.py161 # FRONTEND_URL accepts a comma-separated list of origins (the sameCOMMENT
LOWbackend_api_python/app/services/strategy.py1001 # When credential_id is present, strip raw API keys to avoidCOMMENT
LOWbackend_api_python/app/services/trading_executor.py2281 # ============================================COMMENT
LOWbackend_api_python/app/services/trading_executor.py5341COMMENT
LOW…d_api_python/app/services/usdt_payment/watchers/evm.py81 "https://bsc-dataseed4.binance.org",COMMENT
LOW…d_api_python/app/services/usdt_payment/watchers/evm.py101# eth_getLogs; we cap at 4800 to stay safely under that. At 0.75s/blockCOMMENT
LOW…pi_python/app/services/usdt_payment/watchers/solana.py181 # Step 1: resolve the watched account.COMMENT
Cross-Language Confusion6 hits · 21 pts
SeverityFileLineSnippetContext
HIGHbackend_api_python/app/services/backtest.py2693 if not buy_series.index.equals(df.index):CODE
HIGHbackend_api_python/app/services/backtest.py2696 if not sell_series.index.equals(df.index):CODE
HIGHbackend_api_python/app/services/backtest.py1041 if not sig_index.equals(df_index):STRING
HIGHbackend_api_python/app/services/backtest.py1056 if not buy_series.index.equals(df_signal.index):STRING
HIGHbackend_api_python/app/services/backtest.py1059 if not sell_series.index.equals(df_signal.index):STRING
HIGHbackend_api_python/app/services/backtest.py1120 if not norm_signals[sig_type].index.equals(df_signal.index):STRING
Synthetic Comment Markers2 hits · 16 pts
SeverityFileLineSnippetContext
HIGHbackend_api_python/app/services/ai_calibration.py148 # Approx correctness rules (as requested)COMMENT
HIGHbackend_api_python/app/services/ai_report_pdf.py103 "This report is generated by AI for research only and is not investment advice."CODE
AI Structural Patterns21 hits · 15 pts
SeverityFileLineSnippetContext
LOWmcp_server/src/quantdinger_mcp/server.py493CODE
LOWmcp_server/src/quantdinger_mcp/server.py931CODE
LOWbackend_api_python/app/routes/global_market.py174CODE
LOWbackend_api_python/app/services/trading_executor.py4319CODE
LOWbackend_api_python/app/services/trading_executor.py5084CODE
LOWbackend_api_python/app/services/community_service.py72CODE
LOWbackend_api_python/app/services/backtest.py368CODE
LOWbackend_api_python/app/services/backtest.py479CODE
LOWbackend_api_python/app/services/backtest.py609CODE
LOWbackend_api_python/app/services/backtest.py2025CODE
LOWbackend_api_python/app/services/backtest.py2172CODE
LOWbackend_api_python/app/services/backtest.py4570CODE
LOW…d_api_python/app/services/live_trading/binance_spot.py652CODE
LOWbackend_api_python/app/services/live_trading/htx_v5.py370CODE
LOWbackend_api_python/app/services/live_trading/records.py361CODE
LOWbackend_api_python/app/services/live_trading/binance.py442CODE
LOW…api_python/app/services/pending_orders/fill_records.py20CODE
LOW…_python/app/services/strategy_runtime/order_intents.py79CODE
LOW…end_api_python/app/services/strategy_runtime/basket.py109CODE
LOW…d_api_python/app/services/strategy_runtime/identity.py76CODE
LOWbackend_api_python/app/services/experiment/runner.py295CODE
Modern AI Meta-Vocabulary4 hits · 11 pts
SeverityFileLineSnippetContext
MEDIUMdocker-compose.ghcr.yml18# - .env (optional) - docker compose orchestration knobs (IMAGE_TAG, ports, mirrors);COMMENT
MEDIUMdocs/ARCHITECTURE.md52 ai/ # skills, prompts, provider orchestrationCODE
MEDIUMdocs/SCRIPT_CODE_DEVELOPMENT_GUIDE_EN.md311 # 8. Main orchestration onlyCOMMENT
MEDIUMbackend_api_python/README.md35## Architecture and quality guardrailsCOMMENT
Verbosity Indicators5 hits · 9 pts
SeverityFileLineSnippetContext
LOWbackend_api_python/app/routes/auth.py141 # Step 1: Verify Turnstile (if enabled)COMMENT
LOWbackend_api_python/app/routes/auth.py146 # Step 2: Check rate limitingCOMMENT
LOWbackend_api_python/app/routes/auth.py153 # Step 3: AuthenticateCOMMENT
LOWbackend_api_python/app/routes/auth.py234 # Step 4: Record successful loginCOMMENT
LOW…pi_python/app/services/usdt_payment/watchers/solana.py181 # Step 1: resolve the watched account.COMMENT
Fake / Example Data8 hits · 6 pts
SeverityFileLineSnippetContext
LOWbackend_api_python/app/routes/settings.py293 'default': 'admin@example.com',CODE
LOWbackend_api_python/app/routes/settings.py1783 if requested_admin_email and requested_admin_email != 'admin@example.com':CODE
LOWbackend_api_python/app/services/security_service.py25 'placeholder',CODE
LOWbackend_api_python/app/services/user_service.py277 if email == 'admin@example.com':CODE
LOWbackend_api_python/app/services/user_service.py278 return {'synced': False, 'reason': 'placeholder'}CODE
LOWbackend_api_python/app/services/user_service.py308 if current_email and current_email != 'admin@example.com' and not overwrite_existing:CODE
LOWbackend_api_python/app/services/user_service.py1018 admin_email = os.getenv('ADMIN_EMAIL', 'admin@example.com')CODE
LOWbackend_api_python/tests/test_db_log_noise_fixes.py78 result = service.start_setup(9383, "user@example.com")CODE
Example Usage Blocks3 hits · 4 pts
SeverityFileLineSnippetContext
LOWinstall.sh5# Usage:COMMENT
LOWdocker-compose.build.yml2# Usage:COMMENT
LOWdocker-compose.yml2# Usage:COMMENT
Dead Code2 hits · 4 pts
SeverityFileLineSnippetContext
MEDIUMbackend_api_python/app/data_sources/factory.py135CODE
MEDIUMbackend_api_python/app/data_sources/factory.py140CODE