Repository Analysis

nautechsystems/nautilus_trader

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

13.3 Low AI signal View on GitHub
13.3
Adjusted Score
13.3
Raw Score
100%
Time Factor
2026-05-30
Last Push
23,155
Stars
Rust
Language
1,867,975
Lines of Code
4637
Files
18985
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 198MEDIUM 3003LOW 15784

Pattern Findings

18985 matches across 18 categories. Click a row to expand file-level details.

Decorative Section Separators2675 hits · 8391 pts
SeverityFileLineSnippet
MEDIUMCargo.toml379# -----------------------------------------------------------------------------
MEDIUMCargo.toml381# -----------------------------------------------------------------------------
MEDIUMCargo.toml386# -----------------------------------------------------------------------------
MEDIUMCargo.toml388# -----------------------------------------------------------------------------
MEDIUMCargo.toml486# -----------------------------------------------------------------------------
MEDIUMCargo.toml488# -----------------------------------------------------------------------------
MEDIUMCargo.toml493# -----------------------------------------------------------------------------
MEDIUMCargo.toml503# -----------------------------------------------------------------------------
MEDIUMCargo.toml505# -----------------------------------------------------------------------------
MEDIUMCargo.toml516# -----------------------------------------------------------------------------
MEDIUMCargo.toml526# -----------------------------------------------------------------------------
MEDIUMCargo.toml528# -----------------------------------------------------------------------------
MEDIUMCargo.toml537# -----------------------------------------------------------------------------
MEDIUMCargo.toml94# -----------------------------------------------------------------------------
MEDIUMCargo.toml98# -----------------------------------------------------------------------------
MEDIUMCargo.toml117# -----------------------------------------------------------------------------
MEDIUMCargo.toml122# -----------------------------------------------------------------------------
MEDIUMCargo.toml316# -----------------------------------------------------------------------------
MEDIUMCargo.toml318# -----------------------------------------------------------------------------
MEDIUMCargo.toml359# -----------------------------------------------------------------------------
MEDIUMCargo.toml361# -----------------------------------------------------------------------------
MEDIUMCargo.toml405# -----------------------------------------------------------------------------
MEDIUMCargo.toml407# -----------------------------------------------------------------------------
MEDIUMdeny.toml4# =============================================================================
MEDIUMdeny.toml6# =============================================================================
MEDIUMdeny.toml14# =============================================================================
MEDIUMdeny.toml16# =============================================================================
MEDIUMdeny.toml54# =============================================================================
MEDIUMdeny.toml56# =============================================================================
MEDIUMdeny.toml105# =============================================================================
MEDIUMdeny.toml107# =============================================================================
MEDIUMdeny.toml242# =============================================================================
MEDIUMdeny.toml244# =============================================================================
MEDIUMosv-scanner.toml4# =============================================================================
MEDIUMosv-scanner.toml6# =============================================================================
MEDIUMnautilus_trader/__init__.py1# -------------------------------------------------------------------------------------------------
MEDIUMnautilus_trader/__init__.py14# -------------------------------------------------------------------------------------------------
MEDIUMnautilus_trader/accounting/error.py1# -------------------------------------------------------------------------------------------------
MEDIUMnautilus_trader/accounting/error.py14# -------------------------------------------------------------------------------------------------
MEDIUMnautilus_trader/accounting/__init__.py1# -------------------------------------------------------------------------------------------------
MEDIUMnautilus_trader/accounting/__init__.py14# -------------------------------------------------------------------------------------------------
MEDIUMnautilus_trader/accounting/accounts/__init__.py1# -------------------------------------------------------------------------------------------------
MEDIUMnautilus_trader/accounting/accounts/__init__.py14# -------------------------------------------------------------------------------------------------
MEDIUMnautilus_trader/core/__init__.py1# -------------------------------------------------------------------------------------------------
MEDIUMnautilus_trader/core/__init__.py14# -------------------------------------------------------------------------------------------------
MEDIUMnautilus_trader/core/inspect.py1# -------------------------------------------------------------------------------------------------
MEDIUMnautilus_trader/core/inspect.py14# -------------------------------------------------------------------------------------------------
MEDIUMnautilus_trader/analysis/themes.py1# -------------------------------------------------------------------------------------------------
MEDIUMnautilus_trader/analysis/themes.py14# -------------------------------------------------------------------------------------------------
MEDIUMnautilus_trader/analysis/config.py1# -------------------------------------------------------------------------------------------------
MEDIUMnautilus_trader/analysis/config.py14# -------------------------------------------------------------------------------------------------
MEDIUMnautilus_trader/analysis/reporter.py1# -------------------------------------------------------------------------------------------------
MEDIUMnautilus_trader/analysis/reporter.py14# -------------------------------------------------------------------------------------------------
MEDIUMnautilus_trader/analysis/analyzer.py1# -------------------------------------------------------------------------------------------------
MEDIUMnautilus_trader/analysis/analyzer.py14# -------------------------------------------------------------------------------------------------
MEDIUMnautilus_trader/analysis/__init__.py1# -------------------------------------------------------------------------------------------------
MEDIUMnautilus_trader/analysis/__init__.py14# -------------------------------------------------------------------------------------------------
MEDIUMnautilus_trader/analysis/tearsheet.py1# -------------------------------------------------------------------------------------------------
MEDIUMnautilus_trader/analysis/tearsheet.py14# -------------------------------------------------------------------------------------------------
MEDIUMnautilus_trader/analysis/statistic.py1# -------------------------------------------------------------------------------------------------
2615 more matches not shown…
Hyper-Verbose Identifiers8226 hits · 7186 pts
SeverityFileLineSnippet
LOWbuild.py355def _copy_build_dir_to_project(cmd: build_ext) -> None:
LOWbuild.py371def _copy_rust_dylibs_to_project() -> None:
LOWbuild.py434def _ensure_windows_python_import_lib() -> None:
LOWbuild.py516def show_rustanalyzer_settings() -> None:
LOWbuild.py549def _ensure_local_editable_pth() -> None:
LOWnautilus_trader/analysis/reporter.py54 def generate_order_fills_report(orders: list[Order]) -> pd.DataFrame:
LOWnautilus_trader/analysis/reporter.py118 def generate_positions_report(
LOWnautilus_trader/analysis/analyzer.py403 def get_performance_stats_pnls(
LOWnautilus_trader/analysis/analyzer.py450 def get_performance_stats_returns(self) -> dict[str, Any]:
LOWnautilus_trader/analysis/analyzer.py464 def get_performance_stats_position_returns(self) -> dict[str, Any]:
LOWnautilus_trader/analysis/analyzer.py475 def get_performance_stats_portfolio_returns(self) -> dict[str, Any]:
LOWnautilus_trader/analysis/analyzer.py486 def get_performance_stats_general(self) -> dict[str, Any]:
LOWnautilus_trader/analysis/analyzer.py541 def get_stats_returns_formatted(self) -> list[str]:
LOWnautilus_trader/analysis/analyzer.py553 def get_stats_position_returns_formatted(self) -> list[str]:
LOWnautilus_trader/analysis/analyzer.py565 def get_stats_portfolio_returns_formatted(self) -> list[str]:
LOWnautilus_trader/analysis/analyzer.py577 def get_stats_general_formatted(self) -> list[str]:
LOWnautilus_trader/analysis/analyzer.py599 def _calculate_portfolio_returns(self, account: Account) -> pd.Series:
LOWnautilus_trader/analysis/tearsheet.py431def _resolve_tearsheet_returns(
LOWnautilus_trader/analysis/tearsheet.py462def _calculate_account_returns(
LOWnautilus_trader/analysis/tearsheet.py523def _extract_account_balance_series(
LOWnautilus_trader/analysis/tearsheet.py552def _calculate_daily_balance_returns(total_balance: pd.Series) -> pd.Series | None:
LOWnautilus_trader/analysis/tearsheet.py570def create_tearsheet_from_stats(
LOWnautilus_trader/analysis/tearsheet.py858def create_monthly_returns_heatmap(
LOWnautilus_trader/analysis/tearsheet.py956def create_returns_distribution(
LOWnautilus_trader/analysis/tearsheet.py2069def _register_tearsheet_chart(
LOWnautilus_trader/analysis/statistic.py82 def calculate_from_realized_pnls(self, realized_pnls: pd.Series) -> Any | None:
LOWnautilus_trader/analysis/statistic.py136 def _downsample_to_daily_bins(self, returns: pd.Series) -> pd.Series:
LOWnautilus_trader/serialization/arrow/serializer.py137 def _unpack_container_objects(data_cls: type, data: list[Any]) -> list[Data]:
LOWnautilus_trader/serialization/arrow/serializer.py144 def rust_defined_to_record_batch( # noqa: C901 (too complex)
LOWnautilus_trader/serialization/arrow/serializer.py414def register_rust_custom_serializer(
LOWnautilus_trader/serialization/arrow/serializer.py544def _instrument_status_encoder(data: list) -> pa.RecordBatch:
LOWnautilus_trader/serialization/arrow/serializer.py553def _instrument_status_decoder(table) -> list:
LOWnautilus_trader/test_kit/functions.py49def ensure_all_tasks_completed() -> None:
LOWnautilus_trader/test_kit/providers.py488 def onethousandrats_perp_binance() -> CryptoPerpetual:
LOWnautilus_trader/test_kit/providers.py891 def crypto_futures_spread_inverse() -> CryptoFuturesSpread:
LOWnautilus_trader/test_kit/providers.py920 def crypto_option_spread_inverse() -> CryptoOptionSpread:
LOWnautilus_trader/test_kit/providers.py979def first_friday_two_years_six_months_ago(year: int, month: int) -> dt.date:
LOWnautilus_trader/test_kit/providers.py1143 def generate_time_series_index(
LOWnautilus_trader/test_kit/providers.py1293def get_test_data_large_checksums_filepath() -> Path:
LOWnautilus_trader/test_kit/providers.py1325def ensure_data_exists_tardis_huobi_quotes() -> Path:
LOWnautilus_trader/test_kit/providers.py1332def ensure_data_exists_tardis_bitmex_trades() -> Path:
LOWnautilus_trader/test_kit/strategies/tester_exec.py730 def maintain_stop_sell_orders(
LOWnautilus_trader/test_kit/rust/instruments_pyo3.py557 def perpetual_contract_eurusd() -> PerpetualContract:
LOWnautilus_trader/test_kit/rust/events_pyo3.py84 def cash_account_state_million_usd() -> AccountState:
LOWnautilus_trader/test_kit/rust/events_pyo3.py129 def cash_account_state_multi_changed_btc() -> AccountState:
LOWnautilus_trader/test_kit/rust/events_pyo3.py172 def order_denied_max_submit_rate() -> OrderDenied:
LOWnautilus_trader/test_kit/rust/events_pyo3.py185 def order_rejected_insufficient_margin() -> OrderRejected:
LOWnautilus_trader/backtest/node.py839def get_price_protection_points(config: BacktestVenueConfig) -> int | None:
LOWnautilus_trader/adapters/okx/execution.py1755 async def _batch_cancel_regular_orders(self, orders_to_cancel) -> None:
LOWnautilus_trader/adapters/okx/execution.py1762 async def _batch_cancel_http_orders(self, http_cancels) -> None:
LOWnautilus_trader/adapters/okx/execution.py1766 async def _batch_cancel_algo_orders(
LOWnautilus_trader/adapters/okx/execution.py2237 async def _cancel_all_orders_mass_cancel(self, command: CancelAllOrders) -> None:
LOWnautilus_trader/adapters/okx/execution.py3059 def _canonical_client_order_id(
LOWnautilus_trader/adapters/okx/execution.py3066 def _exchange_client_order_id(
LOWnautilus_trader/adapters/okx/execution.py3073 def _register_client_order_aliases(
LOWnautilus_trader/adapters/okx/execution.py446 async def generate_order_status_reports(
LOWnautilus_trader/adapters/okx/execution.py513 async def generate_order_status_report(
LOWnautilus_trader/adapters/okx/execution.py627 async def _fetch_algo_order_status_report(
LOWnautilus_trader/adapters/okx/execution.py664 async def _fetch_algo_order_status_report_by_algo_id(
LOWnautilus_trader/adapters/okx/execution.py763 async def _generate_spot_position_reports_from_wallet( # noqa: C901 (too complex)
8166 more matches not shown…
Over-Commented Block6157 hits · 5894 pts
SeverityFileLineSnippet
LOWCargo.toml501# Cargo ignores `panic` for bench profile (harness requires unwind to catch failures)
LOWCargo.toml521strip = false
LOWdeny.toml41 # bincode 1.3.3 unmaintained, transitive via hypersync-client. Not a vulnerability.
LOW.zizmor.yml1# Zizmor configuration for GitHub Actions security auditing
LOWnautilus_trader/__init__.py1# -------------------------------------------------------------------------------------------------
LOWnautilus_trader/accounting/error.py1# -------------------------------------------------------------------------------------------------
LOWnautilus_trader/accounting/__init__.py1# -------------------------------------------------------------------------------------------------
LOWnautilus_trader/accounting/accounts/__init__.py1# -------------------------------------------------------------------------------------------------
LOWnautilus_trader/core/__init__.py1# -------------------------------------------------------------------------------------------------
LOWnautilus_trader/core/inspect.py1# -------------------------------------------------------------------------------------------------
LOWnautilus_trader/analysis/themes.py1# -------------------------------------------------------------------------------------------------
LOWnautilus_trader/analysis/config.py1# -------------------------------------------------------------------------------------------------
LOWnautilus_trader/analysis/reporter.py1# -------------------------------------------------------------------------------------------------
LOWnautilus_trader/analysis/analyzer.py1# -------------------------------------------------------------------------------------------------
LOWnautilus_trader/analysis/__init__.py1# -------------------------------------------------------------------------------------------------
LOWnautilus_trader/analysis/tearsheet.py1# -------------------------------------------------------------------------------------------------
LOWnautilus_trader/analysis/statistic.py1# -------------------------------------------------------------------------------------------------
LOWnautilus_trader/cache/config.py1# -------------------------------------------------------------------------------------------------
LOWnautilus_trader/cache/transformers.py1# -------------------------------------------------------------------------------------------------
LOWnautilus_trader/cache/adapter.py1# -------------------------------------------------------------------------------------------------
LOWnautilus_trader/cache/__init__.py1# -------------------------------------------------------------------------------------------------
LOWnautilus_trader/config/__init__.py1# -------------------------------------------------------------------------------------------------
LOWnautilus_trader/indicators/__init__.py1# -------------------------------------------------------------------------------------------------
LOWnautilus_trader/serialization/__init__.py1# -------------------------------------------------------------------------------------------------
LOWnautilus_trader/serialization/arrow/__init__.py1# -------------------------------------------------------------------------------------------------
LOWnautilus_trader/serialization/arrow/serializer.py1# -------------------------------------------------------------------------------------------------
LOWnautilus_trader/serialization/arrow/schema.py1# -------------------------------------------------------------------------------------------------
LOW…r/serialization/arrow/implementations/account_state.py1# -------------------------------------------------------------------------------------------------
LOW…er/serialization/arrow/implementations/order_events.py1# -------------------------------------------------------------------------------------------------
LOW…trader/serialization/arrow/implementations/__init__.py1# -------------------------------------------------------------------------------------------------
LOW…der/serialization/arrow/implementations/instruments.py1# -------------------------------------------------------------------------------------------------
LOW…ialization/arrow/implementations/component_commands.py1# -------------------------------------------------------------------------------------------------
LOW…alization/arrow/implementations/funding_rate_update.py1# -------------------------------------------------------------------------------------------------
LOW…erialization/arrow/implementations/component_events.py1# -------------------------------------------------------------------------------------------------
LOW…serialization/arrow/implementations/position_events.py1# -------------------------------------------------------------------------------------------------
LOWnautilus_trader/test_kit/functions.py1# -------------------------------------------------------------------------------------------------
LOWnautilus_trader/test_kit/__init__.py1# -------------------------------------------------------------------------------------------------
LOWnautilus_trader/test_kit/debug_helpers.py1# -------------------------------------------------------------------------------------------------
LOWnautilus_trader/test_kit/providers.py1# -------------------------------------------------------------------------------------------------
LOWnautilus_trader/test_kit/strategies/__init__.py1# -------------------------------------------------------------------------------------------------
LOWnautilus_trader/test_kit/strategies/tester_data.py1# -------------------------------------------------------------------------------------------------
LOWnautilus_trader/test_kit/strategies/tester_exec.py1# -------------------------------------------------------------------------------------------------
LOWnautilus_trader/test_kit/rust/accounting_pyo3.py1# -------------------------------------------------------------------------------------------------
LOWnautilus_trader/test_kit/rust/instruments_pyo3.py1# -------------------------------------------------------------------------------------------------
LOWnautilus_trader/test_kit/rust/identifiers_pyo3.py1# -------------------------------------------------------------------------------------------------
LOWnautilus_trader/test_kit/rust/__init__.py1# -------------------------------------------------------------------------------------------------
LOWnautilus_trader/test_kit/rust/types_pyo3.py1# -------------------------------------------------------------------------------------------------
LOWnautilus_trader/test_kit/rust/data_pyo3.py1# -------------------------------------------------------------------------------------------------
LOWnautilus_trader/test_kit/rust/orders_pyo3.py1# -------------------------------------------------------------------------------------------------
LOWnautilus_trader/test_kit/rust/events_pyo3.py1# -------------------------------------------------------------------------------------------------
LOWnautilus_trader/backtest/config.py1# -------------------------------------------------------------------------------------------------
LOWnautilus_trader/backtest/results.py1# -------------------------------------------------------------------------------------------------
LOWnautilus_trader/backtest/results.py41
LOWnautilus_trader/backtest/results.py81
LOWnautilus_trader/backtest/__init__.py1# -------------------------------------------------------------------------------------------------
LOWnautilus_trader/backtest/node_builder.py1# -------------------------------------------------------------------------------------------------
LOWnautilus_trader/backtest/node.py1# -------------------------------------------------------------------------------------------------
LOWnautilus_trader/backtest/__main__.py1# -------------------------------------------------------------------------------------------------
LOWnautilus_trader/backtest/models/__init__.py1# -------------------------------------------------------------------------------------------------
LOWnautilus_trader/adapters/env.py1# -------------------------------------------------------------------------------------------------
6097 more matches not shown…
Cross-File Repetition171 hits · 855 pts
SeverityFileLineSnippet
HIGHnautilus_trader/test_kit/strategies/tester_exec.py0actions to be performed when the strategy is stopped.
HIGH…ilus_trader/examples/strategies/orderbook_imbalance.py0actions to be performed when the strategy is stopped.
HIGHnautilus_trader/examples/strategies/ema_cross_twap.py0actions to be performed when the strategy is stopped.
HIGH…lus_trader/examples/strategies/ema_cross_stop_entry.py0actions to be performed when the strategy is stopped.
HIGH…utilus_trader/examples/strategies/bb_mean_reversion.py0actions to be performed when the strategy is stopped.
HIGH…_trader/examples/strategies/ema_cross_trailing_stop.py0actions to be performed when the strategy is stopped.
HIGH…_trader/examples/strategies/volatility_market_maker.py0actions to be performed when the strategy is stopped.
HIGH…s_trader/examples/strategies/ema_cross_bracket_algo.py0actions to be performed when the strategy is stopped.
HIGHnautilus_trader/examples/strategies/market_maker.py0actions to be performed when the strategy is stopped.
HIGH…utilus_trader/examples/strategies/ema_cross_bracket.py0actions to be performed when the strategy is stopped.
HIGHnautilus_trader/examples/strategies/ema_cross.py0actions to be performed when the strategy is stopped.
HIGH…ilus_trader/examples/strategies/ema_cross_long_only.py0actions to be performed when the strategy is stopped.
HIGH…lus_trader/examples/strategies/ema_cross_hedge_mode.py0actions to be performed when the strategy is stopped.
HIGHnautilus_trader/examples/strategies/blank.py0actions to be performed when the strategy is stopped.
HIGHnautilus_trader/adapters/betfair/data_types.py0unix timestamp (nanoseconds) when the data event occurred. returns ------- int
HIGHnautilus_trader/adapters/betfair/data_types.py0unix timestamp (nanoseconds) when the data event occurred. returns ------- int
HIGHnautilus_trader/adapters/betfair/data_types.py0unix timestamp (nanoseconds) when the data event occurred. returns ------- int
HIGHnautilus_trader/adapters/betfair/data_types.py0unix timestamp (nanoseconds) when the data event occurred. returns ------- int
HIGHnautilus_trader/adapters/betfair/data_types.py0unix timestamp (nanoseconds) when the data event occurred. returns ------- int
HIGHnautilus_trader/adapters/binance/futures/types.py0unix timestamp (nanoseconds) when the data event occurred. returns ------- int
HIGHnautilus_trader/adapters/binance/common/types.py0unix timestamp (nanoseconds) when the data event occurred. returns ------- int
HIGHnautilus_trader/common/signal.py0unix timestamp (nanoseconds) when the data event occurred. returns ------- int
HIGHdocs/concepts/data.md0unix timestamp (nanoseconds) when the data event occurred. returns ------- int
HIGHnautilus_trader/adapters/betfair/data_types.py0unix timestamp (nanoseconds) when the object was initialized. returns ------- int
HIGHnautilus_trader/adapters/betfair/data_types.py0unix timestamp (nanoseconds) when the object was initialized. returns ------- int
HIGHnautilus_trader/adapters/betfair/data_types.py0unix timestamp (nanoseconds) when the object was initialized. returns ------- int
HIGHnautilus_trader/adapters/betfair/data_types.py0unix timestamp (nanoseconds) when the object was initialized. returns ------- int
HIGHnautilus_trader/adapters/betfair/data_types.py0unix timestamp (nanoseconds) when the object was initialized. returns ------- int
HIGHnautilus_trader/adapters/binance/futures/types.py0unix timestamp (nanoseconds) when the object was initialized. returns ------- int
HIGHnautilus_trader/adapters/binance/common/types.py0unix timestamp (nanoseconds) when the object was initialized. returns ------- int
HIGHnautilus_trader/common/signal.py0unix timestamp (nanoseconds) when the object was initialized. returns ------- int
HIGHdocs/concepts/data.md0unix timestamp (nanoseconds) when the object was initialized. returns ------- int
HIGHnautilus_trader/adapters/binance/futures/types.py0return a dictionary representation of this object. returns ------- dict[str, any]
HIGHnautilus_trader/adapters/binance/common/types.py0return a dictionary representation of this object. returns ------- dict[str, any]
HIGHnautilus_trader/adapters/binance/common/types.py0return a dictionary representation of this object. returns ------- dict[str, any]
HIGHnautilus_trader/execution/reports.py0return a dictionary representation of this object. returns ------- dict[str, any]
HIGHnautilus_trader/execution/reports.py0return a dictionary representation of this object. returns ------- dict[str, any]
HIGHnautilus_trader/execution/reports.py0return a dictionary representation of this object. returns ------- dict[str, any]
HIGHnautilus_trader/execution/reports.py0return a dictionary representation of this object. returns ------- dict[str, any]
HIGH…ilus_trader/examples/strategies/orderbook_imbalance.py0actions to be performed when the strategy is reset.
HIGHnautilus_trader/examples/strategies/ema_cross_twap.py0actions to be performed when the strategy is reset.
HIGH…lus_trader/examples/strategies/ema_cross_stop_entry.py0actions to be performed when the strategy is reset.
HIGH…utilus_trader/examples/strategies/bb_mean_reversion.py0actions to be performed when the strategy is reset.
HIGH…_trader/examples/strategies/ema_cross_trailing_stop.py0actions to be performed when the strategy is reset.
HIGH…_trader/examples/strategies/volatility_market_maker.py0actions to be performed when the strategy is reset.
HIGH…s_trader/examples/strategies/ema_cross_bracket_algo.py0actions to be performed when the strategy is reset.
HIGH…utilus_trader/examples/strategies/grid_market_maker.py0actions to be performed when the strategy is reset.
HIGH…utilus_trader/examples/strategies/ema_cross_bracket.py0actions to be performed when the strategy is reset.
HIGHnautilus_trader/examples/strategies/ema_cross.py0actions to be performed when the strategy is reset.
HIGH…ilus_trader/examples/strategies/ema_cross_long_only.py0actions to be performed when the strategy is reset.
HIGH…lus_trader/examples/strategies/ema_cross_hedge_mode.py0actions to be performed when the strategy is reset.
HIGHnautilus_trader/examples/strategies/blank.py0actions to be performed when the strategy is reset.
HIGHnautilus_trader/examples/strategies/ema_cross_twap.py0actions to be performed when the strategy is running and receives an instrument. parameters ---------- instrument : inst
HIGH…lus_trader/examples/strategies/ema_cross_stop_entry.py0actions to be performed when the strategy is running and receives an instrument. parameters ---------- instrument : inst
HIGH…_trader/examples/strategies/ema_cross_trailing_stop.py0actions to be performed when the strategy is running and receives an instrument. parameters ---------- instrument : inst
HIGH…_trader/examples/strategies/volatility_market_maker.py0actions to be performed when the strategy is running and receives an instrument. parameters ---------- instrument : inst
HIGHnautilus_trader/examples/strategies/ema_cross.py0actions to be performed when the strategy is running and receives an instrument. parameters ---------- instrument : inst
HIGH…ilus_trader/examples/strategies/ema_cross_long_only.py0actions to be performed when the strategy is running and receives an instrument. parameters ---------- instrument : inst
HIGH…lus_trader/examples/strategies/ema_cross_hedge_mode.py0actions to be performed when the strategy is running and receives an instrument. parameters ---------- instrument : inst
HIGHnautilus_trader/examples/strategies/blank.py0actions to be performed when the strategy is running and receives an instrument. parameters ---------- instrument : inst
111 more matches not shown…
Unused Imports690 hits · 584 pts
SeverityFileLineSnippet
LOWnautilus_trader/core/__init__.py28
LOWnautilus_trader/core/__init__.py29
LOWnautilus_trader/core/__init__.py30
LOWnautilus_trader/core/__init__.py31
LOWnautilus_trader/core/__init__.py32
LOWnautilus_trader/core/__init__.py33
LOWnautilus_trader/core/__init__.py34
LOWnautilus_trader/analysis/themes.py19
LOWnautilus_trader/analysis/config.py19
LOWnautilus_trader/analysis/__init__.py20
LOWnautilus_trader/analysis/__init__.py21
LOWnautilus_trader/analysis/__init__.py22
LOWnautilus_trader/analysis/__init__.py23
LOWnautilus_trader/analysis/__init__.py24
LOWnautilus_trader/analysis/__init__.py25
LOWnautilus_trader/analysis/__init__.py26
LOWnautilus_trader/analysis/__init__.py27
LOWnautilus_trader/analysis/__init__.py28
LOWnautilus_trader/analysis/__init__.py29
LOWnautilus_trader/analysis/__init__.py30
LOWnautilus_trader/analysis/__init__.py31
LOWnautilus_trader/analysis/__init__.py32
LOWnautilus_trader/analysis/__init__.py33
LOWnautilus_trader/analysis/__init__.py34
LOWnautilus_trader/analysis/__init__.py35
LOWnautilus_trader/analysis/__init__.py36
LOWnautilus_trader/analysis/__init__.py37
LOWnautilus_trader/analysis/__init__.py38
LOWnautilus_trader/analysis/__init__.py39
LOWnautilus_trader/analysis/__init__.py40
LOWnautilus_trader/analysis/__init__.py41
LOWnautilus_trader/analysis/__init__.py42
LOWnautilus_trader/analysis/__init__.py43
LOWnautilus_trader/analysis/__init__.py44
LOWnautilus_trader/analysis/__init__.py45
LOWnautilus_trader/analysis/__init__.py46
LOWnautilus_trader/analysis/__init__.py47
LOWnautilus_trader/analysis/__init__.py48
LOWnautilus_trader/analysis/__init__.py49
LOWnautilus_trader/analysis/__init__.py50
LOWnautilus_trader/analysis/__init__.py51
LOWnautilus_trader/analysis/__init__.py52
LOWnautilus_trader/analysis/__init__.py53
LOWnautilus_trader/analysis/__init__.py54
LOWnautilus_trader/analysis/__init__.py55
LOWnautilus_trader/analysis/__init__.py56
LOWnautilus_trader/analysis/__init__.py57
LOWnautilus_trader/analysis/__init__.py58
LOWnautilus_trader/analysis/__init__.py59
LOWnautilus_trader/analysis/__init__.py60
LOWnautilus_trader/analysis/__init__.py61
LOWnautilus_trader/analysis/__init__.py62
LOWnautilus_trader/analysis/__init__.py63
LOWnautilus_trader/analysis/__init__.py64
LOWnautilus_trader/analysis/__init__.py65
LOWnautilus_trader/analysis/__init__.py66
LOWnautilus_trader/analysis/__init__.py67
LOWnautilus_trader/analysis/__init__.py68
LOWnautilus_trader/analysis/__init__.py69
LOWnautilus_trader/analysis/tearsheet.py23
630 more matches not shown…
AI Slop Vocabulary155 hits · 494 pts
SeverityFileLineSnippet
MEDIUMCargo.toml501# Cargo ignores `panic` for bench profile (harness requires unwind to catch failures)
MEDIUMnautilus_trader/test_kit/strategies/tester_exec.py80 tob_offset_ticks: PositiveInt = 500 # Definitely out of the market
MEDIUMnautilus_trader/adapters/okx/execution.py263 # SPOT margin supports CROSS for leverage; ISOLATED is limited to copy or lead traders
MEDIUMnautilus_trader/adapters/bybit/execution.py682 # Bybit error code 110043: Set leverage has not been modified (already set)
MEDIUMnautilus_trader/adapters/binance/futures/execution.py231 # Initialize leverage for all symbols using symbolConfig endpoint
MEDIUMnautilus_trader/adapters/binance/futures/execution.py232 # This ensures leverage is set correctly even for symbols without active positions
MEDIUMcrates/network/src/websocket/subscription.rs18//! This module provides a robust subscription tracker that maintains confirmed and pending
MEDIUMcrates/network/src/websocket/auth.rs18//! This module provides a robust authentication tracker that coordinates login attempts
MEDIUMcrates/testkit/src/lib.rs19//! file handling, and common testing patterns. This crate supports robust testing workflows
MEDIUMcrates/backtest/src/config.rs412 /// The account default leverage (for margin accounts).
MEDIUMcrates/backtest/src/config.rs415 /// The instrument specific leverage configuration (for margin accounts).
MEDIUMcrates/adapters/okx/src/config.rs216 /// Enables margin/leverage for SPOT trading when true.
MEDIUMcrates/adapters/okx/src/http/client.rs832 /// Requests position tiers information, maximum leverage depends on your borrowings and margin ratio.
MEDIUMcrates/adapters/okx/src/http/models.rs466 /// Maximum available leverage.
MEDIUMcrates/adapters/okx/src/http/models.rs568 /// Notional leverage.
MEDIUMcrates/adapters/okx/src/http/models.rs635 /// Position leverage.
MEDIUMcrates/adapters/okx/src/http/models.rs1106 /// Algo leverage configuration.
MEDIUMcrates/adapters/hyperliquid/src/common/models.rs673 /// converting balances and handling the margin account type since Hyperliquid supports leverage.
MEDIUMcrates/adapters/hyperliquid/src/common/enums.rs491 // Normalize: trim whitespace and convert to lowercase for robust matching
MEDIUMcrates/adapters/hyperliquid/src/common/enums.rs565 /// **Deprecated**: This method uses substring matching which is fragile and not robust.
MEDIUMcrates/adapters/hyperliquid/src/http/query.rs38 /// Update leverage for an asset
MEDIUMcrates/adapters/hyperliquid/src/http/query.rs79/// Parameters for updating leverage.
MEDIUMcrates/adapters/hyperliquid/src/http/query.rs425 /// Creates an action to update leverage for an asset.
MEDIUMcrates/adapters/hyperliquid/src/http/query.rs620 assert!(json.contains(r#""leverage":10"#));
MEDIUMcrates/adapters/hyperliquid/src/http/models.rs145 /// Maximum leverage allowed for this asset.
MEDIUMcrates/adapters/hyperliquid/src/http/models.rs162 /// Margin tables for leverage tiers.
MEDIUMcrates/adapters/hyperliquid/src/http/models.rs175 /// Maximum leverage allowed for this asset.
MEDIUMcrates/adapters/hyperliquid/src/http/models.rs192/// Margin table with leverage tiers.
MEDIUMcrates/adapters/hyperliquid/src/http/models.rs209 /// Maximum leverage for this tier.
MEDIUMcrates/adapters/hyperliquid/src/http/models.rs1397 /// Update leverage for a position.
MEDIUMcrates/adapters/hyperliquid/src/http/models.rs1407 #[serde(rename = "leverage")]
MEDIUMcrates/adapters/hyperliquid/src/http/models.rs1739 /// Maximum leverage allowed for this asset.
MEDIUMcrates/adapters/hyperliquid/src/http/rate_limits.rs146/// We count the largest array in the response (robust to schema variants).
MEDIUMcrates/adapters/hyperliquid/src/http/parse.rs126 /// Maximum leverage (for perps).
MEDIUMcrates/adapters/bitmex/src/websocket/messages.rs884 /// Margin leverage
MEDIUMcrates/adapters/bitmex/src/python/http.rs125 /// Update position leverage.
MEDIUMcrates/adapters/bitmex/src/python/http.rs136 // Call the leverage update method once it's implemented
MEDIUMcrates/adapters/bitmex/src/python/http.rs137 // let report = client.update_position_leverage(&symbol, leverage)
MEDIUMcrates/adapters/bitmex/src/http/client.rs766 /// Update position leverage.
MEDIUMcrates/adapters/bitmex/src/http/client.rs2485 /// Update position leverage.
MEDIUMcrates/adapters/bitmex/src/http/query.rs394/// Parameters for the POST /position/leverage endpoint.
MEDIUMcrates/adapters/bitmex/src/http/query.rs400 /// Symbol to set leverage for.
MEDIUMcrates/adapters/bitmex/src/http/query.rs404 /// Optional leverage for long position (isolated margin only).
MEDIUMcrates/adapters/coinbase/src/config.rs158 /// Optional default leverage applied to derivatives orders. Ignored on
MEDIUMcrates/adapters/derive/tests/data_client.rs1273 // Wait until the REST call lands on the mock so the test is robust
MEDIUMcrates/adapters/derive/src/http/models.rs585 /// Effective leverage (perps only).
MEDIUMcrates/adapters/blockchain/src/decode.rs23/// - If `decimals == 18` the value represents wei and we leverage the dedicated
MEDIUMcrates/adapters/blockchain/src/decode.rs46/// - If `decimals == 18` the value represents wei and we leverage the dedicated
MEDIUMcrates/adapters/deribit/src/http/models.rs78 /// Maximal leverage for instrument (only for futures)
MEDIUMcrates/adapters/sandbox/src/config.rs60 /// The account default leverage (for margin accounts).
MEDIUMcrates/adapters/sandbox/src/config.rs63 /// Per-instrument leverage overrides.
MEDIUMcrates/adapters/bybit/src/config.rs210 /// Leverage configuration for futures (symbol -> leverage).
MEDIUMcrates/adapters/bybit/src/python/http.rs322 /// Sets leverage for a symbol (requires authentication).
MEDIUMcrates/adapters/bybit/src/python/http.rs326 /// - <https://bybit-exchange.github.io/docs/v5/position/leverage>
MEDIUMcrates/adapters/bybit/src/common/models.rs43/// Common leverage filter that describes leverage bounds and step.
MEDIUMcrates/adapters/bybit/src/common/models.rs47 /// Minimum leverage supported.
MEDIUMcrates/adapters/bybit/src/common/models.rs49 /// Maximum leverage supported.
MEDIUMcrates/adapters/bybit/src/common/models.rs51 /// Step between successive leverage values.
MEDIUMcrates/adapters/bybit/src/http/client.rs1185 /// Sets leverage for a symbol.
MEDIUMcrates/adapters/bybit/src/http/client.rs1200 /// - <https://bybit-exchange.github.io/docs/v5/position/leverage>
95 more matches not shown…
Self-Referential Comments147 hits · 452 pts
SeverityFileLineSnippet
MEDIUMnautilus_trader/backtest/node.py379 # Create a builder for this engine
MEDIUM…tilus_trader/adapters/interactive_brokers/factories.py103 # Create a unique key for the gateway based on its trading_mode
MEDIUM…tilus_trader/adapters/interactive_brokers/factories.py172 # Create a cache key based on client connection info and config
MEDIUM…tilus_trader/adapters/interactive_brokers/providers.py515 # Create the spread instrument
MEDIUM…tilus_trader/adapters/interactive_brokers/providers.py168 # Create a more complete leg contract using information from the combo leg
MEDIUM…er/adapters/interactive_brokers/parsing/instruments.py1139 # Create the spread instrument ID
MEDIUM…er/adapters/interactive_brokers/parsing/instruments.py1261 # Create a combo leg with the actual conId
MEDIUM…er/adapters/interactive_brokers/parsing/instruments.py1270 # Create the BAG contract
MEDIUM…der/adapters/interactive_brokers/client/market_data.py897 # Create an index price tick
MEDIUMnautilus_trader/adapters/polymarket/providers.py218 # Create a copy to avoid mutating the caller's filters
MEDIUMnautilus_trader/adapters/polymarket/providers.py451 # Create a copy to avoid mutating the caller's filters
MEDIUMnautilus_trader/adapters/binance/websocket/client.py171 # Create a new client ID
MEDIUMnautilus_trader/examples/strategies/ema_cross_twap.py119 # Create the indicators for the strategy
MEDIUM…lus_trader/examples/strategies/ema_cross_stop_entry.py129 # Create the indicators for the strategy
MEDIUM…utilus_trader/examples/strategies/bb_mean_reversion.py98 # Create the indicators for the strategy
MEDIUM…_trader/examples/strategies/ema_cross_trailing_stop.py131 # Create the indicators for the strategy
MEDIUM…_trader/examples/strategies/volatility_market_maker.py109 # Create the indicators for the strategy
MEDIUM…s_trader/examples/strategies/ema_cross_bracket_algo.py135 # Create the indicators for the strategy
MEDIUM…utilus_trader/examples/strategies/ema_cross_bracket.py111 # Create the indicators for the strategy
MEDIUMnautilus_trader/examples/strategies/ema_cross.py124 # Create the indicators for the strategy
MEDIUM…ilus_trader/examples/strategies/ema_cross_long_only.py107 # Create the indicators for the strategy
MEDIUM…lus_trader/examples/strategies/ema_cross_hedge_mode.py108 # Create the indicators for the strategy
MEDIUMnautilus_trader/persistence/writer.py410 # Create an arrow writer with identifier specific metadata in the schema
MEDIUMpython/generate_stubs.py52# This file is automatically generated by pyo3_stub_gen
MEDIUM.pre-commit-hooks/cargo_fmt_stable.sh11# Create an empty rustfmt.toml in the temp directory
MEDIUMtests/unit_tests/accounting/test_cash.py970 # Create a closed position with profit
MEDIUMtests/unit_tests/accounting/test_cash.py1417 # Create a reduce-only order
MEDIUMtests/unit_tests/accounting/test_cash.py1479 # Create a market order (no price)
MEDIUMtests/unit_tests/accounting/test_cash.py1544 # Create a BUY order for AUD/USD - should lock USD
MEDIUMtests/unit_tests/accounting/test_cash.py1575 # Create a SELL order for AUD/USD - should lock AUD
MEDIUMtests/unit_tests/accounting/test_cash.py1643 # Create a BUY order for BTCUSDT - should lock USDT
MEDIUMtests/unit_tests/accounting/test_cash.py1673 # Create a SELL order for BTCUSDT - should lock BTC
MEDIUMtests/unit_tests/accounting/test_cash.py1743 # Create a SELL order for AUD/USD
MEDIUMtests/unit_tests/analysis/test_tearsheet.py412 # Create a mock engine
MEDIUMtests/unit_tests/cache/test_data.py127 # Create a MARKET order (no price) and apply events to close it
MEDIUMtests/unit_tests/test_kit/test_exec_tester.py619 # Create a book with bids and asks
MEDIUMtests/unit_tests/backtest/test_engine.py1040 # Create a minimal engine configuration for testing
MEDIUMtests/unit_tests/backtest/test_engine.py1246 # Create a very simple iterator with just a few items
MEDIUMtests/unit_tests/backtest/test_matching_engine.py717 # Create a limit order that won't immediately fill
MEDIUMtests/unit_tests/backtest/test_data_client.py391 # Create a future with a smaller price increment (e.g., 0.25 vs 0.50)
MEDIUMtests/unit_tests/execution/test_engine.py3295 # Create a bid above current best ask
MEDIUMtests/unit_tests/execution/test_engine.py3303 # Create an ask below the bid
MEDIUMtests/unit_tests/execution/test_engine.py3360 # Create a bracket order with limit entry, limit TP and limit SL
MEDIUMtests/unit_tests/execution/test_engine.py3490 # Create the order
MEDIUMtests/unit_tests/execution/test_engine.py3779 # Create an order that receives events out of normal sequence
MEDIUMtests/unit_tests/live/test_execution_recon.py2113 # Create an order with an instrument NOT in cache
MEDIUMtests/unit_tests/live/test_execution_recon.py2116 # Create an order manually (bypassing normal flow)
MEDIUMtests/unit_tests/live/test_execution_recon.py2124 # Create a report for the existing order
MEDIUMtests/unit_tests/live/test_execution_recon.py1911 # Create an order with some filled quantity
MEDIUMtests/unit_tests/live/test_execution_recon.py1924 # Create a report that shows more filled quantity (normal case)
MEDIUMtests/unit_tests/live/test_execution_recon.py1968 # Create an order with filled quantity
MEDIUMtests/unit_tests/live/test_execution_recon.py1981 # Create a report that shows less filled quantity (corrupted state scenario)
MEDIUMtests/unit_tests/live/test_execution_recon.py2061 # Create an order with quantity 100
MEDIUMtests/unit_tests/live/test_execution_recon.py2077 # Create a fill report that would cause overfill (80 + 30 > 100)
MEDIUMtests/unit_tests/live/test_execution_recon.py3040 # Create an order
MEDIUMtests/unit_tests/live/test_execution_recon.py4769 # Create a position with qty slightly different from venue (within tolerance)
MEDIUMtests/unit_tests/live/test_execution_order_checks.py1370 # Create an inflight order (SUBMITTED)
MEDIUMtests/unit_tests/live/test_execution_order_checks.py1384 # Create an open order (ACCEPTED)
MEDIUMtests/unit_tests/live/test_execution_order_checks.py2032 # Create an ACCEPTED order in cache
MEDIUMtests/unit_tests/live/test_execution_order_checks.py2086 # Create an ACCEPTED order in cache
87 more matches not shown…
Excessive Try-Catch Wrapping322 hits · 320 pts
SeverityFileLineSnippet
LOWbuild.py477 except Exception as e: # pragma: no cover - defensive
MEDIUMbuild.py394def _get_clang_version() -> str:
LOWnautilus_trader/serialization/arrow/serializer.py385 except Exception as e:
LOWnautilus_trader/backtest/config.py781 except Exception as e:
LOWnautilus_trader/backtest/node.py257 except Exception as e:
LOWnautilus_trader/backtest/node.py484 except Exception as e:
MEDIUMnautilus_trader/adapters/okx/execution.py268def _check_clock_sync(self) -> None:
MEDIUMnautilus_trader/adapters/okx/execution.py1755def _batch_cancel_regular_orders(self, orders_to_cancel) -> None:
LOWnautilus_trader/adapters/okx/execution.py1759 except Exception as e:
LOWnautilus_trader/adapters/okx/execution.py2228 except Exception as e:
LOWnautilus_trader/adapters/okx/execution.py2245 except Exception as e:
LOWnautilus_trader/adapters/okx/execution.py274 except Exception:
LOWnautilus_trader/adapters/okx/execution.py659 except Exception as e:
LOWnautilus_trader/adapters/okx/execution.py691 except Exception as e:
LOWnautilus_trader/adapters/okx/execution.py824 except Exception as e:
LOWnautilus_trader/adapters/okx/execution.py1161 except Exception as e:
LOWnautilus_trader/adapters/okx/execution.py1199 except Exception as e:
LOWnautilus_trader/adapters/okx/execution.py1331 except Exception as e:
LOWnautilus_trader/adapters/okx/execution.py1680 except Exception as e:
LOWnautilus_trader/adapters/okx/execution.py1794 except Exception as e:
LOWnautilus_trader/adapters/okx/execution.py1813 except Exception as e:
LOWnautilus_trader/adapters/okx/execution.py1912 except Exception as e:
LOWnautilus_trader/adapters/okx/execution.py1965 except Exception as e:
LOWnautilus_trader/adapters/okx/execution.py2106 except Exception as e:
LOWnautilus_trader/adapters/okx/execution.py2147 except Exception as e:
LOWnautilus_trader/adapters/okx/execution.py2178 except Exception as e:
LOWnautilus_trader/adapters/okx/execution.py2617 except Exception as e:
LOWnautilus_trader/adapters/okx/data.py378 except Exception:
LOWnautilus_trader/adapters/okx/data.py528 except Exception as e:
LOWnautilus_trader/adapters/okx/data.py557 except Exception as e:
LOWnautilus_trader/adapters/okx/data.py607 except Exception as e:
LOWnautilus_trader/adapters/okx/data.py737 except Exception as e:
LOWnautilus_trader/adapters/okx/data.py773 except Exception as e:
LOWnautilus_trader/adapters/architect_ax/execution.py382 except Exception as e:
LOWnautilus_trader/adapters/architect_ax/execution.py430 except Exception as e:
LOWnautilus_trader/adapters/architect_ax/execution.py518 except Exception as e:
LOWnautilus_trader/adapters/architect_ax/execution.py543 except Exception as e:
LOWnautilus_trader/adapters/architect_ax/execution.py564 except Exception as e:
MEDIUMnautilus_trader/adapters/architect_ax/data.py512def _handle_msg(self, msg) -> None:
LOWnautilus_trader/adapters/architect_ax/data.py222 except Exception as e:
LOWnautilus_trader/adapters/architect_ax/data.py425 except Exception as e:
LOWnautilus_trader/adapters/architect_ax/data.py454 except Exception as e:
LOWnautilus_trader/adapters/architect_ax/data.py484 except Exception as e:
LOWnautilus_trader/adapters/architect_ax/data.py509 except Exception as e:
LOWnautilus_trader/adapters/architect_ax/data.py521 except Exception as e:
LOWnautilus_trader/adapters/hyperliquid/execution.py187 except Exception as e:
LOWnautilus_trader/adapters/hyperliquid/execution.py287 except Exception as e:
LOWnautilus_trader/adapters/hyperliquid/execution.py487 except Exception as e:
LOWnautilus_trader/adapters/hyperliquid/execution.py493 except Exception as e:
LOWnautilus_trader/adapters/hyperliquid/execution.py688 except Exception as e:
LOWnautilus_trader/adapters/hyperliquid/execution.py749 except Exception as e:
LOWnautilus_trader/adapters/hyperliquid/execution.py881 except Exception as e:
LOWnautilus_trader/adapters/hyperliquid/execution.py925 except Exception as e:
LOWnautilus_trader/adapters/hyperliquid/execution.py988 except Exception as e:
LOWnautilus_trader/adapters/hyperliquid/execution.py1055 except Exception as e:
LOWnautilus_trader/adapters/hyperliquid/execution.py1099 except Exception as e:
LOWnautilus_trader/adapters/hyperliquid/providers.py112 except Exception as e: # pragma: no cover - defensive logging
MEDIUMnautilus_trader/adapters/hyperliquid/providers.py96def _load_instruments(self) -> list[Instrument]:
LOWnautilus_trader/adapters/hyperliquid/data.py413 except Exception as e:
LOWnautilus_trader/adapters/hyperliquid/data.py512 except Exception as e:
262 more matches not shown…
Redundant / Tautological Comments122 hits · 180 pts
SeverityFileLineSnippet
LOWnautilus_trader/analysis/tearsheet.py1393 # Check if it's per-currency (dict of dicts) or single dict
LOWnautilus_trader/test_kit/strategies/tester_exec.py721 # Check if we need to adjust the stop order
LOWnautilus_trader/test_kit/strategies/tester_exec.py769 # Check if we need to adjust the stop order
LOWnautilus_trader/adapters/hyperliquid/execution.py718 # Check if all orders are open
LOW…tilus_trader/adapters/interactive_brokers/execution.py1913 # Check if this is a spread order and handle accordingly
LOW…tilus_trader/adapters/interactive_brokers/execution.py2390 # Check if this is a known position
LOW…tilus_trader/adapters/interactive_brokers/providers.py509 # Check if any leg is a future
LOW…tilus_trader/adapters/interactive_brokers/providers.py131 # Check if we already have this instrument
LOWnautilus_trader/adapters/interactive_brokers/common.py356 # Check if this is the UNSET_DECIMAL value
LOW…er/adapters/interactive_brokers/parsing/instruments.py840 # Check if a BAG contract contains at least one future leg.
LOW…us_trader/adapters/interactive_brokers/client/order.py384 # Check if this is for a get_executions request
LOW…us_trader/adapters/interactive_brokers/client/order.py432 # Check if this is for a get_executions request
LOW…der/adapters/interactive_brokers/client/market_data.py900 # Check if we have both bid and ask prices to create a quote tick
LOW…der/adapters/interactive_brokers/client/market_data.py933 # Check if we have both bid and ask data to create a quote tick
LOW…der/adapters/interactive_brokers/client/market_data.py1315 # Check if this bar is still the current bar (hasn't been superseded)
LOW…der/adapters/interactive_brokers/client/market_data.py1809 # Check if the order book is initialized
LOWnautilus_trader/adapters/polymarket/execution.py1651 # Check if cancel was requested during the HTTP round-trip
LOWnautilus_trader/adapters/polymarket/execution.py1924 # Check if cancel was requested during the HTTP round-trip
LOWnautilus_trader/adapters/polymarket/execution.py2365 # Check if this specific fill was already processed (handles multi-order trades)
LOWnautilus_trader/adapters/polymarket/data.py671 # Check if any effective deltas remain
LOWnautilus_trader/adapters/polymarket/data.py723 # Check if local book exists, create if needed
LOWnautilus_trader/adapters/polymarket/websocket/client.py245 # Check if we need to retry a failed connection
LOW…der/adapters/polymarket/scripts/list_updown_markets.py75 # Check if it's an updown market
LOWnautilus_trader/adapters/bybit/execution.py2011 # Check if current UTC time is within Bybit's repayment blackout window (04:00-05:30 UTC daily).
LOWnautilus_trader/adapters/bybit/execution.py1756 # Check if this is a post-only order rejected by the exchange
LOWnautilus_trader/adapters/bybit/execution.py1980 # Check if there's an outstanding borrow first
LOWnautilus_trader/adapters/betfair/execution.py1721 # Check if we know this order via rfo (stream arrived before HTTP response)
LOWnautilus_trader/adapters/betfair/execution.py1966 # Check if order is still open before generating a cancel
LOWnautilus_trader/adapters/kraken/execution.py1514 # Check if venue order ID changed (Futures editorder can return new ID)
LOWnautilus_trader/adapters/databento/data.py1142 # Check if multiple instrument_ids are provided in metadata
LOWnautilus_trader/adapters/databento/data.py1191 # Check if multiple instrument_ids are provided in metadata
LOWnautilus_trader/adapters/databento/data.py1240 # Check if multiple instrument_ids are provided in metadata
LOWnautilus_trader/adapters/databento/data.py1289 # Check if multiple instrument_ids are provided in params
LOWnautilus_trader/adapters/databento/data.py1379 # Check if multiple instrument_ids are provided in params
LOWnautilus_trader/adapters/databento/data.py1485 # Check if multiple instrument_ids are provided in params
LOWnautilus_trader/adapters/databento/data.py1555 # Check if multiple bar_types are provided in params
LOWnautilus_trader/adapters/databento/data.py1628 # Check if multiple instrument_ids are provided in params
LOWnautilus_trader/adapters/databento/data.py1717 # Check if this is the last delta in an event (F_LAST flag)
LOWnautilus_trader/adapters/binance/execution.py780 # Check if the position side is valid
LOWnautilus_trader/adapters/binance/execution.py1284 # Check if order can be modified via regular endpoint
LOWnautilus_trader/adapters/binance/execution.py1518 # Check if algo order has been triggered - use regular endpoint in that case
LOWnautilus_trader/adapters/binance/websocket/client.py162 # Check if we can create a new client
LOWnautilus_trader/adapters/binance/futures/data.py134 # Check if book buffer active
LOWnautilus_trader/adapters/binance/spot/data.py124 # Check if book buffer active
LOWnautilus_trader/adapters/binance/spot/schemas/user.py251 # Check if price changed (for price_match orders)
LOWnautilus_trader/adapters/binance/spot/http/wallet.py50 # Check if Binance.US based on base URL
LOWnautilus_trader/examples/strategies/ema_cross_twap.py232 # Check if indicators ready
LOW…lus_trader/examples/strategies/ema_cross_stop_entry.py227 # Check if indicators ready
LOW…utilus_trader/examples/strategies/bb_mean_reversion.py131 # Check if indicators ready
LOWnautilus_trader/examples/strategies/simpler_quoter.py75 # Check if closed
LOW…_trader/examples/strategies/ema_cross_trailing_stop.py245 # Check if indicators ready
LOW…_trader/examples/strategies/volatility_market_maker.py264 # Check if indicators ready
LOW…s_trader/examples/strategies/ema_cross_bracket_algo.py190 # Check if indicators ready
LOW…utilus_trader/examples/strategies/ema_cross_bracket.py166 # Check if indicators ready
LOWnautilus_trader/examples/strategies/ema_cross.py241 # Check if indicators ready
LOW…ilus_trader/examples/strategies/ema_cross_long_only.py219 # Check if indicators ready
LOW…lus_trader/examples/strategies/ema_cross_hedge_mode.py220 # Check if indicators ready
LOWnautilus_trader/examples/indicators/ema_python.py113 # Check if this is the initial input
LOWnautilus_trader/live/execution_engine.py1080 # Check if quantities match (both could be zero)
LOWnautilus_trader/live/execution_engine.py1364 # Check if order is too recent to reconcile (avoid race conditions)
62 more matches not shown…
Deep Nesting212 hits · 158 pts
SeverityFileLineSnippet
LOWbuild.py167
LOWbuild.py482
LOWnautilus_trader/analysis/analyzer.py654
LOWnautilus_trader/analysis/tearsheet.py2098
LOWnautilus_trader/cache/transformers.py99
LOWnautilus_trader/cache/transformers.py144
LOWnautilus_trader/cache/transformers.py190
LOWnautilus_trader/cache/transformers.py227
LOWnautilus_trader/cache/transformers.py258
LOWnautilus_trader/serialization/arrow/serializer.py144
LOWnautilus_trader/test_kit/strategies/tester_data.py100
LOWnautilus_trader/test_kit/strategies/tester_exec.py255
LOWnautilus_trader/test_kit/strategies/tester_exec.py286
LOWnautilus_trader/test_kit/strategies/tester_exec.py588
LOWnautilus_trader/test_kit/strategies/tester_exec.py682
LOWnautilus_trader/test_kit/strategies/tester_exec.py730
LOWnautilus_trader/test_kit/strategies/tester_exec.py807
LOWnautilus_trader/backtest/config.py272
LOWnautilus_trader/backtest/node.py170
LOWnautilus_trader/backtest/node.py362
LOWnautilus_trader/backtest/node.py531
LOWnautilus_trader/adapters/okx/execution.py763
LOWnautilus_trader/adapters/okx/execution.py865
LOWnautilus_trader/adapters/okx/execution.py1975
LOWnautilus_trader/adapters/okx/execution.py2587
LOWnautilus_trader/adapters/okx/execution.py2726
LOWnautilus_trader/adapters/okx/providers.py200
LOWnautilus_trader/adapters/okx/data.py423
LOWnautilus_trader/adapters/okx/data.py749
LOWnautilus_trader/adapters/architect_ax/execution.py567
LOWnautilus_trader/adapters/architect_ax/data.py204
LOWnautilus_trader/adapters/architect_ax/data.py396
LOWnautilus_trader/adapters/hyperliquid/execution.py361
LOWnautilus_trader/adapters/hyperliquid/execution.py396
LOWnautilus_trader/adapters/hyperliquid/execution.py1073
LOWnautilus_trader/adapters/hyperliquid/execution.py1205
LOWnautilus_trader/adapters/hyperliquid/data.py467
LOW…tilus_trader/adapters/interactive_brokers/execution.py327
LOW…tilus_trader/adapters/interactive_brokers/execution.py520
LOW…tilus_trader/adapters/interactive_brokers/execution.py636
LOW…tilus_trader/adapters/interactive_brokers/execution.py999
LOW…tilus_trader/adapters/interactive_brokers/execution.py1139
LOW…tilus_trader/adapters/interactive_brokers/execution.py1223
LOW…tilus_trader/adapters/interactive_brokers/execution.py1308
LOW…tilus_trader/adapters/interactive_brokers/execution.py1559
LOW…tilus_trader/adapters/interactive_brokers/execution.py1758
LOWnautilus_trader/adapters/interactive_brokers/common.py328
LOWnautilus_trader/adapters/interactive_brokers/data.py366
LOW…er/adapters/interactive_brokers/parsing/instruments.py322
LOW…er/adapters/interactive_brokers/parsing/instruments.py1282
LOW…er/adapters/interactive_brokers/parsing/instruments.py1331
LOW…er/adapters/interactive_brokers/parsing/instruments.py1473
LOW…us_trader/adapters/interactive_brokers/parsing/data.py67
LOW…us_trader/adapters/interactive_brokers/parsing/data.py89
LOW…us_trader/adapters/interactive_brokers/client/error.py73
LOW…s_trader/adapters/interactive_brokers/client/client.py645
LOW…s_trader/adapters/interactive_brokers/client/client.py689
LOWnautilus_trader/adapters/bitmex/execution.py965
LOWnautilus_trader/adapters/bitmex/data.py469
LOWnautilus_trader/adapters/polymarket/execution.py383
152 more matches not shown…
Magic Placeholder Names23 hits · 115 pts
SeverityFileLineSnippet
HIGHcrates/adapters/tardis/bin/example_replay.rs21// docker run -p 8000:8000 -p 8001:8001 -e "TM_API_KEY=YOUR_API_KEY" -d tardisdev/tardis-machine
HIGHcrates/adapters/binance/README.md48export BINANCE_API_KEY="your-api-key-from-binance"
HIGH…ntegration_tests/adapters/tardis/sandbox/run_replay.py25 -e "TM_API_KEY=YOUR_API_KEY" \
HIGH…tegration_tests/adapters/tardis/sandbox/run_machine.py24# docker run -p 8000:8000 -p 8001:8001 -e "TM_API_KEY=YOUR_API_KEY" -d tardisdev/tardis-machine
HIGHdocs/how_to/run_rust_live_trading.md126export OKX_API_KEY="your_api_key"
HIGHdocs/integrations/binance.md848export BINANCE_API_KEY="your-api-key-from-binance"
HIGHdocs/integrations/binance.md924 api_key="YOUR_API_KEY",
HIGHdocs/integrations/bybit.md132 api_key="YOUR_API_KEY",
HIGHdocs/integrations/bybit.md484 api_key="YOUR_API_KEY",
HIGHdocs/integrations/okx.md825export OKX_API_KEY="your_api_key"
HIGHdocs/integrations/bitmex.md583 api_key="YOUR_API_KEY",
HIGHdocs/integrations/bitmex.md651 api_key="YOUR_API_KEY",
HIGHdocs/integrations/bitmex.md725 api_key="YOUR_API_KEY",
HIGHdocs/integrations/bitmex.md849 api_key="YOUR_API_KEY", # Or use os.getenv("BITMEX_API_KEY")
HIGHdocs/integrations/bitmex.md855 api_key="YOUR_API_KEY",
HIGHdocs/integrations/coinbase.md138 api_key="YOUR_API_KEY",
HIGHdocs/integrations/tardis.md202docker run -p 8000:8000 -p 8001:8001 -e "TM_API_KEY=YOUR_API_KEY" -d tardisdev/tardis-machine
HIGHdocs/tutorials/options_data_bybit.md62export BYBIT_API_KEY="your-api-key"
HIGHdocs/tutorials/delta_neutral_options_bybit.md33export BYBIT_API_KEY="your-api-key"
HIGHdocs/tutorials/gold_book_imbalance_ax.md72export DATABENTO_API_KEY="your-api-key"
HIGHdocs/tutorials/grid_market_maker_bitmex.md89export BITMEX_API_KEY="your-api-key"
HIGH…ples/live/polymarket/polymarket_slug_builder_tester.py31 export POLYMARKET_API_KEY="your_api_key"
HIGHexamples/live/bybit/README_options_data_collector.md29export BYBIT_API_KEY="your_api_key"
Verbosity Indicators51 hits · 88 pts
SeverityFileLineSnippet
LOWcrates/network/src/websocket/auth.rs687 // Step 1: Begin authentication
LOWcrates/network/src/websocket/auth.rs690 // Step 2: Spawn resubscription task that waits for auth
LOWcrates/adapters/okx/src/websocket/client.rs4066 client.subscriptions_state.confirm_unsubscribe(topic); // Step 1: clear pending_unsubscribe
LOWcrates/adapters/okx/src/websocket/client.rs4067 client.subscriptions_state.mark_subscribe(topic); // Step 2: mark as subscribing
LOWcrates/adapters/okx/src/websocket/client.rs4068 client.subscriptions_state.confirm_subscribe(topic); // Step 3: confirm subscription
LOWcrates/adapters/hyperliquid/src/signing/signers.rs128 // Step 4: Create Agent struct
LOWcrates/adapters/hyperliquid/src/signing/signers.rs136 // Step 5: Sign Agent with EIP-712
LOWcrates/adapters/bitmex/src/websocket/client.rs1468 client.subscriptions.confirm_unsubscribe(&topic); // Step 1: clear pending_unsubscribe
LOWcrates/adapters/bitmex/src/websocket/client.rs1469 client.subscriptions.mark_subscribe(&topic); // Step 2: mark as subscribing
LOWcrates/adapters/bitmex/src/websocket/client.rs1470 client.subscriptions.confirm_subscribe(&topic); // Step 3: confirm subscription
LOWcrates/adapters/polymarket/src/websocket/dispatch.rs1103 // Step 1: Dispatch cancel (simulates message A from the bug)
LOWcrates/adapters/polymarket/src/websocket/dispatch.rs1113 // Step 2: Dispatch trade fill (simulates trade arriving after cancel)
LOWcrates/adapters/blockchain/src/data/subscription.rs508 // Step 1: Register DEX
LOWcrates/adapters/blockchain/src/data/subscription.rs518 // Step 2: Subscribe to events
LOWcrates/adapters/blockchain/src/data/subscription.rs524 // Step 3: Verify subscriptions
LOWcrates/adapters/blockchain/src/data/subscription.rs530 // Step 4: Get event signatures
LOWcrates/adapters/blockchain/src/data/subscription.rs534 // Step 5: Unsubscribe from some events
LOWcrates/adapters/blockchain/src/data/subscription.rs538 // Step 6: Verify remaining subscriptions (only pool1 mint remains)
LOWcrates/model/src/defi/tick_map/sqrt_price_math.rs406 // Step 5: Validate price is within valid range before creating Price
LOWcrates/model/src/defi/data/swap_trade_info.rs386 // Step 1: numerator = quote_amount * 10^base_decimals
LOWcrates/model/src/defi/data/swap_trade_info.rs389 // Step 2: numerator = (quote_amount * 10^base_decimals) * 10^FIXED_PRECISION
LOWcrates/model/src/defi/data/swap_trade_info.rs392 // Step 3: denominator = base_amount * 10^quote_decimals
LOWcrates/model/src/defi/data/swap_trade_info.rs395 // Step 4: Final division
LOWtests/unit_tests/backtest/test_matching_engine.py4468 # Step 1: Place limit order that crosses first level (partial fill)
LOWtests/unit_tests/backtest/test_matching_engine.py4487 # Step 2: Modify order to cross second level
LOWtests/unit_tests/portfolio/test_portfolio.py2345 # Step 1: Place and fill a BACK bet (BUY)
LOWtests/unit_tests/portfolio/test_portfolio.py2367 # Step 2: Place and fill a LAY bet (SELL)
LOWtests/unit_tests/portfolio/test_portfolio.py2464 # Step 1: Place and fill a LAY bet (SELL)
LOWtests/unit_tests/portfolio/test_portfolio.py2485 # Step 2: Place and fill a BACK bet (BUY)
LOWtests/unit_tests/portfolio/test_portfolio.py2583 # Step 1: Place opening bet
LOWtests/unit_tests/portfolio/test_portfolio.py2605 # Step 2: Place closing bet
LOWtests/unit_tests/portfolio/test_portfolio.py2704 # Step 1: Place opening bet
LOWtests/unit_tests/portfolio/test_portfolio.py2725 # Step 2: Place closing bet
LOW…ples/other/minimal_reproducible_example/run_example.py108 # Step 1: Configure and create backtest engine
LOW…ples/other/minimal_reproducible_example/run_example.py126 # Step 2: Define exchange and add it to the engine
LOW…ples/other/minimal_reproducible_example/run_example.py137 # Step 3: Create instrument definition and add it to the engine
LOW…ples/other/minimal_reproducible_example/run_example.py163 # Step 5: Create strategy and add it to the engine
LOW…ples/other/minimal_reproducible_example/run_example.py167 # Step 6: Run engine = Run backtest
LOW…ples/other/minimal_reproducible_example/run_example.py170 # Step 7: Release system resources
LOWexamples/other/state_machine/run_example.py24 # Step 1: Define all possible states of our application.
LOWexamples/other/state_machine/run_example.py49 # Step 2: Define all possible triggers (actions / commands) that can cause state transitions
LOWexamples/other/state_machine/run_example.py64 # Step 3: Define the valid state transitions
LOWexamples/backtest/example_06_using_cache/strategy.py90 # Step 1: Load bytes from cache
LOWexamples/backtest/example_06_using_cache/strategy.py92 # Step 2: Deserialize bytes to objects
LOW…st/example_01_load_bars_from_custom_csv/run_example.py38 # Step 1: Configure and create backtest engine
LOW…st/example_01_load_bars_from_custom_csv/run_example.py47 # Step 2: Define exchange and add it to the engine
LOW…st/example_01_load_bars_from_custom_csv/run_example.py58 # Step 3: Create instrument definition and add it to the engine
LOW…st/example_01_load_bars_from_custom_csv/run_example.py103 # Step 5: Create strategy and add it to the engine
LOW…st/example_01_load_bars_from_custom_csv/run_example.py107 # Step 6: Run engine = Run backtest
LOW…st/example_01_load_bars_from_custom_csv/run_example.py110 # Step 7: Release system resources
LOW…/backtest/example_04_using_data_catalog/run_example.py44 # Step 1: Configure and Create the Backtest Engine
Slop Phrases20 hits · 33 pts
SeverityFileLineSnippet
MEDIUMcrates/adapters/blockchain/examples/node_data_tester.rs47// IMPORTANT: The actor definitions below are EXAMPLE CODE for demonstration purposes.
LOW…ests/tracemalloc_cross_bracket_gbpusd_bars_internal.py127 # For repeated backtest runs make sure to reset the engine
LOW…mem_leak_tests/tracemalloc_market_maker_gbpusd_bars.py124 # For repeated backtest runs make sure to reset the engine
LOW…/tracemalloc_crypto_ema_cross_ethusdt_trailing_stop.py105 # For repeated backtest runs make sure to reset the engine
LOWtests/mem_leak_tests/memray_backtest.py97 # For repeated backtest runs make sure to reset the engine
LOW…les/backtest/crypto_ema_cross_with_binance_provider.py141 # For repeated backtest runs make sure to reset the engine
LOW…s/backtest/databento_ema_cross_long_only_spy_trades.py112 # For repeated backtest runs make sure to reset the engine
LOW…/backtest/databento_ema_cross_long_only_tsla_trades.py111 # For repeated backtest runs make sure to reset the engine
LOW…/backtest/fx_ema_cross_bracket_gbpusd_bars_external.py139 # For repeated backtest runs make sure to reset the engine
LOWexamples/backtest/fx_market_maker_gbpusd_bars.py122 # For repeated backtest runs make sure to reset the engine
LOWexamples/backtest/databento_cme_quoter.py112 # For repeated backtest runs make sure to reset the engine
LOW…mples/backtest/crypto_ema_cross_ethusdt_trade_ticks.py137 # For repeated backtest runs make sure to reset the engine
LOW…/backtest/fx_ema_cross_bracket_gbpusd_bars_internal.py127 # For repeated backtest runs make sure to reset the engine
LOW…amples/backtest/fx_ema_cross_audusd_bars_from_ticks.py107 # For repeated backtest runs make sure to reset the engine
LOWexamples/backtest/crypto_orderbook_imbalance.py119 # For repeated backtest runs make sure to reset the engine
LOW…les/backtest/crypto_ema_cross_ethusdt_trailing_stop.py100 # For repeated backtest runs make sure to reset the engine
LOW…mples/backtest/betfair_backtest_orderbook_imbalance.py110 # For repeated backtest runs make sure to reset the engine
LOWexamples/backtest/fx_ema_cross_audusd_ticks.py118 # For repeated backtest runs make sure to reset the engine
LOW…es/backtest/databento_ema_cross_long_only_aapl_bars.py112 # For repeated backtest runs make sure to reset the engine
MEDIUM…ples/live/polymarket/polymarket_slug_builder_tester.py58# Alternative slug builders you can try:
Cross-Language Confusion3 hits · 12 pts
SeverityFileLineSnippet
HIGHtests/unit_tests/config/test_common.py158 == b'{"type":"redis","host":null,"port":null,"username":null,"password":null,"ssl":false,'
HIGHtests/unit_tests/persistence/test_streaming.py820 assert parquet_table.schema.equals(
HIGHexamples/live/deribit/deribit_exec_tester.py33 source .venv/bin/activate && USE_TESTNET=false python examples/live/deribit/deribit_exec_tester.py
Example Usage Blocks6 hits · 9 pts
SeverityFileLineSnippet
LOWscripts/regen-capnp.sh12# Usage:
LOWscripts/purge-orphan-dev-wheels.sh10# Usage:
LOWscripts/curate-dataset.sh10# Usage:
LOWscripts/ci/publish-release-checksums.sh4# Usage:
LOWscripts/ci/publish-cargo-crates.sh4# Usage:
LOWscripts/ci/verify-published-registries.bash4# Usage:
Synthetic Comment Markers1 hit · 8 pts
SeverityFileLineSnippet
HIGHcrates/adapters/betfair/tests/stream_client.rs243/// venue partitions matched orders by strategy ref / account id as requested.
Dead Code2 hits · 4 pts
SeverityFileLineSnippet
MEDIUMtests/unit_tests/backtest/test_engine.py1279
MEDIUMtests/unit_tests/backtest/test_data_iterator.py355
Fake / Example Data2 hits · 2 pts
SeverityFileLineSnippet
LOW…ters/deribit/test_data/http_get_account_summaries.json6 "email": "user@example.com",
LOW…test_data/http_get_account_summaries_cross_margin.json6 "email": "user@example.com",