AI Slop Code RIsk Monitor

nautechsystems/nautilus_trader

Production-grade Rust-native trading engine with deterministic event-driven architecture

5.1 Moderate pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for nautechsystems/nautilus_trader, a Rust project with 29,820 GitHub stars. SynthScan examined 2,391,888 lines of code across 4686 source files, recording 10345 pattern matches distributed across 22 syntactic categories. The legacy adjusted pattern signal is 5.1 (Moderate 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.

5.1
Adjusted Signal
5.1
Raw Pattern Score
100%
Time Factor
2026-10-10
Last Push
29.8K
Stars
Rust
Language
2.4M
Lines of Code
4.7K
Files
10.3K
Pattern Hits
2026-10-12
Scan Date
0.02
HC Hit Rate

Risk Review · v3

Use each vector to guide manual verification of the underlying findings.

Cognitive Ownership Risk 17.3/100 · LOW

Can maintainers explain intent, assumptions, and trade-offs? 9163 finding(s).

Hallucinated Dependency & Supply Chain Risk 0.8/100 · LOW

Are imports declared and package/API names verified? 280 finding(s).

Agent Over-Engineering Ratio 9.6/100 · LOW

Are wrappers, guards, and repeated structures necessary? 3219 finding(s).

PR Review Velocity Impact 23.2/100 · LOW

Which changes need focused human review? 10345 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

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.

Severity Breakdown

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.

CRITICAL 0HIGH 78MEDIUM 962LOW 9305

Directory Score Breakdown

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.

Pattern Findings

The scanner identified 10345 distinct pattern matches across 22 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.

Over-Commented Block6540 hits · 6349 pts
SeverityFileLineSnippetContext
LOWCargo.toml521# -----------------------------------------------------------------------------COMMENT
LOWCargo.toml541incremental = falseCOMMENT
LOWdeny.toml41COMMENT
LOWdeny.toml101COMMENT
LOWcrates/lib.rs1// -------------------------------------------------------------------------------------------------COMMENT
LOWcrates/lib.rs21//!COMMENT
LOWcrates/core/build.rs1// -------------------------------------------------------------------------------------------------COMMENT
LOWcrates/core/benches/stack_str_iai.rs1// -------------------------------------------------------------------------------------------------COMMENT
LOWcrates/core/benches/stack_str.rs1// -------------------------------------------------------------------------------------------------COMMENT
LOWcrates/core/benches/concurrent_map.rs1// -------------------------------------------------------------------------------------------------COMMENT
LOWcrates/core/benches/concurrent_map.rs21//! Results (10k reads/thread, barrier-synced, String keys, u64 values):COMMENT
LOWcrates/core/benches/correctness.rs1// -------------------------------------------------------------------------------------------------COMMENT
LOWcrates/core/benches/to_snake_case.rs1// -------------------------------------------------------------------------------------------------COMMENT
LOWcrates/core/benches/decimal_deserialization.rs1// -------------------------------------------------------------------------------------------------COMMENT
LOWcrates/core/benches/nanos_parsing.rs1// -------------------------------------------------------------------------------------------------COMMENT
LOWcrates/core/benches/time.rs1// -------------------------------------------------------------------------------------------------COMMENT
LOWcrates/core/benches/uuid.rs1// -------------------------------------------------------------------------------------------------COMMENT
LOWcrates/core/benches/identifier_comparison.rs1// -------------------------------------------------------------------------------------------------COMMENT
LOWcrates/core/benches/hash_map.rs1// -------------------------------------------------------------------------------------------------COMMENT
LOWcrates/core/benches/datetime.rs1// -------------------------------------------------------------------------------------------------COMMENT
LOWcrates/core/benches/hex.rs1// -------------------------------------------------------------------------------------------------COMMENT
LOWcrates/core/benches/urlencoding.rs1// -------------------------------------------------------------------------------------------------COMMENT
LOWcrates/core/benches/collections.rs1// -------------------------------------------------------------------------------------------------COMMENT
LOWcrates/core/benches/nanos_parsing/corpus.rs1// -------------------------------------------------------------------------------------------------COMMENT
LOWcrates/core/benches/hex/edges.rs1// -------------------------------------------------------------------------------------------------COMMENT
LOWcrates/core/benches/hex/corpus.rs1// -------------------------------------------------------------------------------------------------COMMENT
LOWcrates/core/benches/uuid/corpus.rs1// -------------------------------------------------------------------------------------------------COMMENT
LOWcrates/core/src/consts.rs1// -------------------------------------------------------------------------------------------------COMMENT
LOWcrates/core/src/correctness.rs1// -------------------------------------------------------------------------------------------------COMMENT
LOWcrates/core/src/correctness.rs61 /// A string contained a non-ASCII character.COMMENT
LOWcrates/core/src/correctness.rs201 set_type_repr: String,COMMENT
LOWcrates/core/src/correctness.rs261/// Checks if the string `s` is not empty.COMMENT
LOWcrates/core/src/correctness.rs321COMMENT
LOWcrates/core/src/correctness.rs941 #[case("a")]COMMENT
LOWcrates/core/src/correctness.rs1041 #[rstest]COMMENT
LOWcrates/core/src/correctness.rs1061 assert!(check_string_contains(s, pat, "value").is_err());COMMENT
LOWcrates/core/src/correctness.rs1081 assert_eq!(result, expected);COMMENT
LOWcrates/core/src/correctness.rs1121 #[case(0, 0, "left", "right", true)]COMMENT
LOWcrates/core/src/correctness.rs1201 }COMMENT
LOWcrates/core/src/correctness.rs1301 #[case] param: &str,COMMENT
LOWcrates/core/src/correctness.rs1321 #[case(1.0 + 1e16, 0.0, 1.0, "value")]COMMENT
LOWcrates/core/src/correctness.rs1421 #[rstest]COMMENT
LOWcrates/core/src/correctness.rs1521 #[case] map_name: &str,COMMENT
LOWcrates/core/src/correctness.rs1561 }COMMENT
LOWcrates/core/src/env.rs1// -------------------------------------------------------------------------------------------------COMMENT
LOWcrates/core/src/env.rs41/// Only attempts to read the environment variable when `value` is `None`,COMMENT
LOWcrates/core/src/lib.rs1// -------------------------------------------------------------------------------------------------COMMENT
LOWcrates/core/src/lib.rs21//!COMMENT
LOWcrates/core/src/lib.rs41//! depending on the intended use case, i.e. whether to provide Python bindingsCOMMENT
LOWcrates/core/src/paths.rs1// -------------------------------------------------------------------------------------------------COMMENT
LOWcrates/core/src/paths.rs21///COMMENT
LOWcrates/core/src/interval.rs1// -------------------------------------------------------------------------------------------------COMMENT
LOWcrates/core/src/time.rs1// -------------------------------------------------------------------------------------------------COMMENT
LOWcrates/core/src/time.rs21//! # ModesCOMMENT
LOWcrates/core/src/time.rs61/// Returns a static reference to the global atomic clock in **real-time mode**.COMMENT
LOWcrates/core/src/time.rs81/// Panics if the system time is set before the UNIX epoch.COMMENT
LOWcrates/core/src/time.rs101/// libc-intercepted by madsim and resolves to the same real syscall it wouldCOMMENT
LOWcrates/core/src/time.rs141/// [`AtomicTime`] can act as a real-time clock or static clock based on its mode.COMMENT
LOWcrates/core/src/time.rs181 }COMMENT
LOWcrates/core/src/time.rs221 clippy::cast_precision_loss,COMMENT
6480 more matches not shown…
Decorative Section Separators806 hits · 2454 pts
SeverityFileLineSnippetContext
MEDIUM⚡Cargo.toml504# -----------------------------------------------------------------------------COMMENT
MEDIUM⚡Cargo.toml506# -----------------------------------------------------------------------------COMMENT
MEDIUM⚡Cargo.toml511# -----------------------------------------------------------------------------COMMENT
MEDIUM⚡Cargo.toml521# -----------------------------------------------------------------------------COMMENT
MEDIUM⚡Cargo.toml523# -----------------------------------------------------------------------------COMMENT
MEDIUM⚡Cargo.toml534# -----------------------------------------------------------------------------COMMENT
MEDIUM⚡Cargo.toml544# -----------------------------------------------------------------------------COMMENT
MEDIUM⚡Cargo.toml546# -----------------------------------------------------------------------------COMMENT
MEDIUM⚡Cargo.toml555# -----------------------------------------------------------------------------COMMENT
MEDIUMCargo.toml90# -----------------------------------------------------------------------------COMMENT
MEDIUMCargo.toml94# -----------------------------------------------------------------------------COMMENT
MEDIUMCargo.toml114# -----------------------------------------------------------------------------COMMENT
MEDIUMCargo.toml119# -----------------------------------------------------------------------------COMMENT
MEDIUMCargo.toml329# -----------------------------------------------------------------------------COMMENT
MEDIUMCargo.toml331# -----------------------------------------------------------------------------COMMENT
MEDIUMCargo.toml360# -----------------------------------------------------------------------------COMMENT
MEDIUMCargo.toml362# -----------------------------------------------------------------------------COMMENT
MEDIUMCargo.toml385# -----------------------------------------------------------------------------COMMENT
MEDIUMCargo.toml387# -----------------------------------------------------------------------------COMMENT
MEDIUMCargo.toml398# -----------------------------------------------------------------------------COMMENT
MEDIUMCargo.toml400# -----------------------------------------------------------------------------COMMENT
MEDIUMCargo.toml423# -----------------------------------------------------------------------------COMMENT
MEDIUMCargo.toml425# -----------------------------------------------------------------------------COMMENT
MEDIUM⚡deny.toml4# =============================================================================COMMENT
MEDIUM⚡deny.toml6# =============================================================================COMMENT
MEDIUM⚡deny.toml14# =============================================================================COMMENT
MEDIUM⚡deny.toml16# =============================================================================COMMENT
MEDIUMdeny.toml55# =============================================================================COMMENT
MEDIUMdeny.toml57# =============================================================================COMMENT
MEDIUMdeny.toml109# =============================================================================COMMENT
MEDIUMdeny.toml111# =============================================================================COMMENT
MEDIUMdeny.toml234# =============================================================================COMMENT
MEDIUMdeny.toml236# =============================================================================COMMENT
MEDIUMosv-scanner.toml4# =============================================================================COMMENT
MEDIUMosv-scanner.toml6# =============================================================================COMMENT
MEDIUM⚡crates/core/benches/concurrent_map.rs25//! ┌──────────┬──────────┬──────────┬───────────┐COMMENT
MEDIUM⚡crates/core/benches/concurrent_map.rs27//! ├──────────┼──────────┼──────────┼───────────┤COMMENT
MEDIUM⚡crates/core/benches/concurrent_map.rs30//! └──────────┴──────────┴──────────┴───────────┘COMMENT
MEDIUM⚡crates/core/benches/concurrent_map.rs33//! ┌──────────┬──────────┬──────────┬───────────┐COMMENT
MEDIUM⚡crates/core/benches/concurrent_map.rs35//! ├──────────┼──────────┼──────────┼───────────┤COMMENT
MEDIUM⚡crates/core/benches/concurrent_map.rs39//! └──────────┴──────────┴──────────┴───────────┘COMMENT
MEDIUM⚡crates/core/benches/concurrent_map.rs42//! ┌──────────┬──────────┬──────────┬───────────┐COMMENT
MEDIUM⚡crates/core/benches/concurrent_map.rs44//! ├──────────┼──────────┼──────────┼───────────┤COMMENT
MEDIUM⚡crates/core/benches/concurrent_map.rs48//! └──────────┴──────────┴──────────┴───────────┘COMMENT
MEDIUMcrates/adapters/okx/src/http/query.rs386 // ───────── Both cursors validationCOMMENT
MEDIUMcrates/adapters/okx/src/http/query.rs394 // ───────── Cursor chronological validationCOMMENT
MEDIUMcrates/adapters/okx/src/http/query.rs408 // ───────── Cursor unit (≤ 13 digits ⇒ milliseconds)COMMENT
MEDIUMcrates/adapters/okx/src/http/query.rs421 // ───────── Limit validationCOMMENT
MEDIUM⚡crates/infrastructure/src/redis/mod.rs91/// ┌───────────┬───────────┬────────────────────────────┐COMMENT
MEDIUM⚡crates/infrastructure/src/redis/mod.rs93/// ├───────────┼───────────┼────────────────────────────┤COMMENT
MEDIUM⚡crates/infrastructure/src/redis/mod.rs97/// └───────────┴───────────┴────────────────────────────┘COMMENT
MEDIUMpython/generate_docstrings.py2# -------------------------------------------------------------------------------------------------COMMENT
MEDIUMpython/generate_docstrings.py15# -------------------------------------------------------------------------------------------------COMMENT
MEDIUMpython/generate_stubs.py2# -------------------------------------------------------------------------------------------------COMMENT
MEDIUMpython/generate_stubs.py15# -------------------------------------------------------------------------------------------------COMMENT
MEDIUMpython/nautilus_trader/__init__.py1# -------------------------------------------------------------------------------------------------COMMENT
MEDIUMpython/nautilus_trader/__init__.py14# -------------------------------------------------------------------------------------------------COMMENT
MEDIUMpython/nautilus_trader/_fixup.py1# -------------------------------------------------------------------------------------------------COMMENT
MEDIUMpython/nautilus_trader/_fixup.py14# -------------------------------------------------------------------------------------------------COMMENT
MEDIUMpython/nautilus_trader/core/__init__.py1# -------------------------------------------------------------------------------------------------COMMENT
746 more matches not shown…
Hyper-Verbose Identifiers2311 hits · 2053 pts
SeverityFileLineSnippetContext
LOWMIGRATION_V2.md620 def calculate_from_realized_pnls(self, realized_pnls: list[float]) -> float | None:CODE
LOWcrates/adapters/polymarket/src/positions/wallet.rs42 function predictLegacyWalletAddress(bytes32 id) external view returns (address);CODE
LOWcrates/live/src/python/client/mod.rs2269 def _provides_bulk_position_coverage(self, instrument_id):CODE
LOWpython/generate_stubs.py2542def _fix_optional_defaults_in_line(line: str) -> str:CODE
LOWpython/generate_stubs.py2575def _is_property_setter_decorator(line: str) -> bool:CODE
LOWpython/generate_stubs.py2822def add_missing_model_imports(content: str) -> str:CODE
LOWpython/generate_stubs.py2859def _line_contains_name_to_remove(line: str, names_to_remove: set[str]) -> bool:CODE
LOWpython/generate_stubs.py2925def clean_orphaned_decorators(source: str) -> str:CODE
LOWpython/generate_stubs.py2958def normalize_builtin_type_names(content: str) -> str:CODE
LOWpython/generate_stubs.py3079def _infer_constant_python_type(CODE
LOWpython/generate_stubs.py3157def _insert_constants_after_all(content: str, const_block: str) -> str:CODE
LOWpython/generate_stubs.py594def remove_stale_top_level_adapter_stubs(root: Path) -> None:STRING
LOWpython/generate_stubs.py673def _extract_signature_params_str(attr: str, open_paren: int) -> str:STRING
LOWpython/generate_stubs.py690def _resolve_signature_params(STRING
LOWpython/generate_stubs.py817def collect_rust_class_fixups(workspace_root: Path) -> dict[str, ClassMethodFixup]:STRING
LOWpython/generate_stubs.py887def collect_renamed_enum_variants(workspace_root: Path) -> dict[str, list[str]]:STRING
LOWpython/generate_stubs.py929def collect_rust_enum_variants(lines: list[str], enum_start: int) -> list[str]:STRING
LOWpython/generate_stubs.py1006def renamed_enum_variant_name(STRING
LOWpython/generate_stubs.py1036def normalize_enum_variant_name(name: str) -> str:STRING
LOWpython/generate_stubs.py1043def fix_enum_defaults_in_signatures(content: str, renamed_enums: set[str]) -> str:STRING
LOWpython/generate_stubs.py1070def _replace_forward_local_class_default(STRING
LOWpython/generate_stubs.py1082def elide_forward_class_defaults_in_signatures(content: str) -> str:STRING
LOWpython/generate_stubs.py1130def _collect_pyclass_name_fixups(source: str, fixups: dict[str, ClassMethodFixup]) -> None:STRING
LOWpython/generate_stubs.py1172def _collect_identifier_macro_fixups(source: str, fixups: dict[str, ClassMethodFixup]) -> None:STRING
LOWpython/generate_stubs.py1192def strip_double_quoted_strings(text: str) -> str:STRING
LOWpython/generate_stubs.py1225def _collect_custom_data_macro_fixups(source: str, fixups: dict[str, ClassMethodFixup]) -> None:STRING
LOWpython/generate_stubs.py1265def _collect_struct_field_names(lines: list[str], struct_start: int) -> set[str]:STRING
LOWpython/generate_stubs.py1319def _collect_pyfunction_signature_defaults(STRING
LOWpython/generate_stubs.py1373def _register_free_function_defaults(STRING
LOWpython/generate_stubs.py1393def _collect_block_method_fixups(STRING
LOWpython/generate_stubs.py1472def consume_rust_method_signature(STRING
LOWpython/generate_stubs.py1490def register_rust_method_fixup( # noqa: C901 - Keep Rust method classification in one passSTRING
LOWpython/generate_stubs.py1555def _register_injected_classmethod(STRING
LOWpython/generate_stubs.py1572def register_rust_setter_fixup(STRING
LOWpython/generate_stubs.py1600def _extract_method_signature_defaults(STRING
LOWpython/generate_stubs.py1633def render_missing_staticmethod_stub(STRING
LOWpython/generate_stubs.py1652def render_missing_classmethod_stub(STRING
LOWpython/generate_stubs.py1746def remove_final_from_subclassable_classes(STRING
LOWpython/generate_stubs.py1960def rewrite_stub_method_block(STRING
LOWpython/generate_stubs.py2012def render_stub_property_setter(property_name: str, method_block: list[str]) -> list[str]:STRING
LOWpython/generate_stubs.py2038def drop_stub_method_receiver(signature_text: str) -> str:STRING
LOWpython/generate_stubs.py2121def relocate_classes_from_libnautilus(root: Path) -> None:STRING
LOWpython/nautilus_trader/_fixup.py45def _should_fixup_module_name(CODE
LOWpython/nautilus_trader/core/datetime.py107def _has_more_than_microsecond_precision(value: str) -> bool:CODE
LOWpython/nautilus_trader/analysis/reporter.py81 def generate_order_fills_report(orders: list) -> pd.DataFrame:CODE
LOWpython/nautilus_trader/analysis/reporter.py142 def generate_positions_report(CODE
LOWpython/nautilus_trader/analysis/tearsheet.py116def _format_optional_duration(start_ns: int | None, end_ns: int | None) -> str:CODE
LOWpython/nautilus_trader/analysis/tearsheet.py500def _create_tearsheet_from_result(CODE
LOWpython/nautilus_trader/analysis/tearsheet.py550def _validate_result_node_state(node: BacktestNode, run_config_id: str) -> None:CODE
LOWpython/nautilus_trader/analysis/tearsheet.py645def _resolve_tearsheet_returns(CODE
LOWpython/nautilus_trader/analysis/tearsheet.py668def _calculate_snapshot_returns(CODE
LOWpython/nautilus_trader/analysis/tearsheet.py824def _calculate_account_returns(CODE
LOWpython/nautilus_trader/analysis/tearsheet.py908def _extract_account_balance_series(CODE
LOWpython/nautilus_trader/analysis/tearsheet.py937def _calculate_daily_balance_returns(total_balance: pd.Series) -> pd.Series | None:CODE
LOWpython/nautilus_trader/analysis/tearsheet.py955def _aggregate_period_returns(CODE
LOWpython/nautilus_trader/analysis/tearsheet.py975def create_tearsheet_from_stats(CODE
LOWpython/nautilus_trader/analysis/tearsheet.py1258def create_monthly_returns_heatmap(CODE
LOWpython/nautilus_trader/analysis/tearsheet.py1361def create_returns_distribution(CODE
LOWpython/nautilus_trader/analysis/statistic.py80 def calculate_from_realized_pnls(self, realized_pnls: list[float]) -> float | None:CODE
LOWpython/nautilus_trader/analysis/statistic.py112 def calculate_from_returns_with_benchmark(CODE
2251 more matches not shown…
AI Slop Vocabulary137 hits · 442 pts
SeverityFileLineSnippetContext
MEDIUM⚡Cargo.toml519# Cargo ignores `panic` for bench profile (harness requires unwind to catch failures)COMMENT
MEDIUMcrates/testkit/src/lib.rs19//! file handling, and common testing patterns. This crate supports robust testing workflowsCOMMENT
MEDIUMcrates/backtest/src/config.rs281 /// The default leverage, falling back to 10x for margin accounts and 1x otherwise.COMMENT
MEDIUMcrates/backtest/src/config.rs283 /// The leverage overrides for individual instruments.COMMENT
MEDIUMcrates/backtest/src/config.rs519 /// The account default leverage, or `None` to use the account-type default.COMMENT
MEDIUMcrates/backtest/src/config.rs521 /// The instrument specific leverage configuration (for margin accounts).COMMENT
MEDIUMcrates/backtest/src/config.rs1348 fn test_non_positive_default_leverage_rejected(#[case] leverage: Decimal) {CODE
MEDIUMcrates/backtest/src/config.rs1366 fn test_simulated_non_positive_instrument_leverage_rejected(#[case] leverage: Decimal) {CODE
MEDIUMcrates/backtest/src/config.rs1596 fn test_non_positive_sim_default_leverage_rejected(#[case] leverage: Decimal) {CODE
MEDIUMcrates/adapters/okx/src/config.rs257 /// Enables margin/leverage for SPOT trading when true.COMMENT
MEDIUMcrates/adapters/okx/src/http/client.rs1228 /// Requests position tiers information, maximum leverage depends on your borrowings and margin ratio.COMMENT
MEDIUMcrates/adapters/okx/src/http/models.rs516 /// Maximum available leverage.COMMENT
MEDIUMcrates/adapters/okx/src/http/models.rs644 /// Notional leverage.COMMENT
MEDIUMcrates/adapters/okx/src/http/models.rs711 /// Position leverage.COMMENT
MEDIUMcrates/adapters/okx/src/http/models.rs1240 /// Algo leverage configuration.COMMENT
MEDIUMcrates/adapters/hyperliquid/src/common/models.rs702 /// converting balances and handling the margin account type since Hyperliquid supports leverage.COMMENT
MEDIUMcrates/adapters/hyperliquid/src/common/enums.rs498 // Normalize: trim whitespace and convert to lowercase for robust matchingCOMMENT
MEDIUMcrates/adapters/hyperliquid/src/common/enums.rs572 /// **Deprecated**: This method uses substring matching which is fragile and not robust.COMMENT
MEDIUMcrates/adapters/hyperliquid/src/http/query.rs39 /// Update leverage for an assetCOMMENT
MEDIUMcrates/adapters/hyperliquid/src/http/query.rs82/// Parameters for updating leverage.COMMENT
MEDIUMcrates/adapters/hyperliquid/src/http/query.rs495 /// Creates an action to update leverage for an asset.COMMENT
MEDIUMcrates/adapters/hyperliquid/src/http/query.rs763 assert!(json.contains(r#""leverage":10"#));CODE
MEDIUMcrates/adapters/hyperliquid/src/http/models.rs131 /// Maximum leverage allowed for this asset.COMMENT
MEDIUMcrates/adapters/hyperliquid/src/http/models.rs148 /// Margin tables for leverage tiers.COMMENT
MEDIUMcrates/adapters/hyperliquid/src/http/models.rs164 /// Maximum leverage allowed for this asset.COMMENT
MEDIUMcrates/adapters/hyperliquid/src/http/models.rs181/// Margin table with leverage tiers.COMMENT
MEDIUMcrates/adapters/hyperliquid/src/http/models.rs202 /// Maximum leverage for this tier.COMMENT
MEDIUMcrates/adapters/hyperliquid/src/http/models.rs1894 /// Update leverage for a position.COMMENT
MEDIUMcrates/adapters/hyperliquid/src/http/models.rs1904 #[serde(rename = "leverage")]COMMENT
MEDIUMcrates/adapters/hyperliquid/src/http/models.rs2255 /// Maximum leverage allowed for this asset.COMMENT
MEDIUMcrates/adapters/hyperliquid/src/http/rate_limits.rs177/// We count the largest array in the response (robust to schema variants).COMMENT
MEDIUMcrates/adapters/hyperliquid/src/http/parse.rs133 /// Maximum leverage (for perps).COMMENT
MEDIUMcrates/adapters/coinbase/src/config.rs178 /// Optional default leverage applied to derivatives orders. Ignored onCOMMENT
MEDIUMcrates/adapters/derive/tests/integration/data_client.rs2105 // Wait until the REST call lands on the mock so the test is robustCOMMENT
MEDIUMcrates/adapters/derive/src/http/models.rs780 /// Effective leverage (perps only).COMMENT
MEDIUM⚡crates/adapters/deribit/src/http/models.rs1218 #[case::integer(r#""leverage": 50,"#, Some(dec!(50)))]COMMENT
MEDIUM⚡crates/adapters/deribit/src/http/models.rs1219 #[case::whole_float(r#""leverage": 50.0,"#, Some(dec!(50)))]COMMENT
MEDIUM⚡crates/adapters/deribit/src/http/models.rs1220 #[case::fractional(r#""leverage": 35.639422,"#, Some(dec!(35.639422)))]COMMENT
MEDIUM⚡crates/adapters/deribit/src/http/models.rs1221 #[case::null(r#""leverage": null,"#, None)]COMMENT
MEDIUMcrates/adapters/deribit/src/http/models.rs94 /// Maximal leverage for instrument (only for futures)COMMENT
MEDIUMcrates/adapters/deribit/src/http/models.rs1079 /// Current available leverage for a future position (can be fractional)COMMENT
MEDIUMcrates/adapters/sandbox/src/config.rs63 /// The account default leverage (for margin accounts).COMMENT
MEDIUMcrates/adapters/sandbox/src/config.rs66 /// Per-instrument leverage overrides.COMMENT
MEDIUMcrates/adapters/bybit/src/config.rs254 /// Leverage configuration for futures (symbol -> leverage).COMMENT
MEDIUMcrates/adapters/bybit/src/python/http.rs330 /// Sets leverage for a symbol (requires authentication).COMMENT
MEDIUMcrates/adapters/bybit/src/python/http.rs341 /// - <https://bybit-exchange.github.io/docs/v5/position/leverage>COMMENT
MEDIUM⚡crates/adapters/bybit/src/common/models.rs43/// Common leverage filter that describes leverage bounds and step.COMMENT
MEDIUM⚡crates/adapters/bybit/src/common/models.rs47 /// Minimum leverage supported.COMMENT
MEDIUM⚡crates/adapters/bybit/src/common/models.rs49 /// Maximum leverage supported.COMMENT
MEDIUM⚡crates/adapters/bybit/src/common/models.rs51 /// Step between successive leverage values.COMMENT
MEDIUMcrates/adapters/bybit/src/common/parse.rs1661 /// expects. BBO, `position_idx`, `smp_type`, and leverage stay separate because they areCOMMENT
MEDIUMcrates/adapters/bybit/src/common/rate_limit.rs793 #[case("/v5/position/set-leverage", Some(BybitProductType::Linear), 10)]COMMENT
MEDIUMcrates/adapters/bybit/src/http/client.rs1295 /// Sets leverage for a symbol.COMMENT
MEDIUMcrates/adapters/bybit/src/http/client.rs1310 /// - <https://bybit-exchange.github.io/docs/v5/position/leverage>COMMENT
MEDIUMcrates/adapters/bybit/src/http/client.rs2267 /// Sets leverage for a symbol (requires authentication).COMMENT
MEDIUMcrates/adapters/bybit/src/http/client.rs2278 /// - <https://bybit-exchange.github.io/docs/v5/position/leverage>COMMENT
MEDIUMcrates/adapters/bybit/src/http/query.rs281/// Body parameters for `POST /v5/position/set-leverage`.COMMENT
MEDIUMcrates/adapters/bybit/src/http/query.rs284/// - <https://bybit-exchange.github.io/docs/v5/position/leverage>COMMENT
MEDIUM⚡crates/adapters/bybit/src/http/models.rs1362/// Empty result for set leverage operation.COMMENT
MEDIUM⚡crates/adapters/bybit/src/http/models.rs1366/// Response alias for set leverage requests.COMMENT
77 more matches not shown…
Cross-File Repetition54 hits · 270 pts
SeverityFileLineSnippetContext
HIGHpython/tests/unit/indicators/test_ema.py0test initialized with required inputs returns true.STRING
HIGHpython/tests/unit/indicators/test_zscore.py0test initialized with required inputs returns true.STRING
HIGHpython/tests/unit/indicators/test_atr.py0test initialized with required inputs returns true.STRING
HIGHpython/tests/unit/indicators/test_hma.py0test initialized with required inputs returns true.STRING
HIGHpython/tests/unit/indicators/test_aroon.py0test initialized with required inputs returns true.STRING
HIGHpython/tests/unit/indicators/test_rsi.py0test initialized with required inputs returns true.STRING
HIGHpython/tests/unit/indicators/test_dema.py0test initialized with required inputs returns true.STRING
HIGHpython/tests/unit/indicators/test_rma.py0test initialized with required inputs returns true.STRING
HIGHpython/tests/unit/indicators/test_sma.py0test initialized with required inputs returns true.STRING
HIGHpython/tests/unit/indicators/test_efficiency_ratio.py0test initialized with required inputs returns true.STRING
HIGHpython/tests/unit/indicators/test_ema.py0test value with three inputs returns expected value.STRING
HIGHpython/tests/unit/indicators/test_hma.py0test value with three inputs returns expected value.STRING
HIGHpython/tests/unit/indicators/test_dema.py0test value with three inputs returns expected value.STRING
HIGHpython/tests/unit/indicators/test_rma.py0test value with three inputs returns expected value.STRING
HIGHpython/tests/unit/indicators/test_sma.py0test value with three inputs returns expected value.STRING
HIGHpython/tests/unit/indicators/test_ema.py0test reset successfully returns indicator to fresh state.STRING
HIGHpython/tests/unit/indicators/test_zscore.py0test reset successfully returns indicator to fresh state.STRING
HIGHpython/tests/unit/indicators/test_atr.py0test reset successfully returns indicator to fresh state.STRING
HIGHpython/tests/unit/indicators/test_hma.py0test reset successfully returns indicator to fresh state.STRING
HIGHpython/tests/unit/indicators/test_aroon.py0test reset successfully returns indicator to fresh state.STRING
HIGHpython/tests/unit/indicators/test_rsi.py0test reset successfully returns indicator to fresh state.STRING
HIGHpython/tests/unit/indicators/test_dema.py0test reset successfully returns indicator to fresh state.STRING
HIGHpython/tests/unit/indicators/test_rma.py0test reset successfully returns indicator to fresh state.STRING
HIGHpython/tests/unit/indicators/test_sma.py0test reset successfully returns indicator to fresh state.STRING
HIGHpython/tests/unit/indicators/test_efficiency_ratio.py0test reset successfully returns indicator to fresh state.STRING
HIGHpython/tests/unit/live/test_client_config.py0retain the component inputs without starting asynchronous work.STRING
HIGHpython/tests/integration/test_python_data_client.py0retain the component inputs without starting asynchronous work.STRING
HIGH…thon/tests/integration/test_python_adapter_template.py0retain the component inputs without starting asynchronous work.STRING
HIGHpython/tests/unit/live/test_client_config.py0construct clients for the deterministic live scenario.STRING
HIGHpython/tests/integration/test_python_data_client.py0construct clients for the deterministic live scenario.STRING
HIGHexamples/live/_template/factories.py0construct clients for the deterministic live scenario.STRING
HIGHpython/tests/unit/model/test_mark_price.py0test bar setstate rejects invalid state without mutation.STRING
HIGHpython/tests/unit/model/test_index_price.py0test bar setstate rejects invalid state without mutation.STRING
HIGHpython/tests/unit/model/test_trade.py0test bar setstate rejects invalid state without mutation.STRING
HIGHpython/tests/unit/model/test_quote.py0test bar setstate rejects invalid state without mutation.STRING
HIGHpython/tests/unit/model/test_bar.py0test bar setstate rejects invalid state without mutation.STRING
HIGHexamples/live/okx/exec_tester.py0test binance spot execution with the built-in exectester strategy. warning: this example connects to binance and places STRING
HIGHexamples/live/hyperliquid/exec_tester.py0test binance spot execution with the built-in exectester strategy. warning: this example connects to binance and places STRING
HIGHexamples/live/coinbase/exec_tester.py0test binance spot execution with the built-in exectester strategy. warning: this example connects to binance and places STRING
HIGHexamples/live/bybit/exec_tester.py0test binance spot execution with the built-in exectester strategy. warning: this example connects to binance and places STRING
HIGHexamples/live/dydx/exec_tester.py0test binance spot execution with the built-in exectester strategy. warning: this example connects to binance and places STRING
HIGHexamples/live/kraken/exec_tester.py0test binance spot execution with the built-in exectester strategy. warning: this example connects to binance and places STRING
HIGHexamples/live/binance/exec_tester.py0test binance spot execution with the built-in exectester strategy. warning: this example connects to binance and places STRING
HIGHexamples/live/architect_ax/exec_tester.py0test deribit execution with the built-in exectester strategy. this example connects to the deribit testnet and places liSTRING
HIGHexamples/live/derive/exec_tester.py0test deribit execution with the built-in exectester strategy. this example connects to the deribit testnet and places liSTRING
HIGHexamples/live/deribit/exec_tester.py0test deribit execution with the built-in exectester strategy. this example connects to the deribit testnet and places liSTRING
HIGHexamples/live/hyperliquid/data_tester.py0stream kraken market data with the built-in datatester actor. running this example connects to kraken and starts subscriSTRING
HIGHexamples/live/coinbase/data_tester.py0stream kraken market data with the built-in datatester actor. running this example connects to kraken and starts subscriSTRING
HIGHexamples/live/polymarket/data_tester.py0stream kraken market data with the built-in datatester actor. running this example connects to kraken and starts subscriSTRING
HIGHexamples/live/derive/data_tester.py0stream kraken market data with the built-in datatester actor. running this example connects to kraken and starts subscriSTRING
HIGHexamples/live/deribit/data_tester.py0stream kraken market data with the built-in datatester actor. running this example connects to kraken and starts subscriSTRING
HIGHexamples/live/bybit/data_tester.py0stream kraken market data with the built-in datatester actor. running this example connects to kraken and starts subscriSTRING
HIGHexamples/live/dydx/data_tester.py0stream kraken market data with the built-in datatester actor. running this example connects to kraken and starts subscriSTRING
HIGHexamples/live/kraken/data_tester.py0stream kraken market data with the built-in datatester actor. running this example connects to kraken and starts subscriSTRING
Unused Imports254 hits · 232 pts
SeverityFileLineSnippetContext
LOWpython/generate_docstrings.py34CODE
LOWpython/generate_stubs.py26CODE
LOWpython/nautilus_trader/__init__.py26CODE
LOWpython/nautilus_trader/core/__init__.py20CODE
LOWpython/nautilus_trader/core/__init__.py21CODE
LOWpython/nautilus_trader/core/__init__.py22CODE
LOWpython/nautilus_trader/core/datetime.py19CODE
LOWpython/nautilus_trader/core/datetime.py26CODE
LOWpython/nautilus_trader/core/datetime.py27CODE
LOWpython/nautilus_trader/core/datetime.py28CODE
LOWpython/nautilus_trader/core/datetime.py29CODE
LOWpython/nautilus_trader/core/datetime.py30CODE
LOWpython/nautilus_trader/core/datetime.py31CODE
LOWpython/nautilus_trader/core/datetime.py32CODE
LOWpython/nautilus_trader/core/datetime.py33CODE
LOWpython/nautilus_trader/core/datetime.py34CODE
LOWpython/nautilus_trader/core/datetime.py35CODE
LOWpython/nautilus_trader/analysis/themes.py19CODE
LOWpython/nautilus_trader/analysis/config.py19CODE
LOWpython/nautilus_trader/analysis/reporter.py23CODE
LOWpython/nautilus_trader/analysis/__init__.py21CODE
LOWpython/nautilus_trader/analysis/__init__.py27CODE
LOWpython/nautilus_trader/analysis/__init__.py28CODE
LOWpython/nautilus_trader/analysis/__init__.py31CODE
LOWpython/nautilus_trader/analysis/__init__.py32CODE
LOWpython/nautilus_trader/analysis/__init__.py33CODE
LOWpython/nautilus_trader/analysis/__init__.py34CODE
LOWpython/nautilus_trader/analysis/__init__.py35CODE
LOWpython/nautilus_trader/analysis/__init__.py36CODE
LOWpython/nautilus_trader/analysis/__init__.py37CODE
LOWpython/nautilus_trader/analysis/__init__.py40CODE
LOWpython/nautilus_trader/analysis/__init__.py43CODE
LOWpython/nautilus_trader/analysis/__init__.py44CODE
LOWpython/nautilus_trader/analysis/__init__.py45CODE
LOWpython/nautilus_trader/analysis/__init__.py48CODE
LOWpython/nautilus_trader/analysis/__init__.py49CODE
LOWpython/nautilus_trader/analysis/__init__.py50CODE
LOWpython/nautilus_trader/analysis/__init__.py51CODE
LOWpython/nautilus_trader/analysis/__init__.py52CODE
LOWpython/nautilus_trader/analysis/__init__.py53CODE
LOWpython/nautilus_trader/analysis/__init__.py56CODE
LOWpython/nautilus_trader/analysis/__init__.py59CODE
LOWpython/nautilus_trader/analysis/__init__.py60CODE
LOWpython/nautilus_trader/analysis/__init__.py61CODE
LOWpython/nautilus_trader/analysis/__init__.py64CODE
LOWpython/nautilus_trader/analysis/__init__.py65CODE
LOWpython/nautilus_trader/analysis/__init__.py66CODE
LOWpython/nautilus_trader/analysis/__init__.py67CODE
LOWpython/nautilus_trader/analysis/__init__.py68CODE
LOWpython/nautilus_trader/analysis/__init__.py69CODE
LOWpython/nautilus_trader/analysis/__init__.py70CODE
LOWpython/nautilus_trader/analysis/__init__.py71CODE
LOWpython/nautilus_trader/analysis/tearsheet.py23CODE
LOWpython/nautilus_trader/analysis/statistic.py19CODE
LOWpython/nautilus_trader/config/__init__.py22CODE
LOWpython/nautilus_trader/config/__init__.py23CODE
LOWpython/nautilus_trader/config/__init__.py24CODE
LOWpython/nautilus_trader/config/__init__.py25CODE
LOWpython/nautilus_trader/config/__init__.py26CODE
LOWpython/nautilus_trader/config/__init__.py27CODE
194 more matches not shown…
Magic Placeholder Names14 hits · 72 pts
SeverityFileLineSnippetContext
HIGHcrates/adapters/tardis/bin/example_replay.rs24// -e "TM_API_KEY=YOUR_API_KEY" \COMMENT
HIGHcrates/adapters/binance/README.md51export BINANCE_API_KEY="your-api-key-from-binance"CODE
HIGHdocs/how_to/run_rust_live_trading.md123export OKX_API_KEY="your_api_key"CODE
HIGHdocs/integrations/binance.md1438export BINANCE_API_KEY="your-api-key-from-binance"CODE
HIGHdocs/integrations/binance.md1534 api_key="YOUR_API_KEY",CODE
HIGHdocs/integrations/bybit.md113 api_key="YOUR_API_KEY",CODE
HIGHdocs/integrations/bybit.md560 api_key="YOUR_API_KEY",CODE
HIGHdocs/integrations/bybit.md740 api_key="YOUR_API_KEY",CODE
HIGHdocs/integrations/kraken.md817 api_key="YOUR_API_KEY",CODE
HIGHdocs/integrations/kraken.md850 api_key="YOUR_API_KEY",CODE
HIGHdocs/integrations/okx.md1179export OKX_API_KEY="your_api_key"CODE
HIGHdocs/integrations/coinbase.md143 api_key="YOUR_API_KEY",CODE
HIGHdocs/tutorials/delta_neutral_options_bybit.md34export BYBIT_API_KEY="your-api-key"CODE
HIGHdocs/tutorials/gold_book_imbalance_ax.md82export DATABENTO_API_KEY="your-api-key"CODE
Deep Nesting73 hits · 60 pts
SeverityFileLineSnippetContext
LOWpython/generate_docstrings.py117CODE
LOWpython/generate_docstrings.py209CODE
LOWpython/generate_docstrings.py396CODE
LOWpython/generate_stubs.py451CODE
LOWpython/generate_stubs.py673CODE
LOWpython/generate_stubs.py734CODE
LOWpython/generate_stubs.py845CODE
LOWpython/generate_stubs.py1130CODE
LOWpython/generate_stubs.py1192CODE
LOWpython/generate_stubs.py1350CODE
LOWpython/generate_stubs.py1446CODE
LOWpython/generate_stubs.py1490CODE
LOWpython/generate_stubs.py2250CODE
LOWpython/generate_stubs.py2465CODE
LOWpython/generate_stubs.py2487CODE
LOWpython/generate_stubs.py2510CODE
LOWpython/generate_stubs.py2526CODE
LOWpython/generate_stubs.py2694CODE
LOWpython/generate_stubs.py2730CODE
LOWpython/generate_stubs.py2760CODE
LOWpython/generate_stubs.py3079CODE
LOWpython/generate_stubs.py3242CODE
LOWpython/nautilus_trader/analysis/tearsheet.py596CODE
LOWpython/nautilus_trader/analysis/tearsheet.py2473CODE
LOWpython/tests/unit/test_generate_stubs.py1974CODE
LOWpython/tests/unit/test_generate_stubs.py2128CODE
LOWpython/tests/unit/test_generate_stubs.py2824CODE
LOWpython/tests/unit/test_generate_stubs.py3316CODE
LOWpython/tests/unit/test_generate_stubs.py3390CODE
LOWpython/tests/unit/test_public_module_names.py67CODE
LOWpython/tests/unit/analysis/test_reporter.py369CODE
LOWpython/tests/unit/indicators/test_python_handlers.py65CODE
LOW…sts/unit/adapters/polymarket/test_polymarket_loader.py122CODE
LOWpython/tests/unit/live/test_client_runtime_stress.py82CODE
LOWpython/tests/integration/test_live_node_uvicorn.py63CODE
LOWpython/tests/integration/test_live_node_uvicorn.py71CODE
LOWpython/tests/integration/test_python_data_client.py1085CODE
LOWpython/tests/integration/test_python_data_client.py1451CODE
LOW…thon/tests/integration/test_python_adapter_template.py871CODE
LOW…thon/tests/integration/test_python_adapter_template.py882CODE
LOWpython/tests/strategies/backtest_surface.py121CODE
LOWpython/tests/strategies/backtest_surface.py323CODE
LOWpython/tests/acceptance/test_backtest.py1395CODE
LOW.pre-commit-hooks/check_dependency_features.py273CODE
LOW.pre-commit-hooks/check_actionlint.py35CODE
LOW.pre-commit-hooks/check_actionlint.py60CODE
LOW.pre-commit-hooks/check_pyo3_names.py39CODE
LOW.pre-commit-hooks/check_pyo3_names.py111CODE
LOWpatches/pyo3-stub-gen/src/docgen/sphinx_ext.py19CODE
LOWpatches/pyo3-stub-gen/src/docgen/sphinx_ext.py158CODE
LOWpatches/pyo3-stub-gen/src/docgen/sphinx_ext.py272CODE
LOWpatches/pyo3-stub-gen/src/docgen/sphinx_ext.py313CODE
LOWpatches/pyo3-stub-gen/src/docgen/sphinx_ext.py410CODE
LOWpatches/pyo3-stub-gen/src/docgen/sphinx_ext.py583CODE
LOWpatches/pyo3-stub-gen/src/docgen/sphinx_ext.py609CODE
LOWpatches/pyo3-stub-gen/src/docgen/sphinx_ext.py32CODE
LOWpatches/pyo3-stub-gen/src/docgen/sphinx_ext.py1115CODE
LOWpatches/pyo3-stub-gen/src/docgen/sphinx_ext.py1147CODE
LOWpatches/pyo3-stub-gen/src/docgen/sphinx_ext.py1252CODE
LOWdocs/tutorials/orderbook_data.py170CODE
13 more matches not shown…
Cross-Language Confusion7 hits · 50 pts
SeverityFileLineSnippetContext
HIGHpython/tests/unit/analysis/test_reporter.py422 assert orders.equals(expected)CODE
HIGH⚡python/tests/unit/backtest/test_backtest_node.py961 assert orders_report.equals(ReportProvider.generate_orders_report(orders))CODE
HIGH⚡python/tests/unit/backtest/test_backtest_node.py962 assert order_fills_report.equals(ReportProvider.generate_order_fills_report(orders))CODE
HIGH⚡python/tests/unit/backtest/test_backtest_node.py963 assert fills_report.equals(ReportProvider.generate_fills_report(orders))CODE
HIGH⚡python/tests/unit/backtest/test_backtest_node.py964 assert positions_report.equals(CODE
HIGH⚡python/tests/unit/backtest/test_backtest_node.py967 assert account_report.equals(ReportProvider.generate_account_report(account))CODE
HIGH⚡python/tests/unit/backtest/test_backtest_node.py968 assert account_report_by_id.equals(account_report)CODE
Verbosity Indicators25 hits · 50 pts
SeverityFileLineSnippetContext
LOW⚡crates/network/src/websocket/auth.rs801 // Step 1: Begin authenticationCOMMENT
LOW⚡crates/network/src/websocket/auth.rs804 // Step 2: Spawn resubscription task that waits for authCOMMENT
LOW⚡crates/adapters/okx/src/websocket/client.rs4849 client.subscriptions_state.confirm_unsubscribe(topic); // Step 1: clear pending_unsubscribeCODE
LOW⚡crates/adapters/okx/src/websocket/client.rs4850 client.subscriptions_state.mark_subscribe(topic); // Step 2: mark as subscribingCODE
LOW⚡crates/adapters/okx/src/websocket/client.rs4851 client.subscriptions_state.confirm_subscribe(topic); // Step 3: confirm subscriptionCODE
LOW⚡crates/adapters/hyperliquid/src/signing/signers.rs139 // Step 4: Create Agent structCOMMENT
LOW⚡crates/adapters/hyperliquid/src/signing/signers.rs147 // Step 5: Sign Agent with EIP-712COMMENT
LOW⚡crates/adapters/polymarket/src/websocket/dispatch.rs5629 // Step 1: Dispatch cancel (simulates message A from the bug)COMMENT
LOW⚡crates/adapters/polymarket/src/websocket/dispatch.rs5639 // Step 2: Dispatch trade fill (simulates trade arriving after cancel)COMMENT
LOWcrates/adapters/polymarket/src/execution/responses.rs3640 // Step 1: the WS taker trade arrives BEFORE the submit response. The order is not yetCOMMENT
LOWcrates/adapters/polymarket/src/execution/responses.rs3673 // Step 2: the submit response arrives, registers the order, and drains the buffered fillCOMMENT
LOWcrates/adapters/polymarket/src/execution/responses.rs3789 // Step 1: the WS cancel arrives BEFORE the submit response and buffers (order unregistered)COMMENT
LOWcrates/adapters/polymarket/src/execution/responses.rs3813 // Step 2: the submit response registers the order and drains the buffered cancelCOMMENT
LOW⚡crates/adapters/blockchain/src/data/subscription.rs1252 // Step 1: Register DEXCOMMENT
LOW⚡crates/adapters/blockchain/src/data/subscription.rs1262 // Step 2: Subscribe to eventsCOMMENT
LOW⚡crates/adapters/blockchain/src/data/subscription.rs1268 // Step 3: Verify subscriptionsCOMMENT
LOW⚡crates/adapters/blockchain/src/data/subscription.rs1274 // Step 4: Get event signaturesCOMMENT
LOW⚡crates/adapters/blockchain/src/data/subscription.rs1278 // Step 5: Unsubscribe from some eventsCOMMENT
LOW⚡crates/adapters/blockchain/src/data/subscription.rs1282 // Step 6: Verify remaining subscriptions (only pool1 mint remains)COMMENT
LOW⚡…ples/other/minimal_reproducible_example/run_example.py132 # Step 2: Define exchange and add it to the engineCOMMENT
LOW⚡…ples/other/minimal_reproducible_example/run_example.py147 # Step 3: Create instrument definition and add it to the engineCOMMENT
LOW⚡…ples/other/minimal_reproducible_example/run_example.py172 # Step 5: Create strategy and add it to the engineCOMMENT
LOW⚡…ples/other/minimal_reproducible_example/run_example.py176 # Step 6: Run engine = Run backtestCOMMENT
LOW⚡…ples/other/minimal_reproducible_example/run_example.py179 # Step 7: Release system resourcesCOMMENT
LOW…ples/other/minimal_reproducible_example/run_example.py118 # Step 1: Configure and create backtest engineCOMMENT
Structural Annotation Overuse25 hits · 50 pts
SeverityFileLineSnippetContext
LOW⚡crates/network/src/websocket/auth.rs801 // Step 1: Begin authenticationCOMMENT
LOW⚡crates/network/src/websocket/auth.rs804 // Step 2: Spawn resubscription task that waits for authCOMMENT
LOW⚡crates/adapters/okx/src/websocket/client.rs4849 client.subscriptions_state.confirm_unsubscribe(topic); // Step 1: clear pending_unsubscribeCODE
LOW⚡crates/adapters/okx/src/websocket/client.rs4850 client.subscriptions_state.mark_subscribe(topic); // Step 2: mark as subscribingCODE
LOW⚡crates/adapters/okx/src/websocket/client.rs4851 client.subscriptions_state.confirm_subscribe(topic); // Step 3: confirm subscriptionCODE
LOW⚡crates/adapters/hyperliquid/src/signing/signers.rs139 // Step 4: Create Agent structCOMMENT
LOW⚡crates/adapters/hyperliquid/src/signing/signers.rs147 // Step 5: Sign Agent with EIP-712COMMENT
LOW⚡crates/adapters/polymarket/src/websocket/dispatch.rs5629 // Step 1: Dispatch cancel (simulates message A from the bug)COMMENT
LOW⚡crates/adapters/polymarket/src/websocket/dispatch.rs5639 // Step 2: Dispatch trade fill (simulates trade arriving after cancel)COMMENT
LOWcrates/adapters/polymarket/src/execution/responses.rs3640 // Step 1: the WS taker trade arrives BEFORE the submit response. The order is not yetCOMMENT
LOWcrates/adapters/polymarket/src/execution/responses.rs3673 // Step 2: the submit response arrives, registers the order, and drains the buffered fillCOMMENT
LOWcrates/adapters/polymarket/src/execution/responses.rs3789 // Step 1: the WS cancel arrives BEFORE the submit response and buffers (order unregistered)COMMENT
LOWcrates/adapters/polymarket/src/execution/responses.rs3813 // Step 2: the submit response registers the order and drains the buffered cancelCOMMENT
LOW⚡crates/adapters/blockchain/src/data/subscription.rs1252 // Step 1: Register DEXCOMMENT
LOW⚡crates/adapters/blockchain/src/data/subscription.rs1262 // Step 2: Subscribe to eventsCOMMENT
LOW⚡crates/adapters/blockchain/src/data/subscription.rs1268 // Step 3: Verify subscriptionsCOMMENT
LOW⚡crates/adapters/blockchain/src/data/subscription.rs1274 // Step 4: Get event signaturesCOMMENT
LOW⚡crates/adapters/blockchain/src/data/subscription.rs1278 // Step 5: Unsubscribe from some eventsCOMMENT
LOW⚡crates/adapters/blockchain/src/data/subscription.rs1282 // Step 6: Verify remaining subscriptions (only pool1 mint remains)COMMENT
LOW⚡…ples/other/minimal_reproducible_example/run_example.py132 # Step 2: Define exchange and add it to the engineCOMMENT
LOW⚡…ples/other/minimal_reproducible_example/run_example.py147 # Step 3: Create instrument definition and add it to the engineCOMMENT
LOW⚡…ples/other/minimal_reproducible_example/run_example.py172 # Step 5: Create strategy and add it to the engineCOMMENT
LOW⚡…ples/other/minimal_reproducible_example/run_example.py176 # Step 6: Run engine = Run backtestCOMMENT
LOW⚡…ples/other/minimal_reproducible_example/run_example.py179 # Step 7: Release system resourcesCOMMENT
LOW…ples/other/minimal_reproducible_example/run_example.py118 # Step 1: Configure and create backtest engineCOMMENT
Self-Referential Comments16 hits · 45 pts
SeverityFileLineSnippetContext
MEDIUMpython/generate_stubs.py53# This file is automatically generated by pyo3_stub_genCOMMENT
MEDIUMpython/tests/unit/test_public_module_names.py30GENERATED_HEADER = "# This file is automatically generated by pyo3_stub_gen"CODE
MEDIUM.pre-commit-hooks/cargo_fmt_stable.sh11# Create an empty rustfmt.toml in the temp directoryCOMMENT
MEDIUMpatches/pyo3-stub-gen/src/generate/module.rs53 writeln!(f, "# This file is automatically generated by pyo3_stub_gen")?;CODE
MEDIUMpatches/pyo3-stub-gen/src/generate/module.rs311 writeln!(f, "# This file is automatically generated by pyo3_stub_gen")?;CODE
MEDIUMpatches/pyo3-stub-gen/src/docgen/sphinx_ext.py988 # Create a list item with a referenceCOMMENT
MEDIUMpatches/pyo3-stub-gen/src/docgen/sphinx_ext.py995 # Create a reference to the submodule's documentation pageCOMMENT
MEDIUMpatches/pyo3-stub-gen/src/docgen/sphinx_ext.py1074 # Create a single bullet list for all submodulesCOMMENT
MEDIUMpatches/pyo3-stub-gen/src/docgen/sphinx_ext.py1209 # Create a single bullet list for all submodulesCOMMENT
MEDIUMdocs/how_to/data_catalog_databento.py117# Create a catalog instanceCOMMENT
MEDIUMdocs/tutorials/orderbook_imbalance.py4# Define the reusable order book imbalance strategy used by the Binance and BybitCOMMENT
MEDIUMdocs/tutorials/ema_cross.py4# Define the reusable bar-based EMA cross strategy used by the FX bars tutorial.COMMENT
MEDIUMdocs/tutorials/backtest_orderbook_binance.py153# Define the instrument with the public model API, then convert each loader rowCOMMENT
MEDIUMdocs/getting_started/backtest_high_level.py126# Create a catalog instanceCOMMENT
MEDIUMdocs/getting_started/quickstart.py143# Create a EUR/USD instrument on the SIM venueCOMMENT
MEDIUMscripts/install-capnp.sh53 # Create a temp directory with cleanup trapCOMMENT
Modern Structural Boilerplate36 hits · 36 pts
SeverityFileLineSnippetContext
LOWpython/nautilus_trader/core/datetime.py42__all__ = [CODE
LOWpython/nautilus_trader/config/__init__.py60__all__ = [CODE
LOWpython/nautilus_trader/testkit/providers.py63__all__ = [CODE
LOWpython/nautilus_trader/adapters/okx/__init__.py23__all__ = [CODE
LOW…thon/nautilus_trader/adapters/architect_ax/__init__.py25__all__ = [CODE
LOWpython/nautilus_trader/adapters/hyperliquid/__init__.py23__all__ = [CODE
LOW…utilus_trader/adapters/interactive_brokers/__init__.py25__all__ = [CODE
LOWpython/nautilus_trader/adapters/coinbase/__init__.py23__all__ = [CODE
LOWpython/nautilus_trader/adapters/polymarket/__init__.py25__all__ = [CODE
LOWpython/nautilus_trader/adapters/derive/__init__.py23__all__ = [CODE
LOWpython/nautilus_trader/adapters/blockchain/__init__.py25__all__ = [CODE
LOWpython/nautilus_trader/adapters/tardis/__init__.py23__all__ = [CODE
LOWpython/nautilus_trader/adapters/deribit/__init__.py25__all__ = [CODE
LOWpython/nautilus_trader/adapters/sandbox/__init__.py25__all__ = [CODE
LOWpython/nautilus_trader/adapters/bybit/__init__.py25__all__ = [CODE
LOWpython/nautilus_trader/adapters/betfair/__init__.py25__all__ = [CODE
LOWpython/nautilus_trader/adapters/dydx/__init__.py25__all__ = [CODE
LOWpython/nautilus_trader/adapters/kraken/__init__.py25__all__ = [CODE
LOWpython/nautilus_trader/adapters/lighter/__init__.py23__all__ = [CODE
LOWpython/nautilus_trader/adapters/databento/__init__.py23__all__ = [CODE
LOWpython/nautilus_trader/adapters/binance/__init__.py28__all__ = [CODE
LOWpython/tests/providers.py35__all__ = [CODE
LOW⚡python/tests/unit/test_generate_stubs.py1561__all__ = ["BINANCE", "MissingSymbol"]CODE
LOW⚡python/tests/unit/test_generate_stubs.py1567__all__ = ["BINANCE"]CODE
LOWpython/tests/unit/test_generate_stubs.py938 def set_actor_id(self, actor_id: model.ActorId | None = ...) -> None: ...CODE
LOWpython/tests/unit/test_generate_stubs.py1506__all__ = [CODE
LOWpython/tests/unit/test_generate_stubs.py1515__all__ = [CODE
LOWpython/tests/unit/test_generate_stubs.py1617__all__ = [CODE
LOWpython/tests/unit/test_generate_stubs.py1639__all__ = [CODE
LOWpython/tests/unit/test_generate_stubs.py178__all__ = [STRING
LOWpython/tests/unit/test_generate_stubs.py216__all__ = ["TearsheetConfig"]STRING
LOWpython/tests/integration/test_live_node_cache.py103 def set_saved_state(cls, saved_state: dict[str, bytes]) -> None:CODE
LOWpython/tests/integration/test_live_node_cache.py132 def set_saved_state(cls, saved_state: dict[str, bytes]) -> None:CODE
LOWpython/tests/strategies/backtest_surface.py206 def _update_bar_state(self, bar: Bar) -> None:CODE
LOWpython/tests/strategies/acceptance.py661 def _update_indicators(self, bar: Bar) -> None:CODE
LOWexamples/live/interactive_brokers/_common.py484def set_databento_request_contracts_default() -> None:CODE
Redundant / Tautological Comments20 hits · 28 pts
SeverityFileLineSnippetContext
LOWpython/generate_stubs.py2111 # Check if D401 is already in the headerSTRING
LOW.pre-commit-hooks/check_non_latin_text.sh7# Check if perl is availableCOMMENT
LOW.pre-commit-hooks/check_tokio_usage.sh54 # Check if tokio appears as a regular dependency (not in [dev-dependencies])COMMENT
LOW.pre-commit-hooks/check_tokio_usage.sh104 # Check if it's Duration specifically (should use std::time::Duration)COMMENT
LOW.pre-commit-hooks/check_nautilus_conventions.sh72 # Check if allow marker in context or current lineCOMMENT
LOW.pre-commit-hooks/check_cargo_conventions.sh524 # Check if the order is correct: rlib before staticlib before cdylibCOMMENT
LOW.pre-commit-hooks/check_cargo_conventions.sh558 # Check if any crate uses this dependency with workspace = trueCOMMENT
LOW.pre-commit-hooks/check_cargo_conventions.sh675 # Check if used by core crates (not in adapters/)COMMENT
LOW.pre-commit-hooks/check_logging_conventions.sh46 # Read file and accumulate multi-line use statementsCOMMENT
LOW.pre-commit-hooks/check_logging_conventions.sh66 # Check if statement is complete (ends with semicolon)COMMENT
LOW.pre-commit-hooks/check_logging_conventions.sh71 # Check if normalized statement contains a forbidden macro as a wordCOMMENT
LOWpatches/pyo3-stub-gen/src/docgen/sphinx_ext.py60 # Check if it's a qualified external typeCOMMENT
LOWpatches/pyo3-stub-gen/src/docgen/sphinx_ext.py75 # Check if it's py:data or py:class in typing moduleCOMMENT
LOWpatches/pyo3-stub-gen/src/docgen/sphinx_ext.py198 # Check if this is a union type by looking for '|' in displayCOMMENT
LOW…ssets/backtest_book_imbalance_betfair/render_panels.py8 # Set LOG_INTERVAL to 200 in crates/adapters/betfair/examples/betfair_backtest.rsSTRING
LOWscripts/regen-capnp.sh35# Check if capnp is installedCOMMENT
LOWscripts/regen-capnp.sh111# Check if there are any changesCOMMENT
LOWscripts/install-capnp.sh44 # Check if already installed to save timeCOMMENT
LOWscripts/install-capnp.sh90 # Check if already installed with correct versionCOMMENT
LOWscripts/ci/install-nautilus-cli.sh45# Check if forced to build from sourceCOMMENT
Example Usage Blocks7 hits · 10 pts
SeverityFileLineSnippetContext
LOWcrates/adapters/lighter/fuzz/pornin/grind.sh7# Usage:COMMENT
LOWscripts/regen-capnp.sh12# Usage:COMMENT
LOWscripts/purge-orphan-dev-wheels.sh10# Usage:COMMENT
LOWscripts/curate-dataset.sh10# Usage:COMMENT
LOWscripts/ci/publish-release-checksums.sh4# Usage:COMMENT
LOWscripts/ci/publish-cargo-crates.sh4# Usage:COMMENT
LOWscripts/ci/verify-published-registries.bash4# Usage:COMMENT
Empty Error Handlers2 hits · 10 pts
SeverityFileLineSnippetContext
HIGHpython/nautilus_trader/live/config.py197except (TypeError, ValueError, InvalidOperation):CODE
HIGHscripts/clippy-strict-audit.py154except ValueError:CODE
Synthetic Comment Markers1 hit · 8 pts
SeverityFileLineSnippetContext
HIGH…es/adapters/betfair/tests/integration/stream_client.rs1039/// venue partitions matched orders by strategy ref / account id as requested.COMMENT
Fake / Example Data5 hits · 6 pts
SeverityFileLineSnippetContext
LOW…tes/adapters/polymarket/tests/integration/positions.rs980 client = polymarket.PolymarketPositionClient(private_key=private_key, funder=wallet, relayer_api_key='dummy-key', reCODE
LOWcrates/adapters/derive/src/execution.rs6276 assert!(msg.contains("placeholder"), "unexpected error: {msg}",);CODE
LOW…ters/deribit/test_data/http_get_account_summaries.json6 "email": "user@example.com",CODE
LOW…test_data/http_get_account_summaries_cross_margin.json6 "email": "user@example.com",CODE
LOWcrates/common/src/messages/system/socket.rs258 #[case("user@example.com")]COMMENT
AI Structural Patterns6 hits · 6 pts
SeverityFileLineSnippetContext
LOWpython/nautilus_trader/analysis/tearsheet.py366CODE
LOWpython/nautilus_trader/analysis/tearsheet.py975CODE
LOWpython/nautilus_trader/persistence/catalog_to_df.py62CODE
LOWpython/tests/unit/model/factories.py188CODE
LOWpython/tests/unit/model/test_position.py58CODE
LOWpython/tests/strategies/acceptance.py481CODE
Slop Phrases1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMcrates/adapters/blockchain/examples/node_data_tester.rs53// IMPORTANT: The actor definitions below are EXAMPLE CODE for demonstration purposes.COMMENT
Modern AI Meta-Vocabulary1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMcrates/adapters/lighter/src/signing/tx/encode.rs566 // the assertion fail loudly on the test scaffold rather than producingCOMMENT
Excessive Try-Catch Wrapping4 hits · 3 pts
SeverityFileLineSnippetContext
MEDIUMpython/generate_stubs.py305 print(f"Error: {result.stderr}")STRING
LOWpython/tests/unit/test_generate_stubs.py3543 except Exception: # noqa: S112STRING
LOWpython/tests/unit/analysis/test_tearsheet.py941 except Exception as e:CODE
LOWpatches/pyo3-stub-gen/src/docgen/sphinx_ext.py383 except Exception:CODE