Your AI trading terminal assistant for US stocks, commodities, forex, and crypto.
This report presents the forensic synthetic code analysis of NoFxAiOS/nofx, a Go project with 12,556 GitHub stars. SynthScan v2.0 examined 168,118 lines of code across 567 source files, recording 408 pattern matches distributed across 16 syntactic categories. The overall adjusted score of 6.6 places this repository in the Low AI signal band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 408 distinct pattern matches across 16 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | web/src/types/strategy.ts | 198 | // Trading Leverage - exchange leverage for opening positions (AI guided) | COMMENT |
| MEDIUM⚡ | web/src/types/strategy.ts | 199 | btc_eth_max_leverage: number; // BTC/ETH max exchange leverage | CODE |
| MEDIUM⚡ | web/src/types/strategy.ts | 200 | altcoin_max_leverage: number; // Altcoin max exchange leverage | CODE |
| MEDIUM | web/src/components/landing/brand/Marquee.tsx | 16 | // Clone children to create seamless loop | COMMENT |
| MEDIUM | trader/grid_regime.go | 36 | // getRegimeLeverageLimit returns the effective leverage limit for a regime level | COMMENT |
| MEDIUM | trader/auto_trader_grid_regime.go | 239 | // Calculate effective leverage | COMMENT |
| MEDIUM | trader/auto_trader_grid_regime.go | 284 | // Use default leverage limits since GridStrategyConfig doesn't have regime-specific limits | COMMENT |
| MEDIUM | trader/auto_trader_grid.go | 338 | // CRITICAL: Set leverage on exchange before trading | COMMENT |
| MEDIUM | trader/auto_trader_grid.go | 341 | // Not fatal - continue with default leverage | COMMENT |
| MEDIUM | trader/interface.go | 34 | // CRITICAL FIX: Set leverage before placing order | COMMENT |
| MEDIUM | trader/interface.go | 38 | // Continue anyway - some exchanges don't require explicit leverage setting | COMMENT |
| MEDIUM | trader/auto_trader_grid_orders.go | 69 | // This protects against AI miscalculations or leverage misconfigurations | COMMENT |
| MEDIUM | trader/auto_trader.go | 428 | // ClampLimits above bounds it (ratio 0.5–10, leverage caps), and the | COMMENT |
| MEDIUM | trader/auto_trader.go | 690 | // calculatePnLPercentage calculates P&L percentage (based on margin, automatically considers leverage) | COMMENT |
| MEDIUM | trader/auto_trader_loop.go | 510 | // Calculate P&L percentage (based on margin, considering leverage) | COMMENT |
| MEDIUM | trader/auto_trader_loop.go | 595 | // 5. Get leverage from strategy config | COMMENT |
| MEDIUM | trader/auto_trader_orders.go | 15 | // totalRequired ≈ positionSize/leverage + positionSize*takerFeeRate + positionSize/leverage*1% | COMMENT |
| MEDIUM | trader/auto_trader_orders.go | 16 | // = positionSize * (marginOverheadFactor/leverage + takerFeeRate) | COMMENT |
| MEDIUM | trader/okx/trader_orders.go | 19 | // Set leverage | COMMENT |
| MEDIUM | trader/okx/trader_orders.go | 100 | // Set leverage | COMMENT |
| MEDIUM | trader/okx/trader_orders.go | 819 | // Set leverage if specified | COMMENT |
| MEDIUM | trader/okx/trader_account.go | 91 | // to all subsequent leverage and order requests for this trader instance. | COMMENT |
| MEDIUM | trader/okx/trader_account.go | 97 | // /api/v5/account/set-leverage and via the tdMode field on order placement. | COMMENT |
| MEDIUM⚡ | trader/okx/trader_account.go | 108 | // while leverage uses mgnMode on /account/set-leverage. | COMMENT |
| MEDIUM⚡ | trader/okx/trader_account.go | 109 | // Persist the configured mode locally so subsequent leverage/order calls use it, | COMMENT |
| MEDIUM⚡ | trader/okx/trader_account.go | 115 | // SetLeverage sets leverage | COMMENT |
| MEDIUM⚡ | trader/okx/trader_account.go | 120 | // Set leverage for both long and short | COMMENT |
| MEDIUM | trader/okx/trader_account.go | 131 | // Ignore if already at target leverage | COMMENT |
| MEDIUM | trader/okx/trader.go | 44 | // Margin mode setting used for new orders and leverage changes. | COMMENT |
| MEDIUM | trader/hyperliquid/trader_orders.go | 61 | // Set leverage before order placement. Hyperliquid supports leverage | COMMENT |
| MEDIUM | trader/hyperliquid/trader_orders.go | 63 | // at whatever leverage they had previously selected (for example 20x). | COMMENT |
| MEDIUM | trader/hyperliquid/trader_orders.go | 134 | // Set leverage before order placement. Hyperliquid supports leverage | COMMENT |
| MEDIUM | trader/hyperliquid/trader_orders.go | 136 | // at whatever leverage they had previously selected (for example 20x). | COMMENT |
| MEDIUM | trader/hyperliquid/trader_orders.go | 1034 | // Set leverage if specified. | COMMENT |
| MEDIUM | trader/hyperliquid/trader_positions.go | 121 | // Get leverage (default to 1 if not available) | COMMENT |
| MEDIUM | trader/hyperliquid/trader_positions.go | 153 | // SetLeverage sets leverage | COMMENT |
| MEDIUM | trader/hyperliquid/trader_positions.go | 158 | // Call UpdateLeverage (leverage int, name string, isCross bool) | COMMENT |
| MEDIUM | trader/types/interface.go | 62 | // SetLeverage Set leverage | COMMENT |
| MEDIUM | trader/types/interface.go | 176 | // CRITICAL FIX: Set leverage before placing order | COMMENT |
| MEDIUM | trader/types/interface.go | 180 | // Continue anyway - some exchanges don't require explicit leverage setting | COMMENT |
| MEDIUM | trader/indodax/trader_orders.go | 123 | // SetLeverage is a no-op for Indodax (spot-only, no leverage) | COMMENT |
| MEDIUM | trader/indodax/trader.go | 28 | // Since Indodax is spot-only, futures-specific methods (OpenShort, CloseShort, leverage, etc.) | COMMENT |
| MEDIUM⚡ | trader/aster/trader_orders.go | 27 | // Set leverage first (non-fatal if position already exists) | COMMENT |
| MEDIUM⚡ | trader/aster/trader_orders.go | 29 | // Error -2030: Cannot adjust leverage when position exists | COMMENT |
| MEDIUM⚡ | trader/aster/trader_orders.go | 30 | // This is expected when adding to an existing position, continue with current leverage | COMMENT |
| MEDIUM⚡ | trader/aster/trader_orders.go | 100 | // Set leverage first (non-fatal if position already exists) | COMMENT |
| MEDIUM⚡ | trader/aster/trader_orders.go | 102 | // Error -2030: Cannot adjust leverage when position exists | COMMENT |
| MEDIUM⚡ | trader/aster/trader_orders.go | 103 | // This is expected when adding to an existing position, continue with current leverage | COMMENT |
| MEDIUM | trader/aster/trader_test.go | 168 | // Mock SetLeverage - /fapi/v1/leverage | COMMENT |
| MEDIUM | trader/aster/trader_positions.go | 112 | // SetLeverage Set leverage multiplier | COMMENT |
| MEDIUM | trader/bybit/trader_orders.go | 28 | // Set leverage first | COMMENT |
| MEDIUM | trader/bybit/trader_orders.go | 71 | // Set leverage first | COMMENT |
| MEDIUM | trader/bybit/trader_orders.go | 191 | // SetLeverage sets leverage | COMMENT |
| MEDIUM | trader/bybit/trader_orders.go | 202 | // If leverage is already at target value, Bybit will return an error, ignore this case | COMMENT |
| MEDIUM | trader/bybit/trader_orders.go | 209 | if result.RetCode != 0 && result.RetCode != 110043 { // 110043 = leverage not modified | CODE |
| MEDIUM | trader/bybit/trader_orders.go | 599 | // Set leverage if specified | COMMENT |
| MEDIUM | trader/kucoin/trader_orders.go | 21 | // Set leverage | COMMENT |
| MEDIUM | trader/kucoin/trader_orders.go | 78 | // Set leverage | COMMENT |
| MEDIUM | trader/kucoin/trader_orders.go | 525 | // SetLeverage sets leverage for a symbol | COMMENT |
| MEDIUM | trader/kucoin/trader_orders.go | 536 | // Ignore if already at target leverage | COMMENT |
| 58 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | start.sh | 3 | # ═══════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM⚡ | start.sh | 6 | # ═══════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM⚡ | start.sh | 10 | # ------------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | start.sh | 12 | # ------------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | start.sh | 20 | # ------------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | start.sh | 22 | # ------------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | start.sh | 67 | # ------------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | start.sh | 69 | # ------------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | start.sh | 79 | # ------------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | start.sh | 81 | # ------------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | start.sh | 245 | # ------------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | start.sh | 247 | # ------------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | start.sh | 254 | # ------------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | start.sh | 256 | # ------------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | start.sh | 263 | # ------------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | start.sh | 265 | # ------------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | start.sh | 274 | # ------------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | start.sh | 276 | # ------------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | start.sh | 302 | # ------------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | start.sh | 304 | # ------------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | start.sh | 312 | # ------------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | start.sh | 314 | # ------------------------------------------------------------------------ | COMMENT |
| MEDIUM | start.sh | 39 | # ------------------------------------------------------------------------ | COMMENT |
| MEDIUM | start.sh | 41 | # ------------------------------------------------------------------------ | COMMENT |
| MEDIUM | start.sh | 54 | # ------------------------------------------------------------------------ | COMMENT |
| MEDIUM | start.sh | 56 | # ------------------------------------------------------------------------ | COMMENT |
| MEDIUM | start.sh | 104 | # ------------------------------------------------------------------------ | COMMENT |
| MEDIUM | start.sh | 106 | # ------------------------------------------------------------------------ | COMMENT |
| MEDIUM | start.sh | 126 | # ------------------------------------------------------------------------ | COMMENT |
| MEDIUM | start.sh | 128 | # ------------------------------------------------------------------------ | COMMENT |
| MEDIUM | start.sh | 173 | # ------------------------------------------------------------------------ | COMMENT |
| MEDIUM | start.sh | 175 | # ------------------------------------------------------------------------ | COMMENT |
| MEDIUM | start.sh | 192 | # ------------------------------------------------------------------------ | COMMENT |
| MEDIUM | start.sh | 194 | # ------------------------------------------------------------------------ | COMMENT |
| MEDIUM | start.sh | 205 | # ------------------------------------------------------------------------ | COMMENT |
| MEDIUM | start.sh | 207 | # ------------------------------------------------------------------------ | COMMENT |
| MEDIUM | start.sh | 287 | # ------------------------------------------------------------------------ | COMMENT |
| MEDIUM | start.sh | 289 | # ------------------------------------------------------------------------ | COMMENT |
| MEDIUM | start.sh | 348 | # ------------------------------------------------------------------------ | COMMENT |
| MEDIUM | start.sh | 350 | # ------------------------------------------------------------------------ | COMMENT |
| MEDIUM | start.sh | 376 | # ------------------------------------------------------------------------ | COMMENT |
| MEDIUM | start.sh | 378 | # ------------------------------------------------------------------------ | COMMENT |
| MEDIUM | web/src/components/terminal/RiskRadar.tsx | 133 | // ── one-glance verdicts ────────────────────────────────────────────── | COMMENT |
| MEDIUM | web/src/components/terminal/RiskRadar.tsx | 297 | // ── verdict tag ──────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | web/src/components/terminal/RiskRadar.tsx | 340 | // ── bilingual label block ────────────────────────────────────────────── | COMMENT |
| MEDIUM | web/src/data/faqData.ts | 51 | // ───────────────────────── Getting started ───────────────────────── | COMMENT |
| MEDIUM | web/src/data/faqData.ts | 141 | // ───────────────────────── Launch & wallets ───────────────────────── | COMMENT |
| MEDIUM | web/src/data/faqData.ts | 253 | // ───────────────────────── Trading & execution ───────────────────────── | COMMENT |
| MEDIUM | web/src/data/faqData.ts | 409 | // ───────────────────────── Dashboard & metrics ───────────────────────── | COMMENT |
| MEDIUM | web/src/data/faqData.ts | 464 | // ───────────────────────── Security ───────────────────────── | COMMENT |
| MEDIUM | web/src/data/faqData.ts | 511 | // ───────────────────────── Self-hosting ───────────────────────── | COMMENT |
| MEDIUM | web/src/data/faqData.ts | 601 | // ───────────────────────── Contributing ───────────────────────── | COMMENT |
| MEDIUM⚡ | mcp/hooks.go | 14 | // ── Simple CallWithMessages path ──────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | mcp/hooks.go | 18 | // ── Shared request plumbing ───────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | mcp/hooks.go | 24 | // ── Advanced (Request-object) path ────────────────────────────────────── | COMMENT |
| MEDIUM | mcp/payment/claw402.go | 226 | // ── Format overrides for Anthropic endpoints ───────────────────────────────── | COMMENT |
| MEDIUM | mcp/payment/x402.go | 127 | // ── Shared x402 types ──────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | mcp/payment/x402.go | 158 | // ── Shared x402 helpers ────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | mcp/payment/x402.go | 628 | // ── Shared EIP-712 constants & helpers (Base chain, USDC) ──────────────────── | COMMENT |
| MEDIUM⚡ | mcp/provider/claude.go | 5 | // ┌─────────────────────┬───────────────────────────┬─────────────────────────────────┐ | COMMENT |
| 33 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | trader/position_snapshot.go | 21 | // Step 1: Delete all OPEN positions | COMMENT |
| LOW⚡ | trader/position_snapshot.go | 28 | // Step 2: Get current positions from exchange | COMMENT |
| LOW | trader/position_snapshot.go | 42 | // Step 3: Create snapshot record for each position | COMMENT |
| LOW | trader/hyperliquid/trader_account.go | 20 | // Step 1: Query Spot account balance | COMMENT |
| LOW⚡ | trader/hyperliquid/trader_account.go | 35 | // Step 2: Query Perpetuals contract account status | COMMENT |
| LOW⚡ | trader/hyperliquid/trader_account.go | 45 | // Step 3: Dynamically select correct summary based on margin mode (CrossMarginSummary or MarginSummary) | COMMENT |
| LOW | trader/hyperliquid/trader_account.go | 93 | // Step 4: Use Withdrawable field (PR #443) | COMMENT |
| LOW | trader/hyperliquid/trader_account.go | 113 | // Step 5: Query xyz dex balance (stock perps, forex, commodities) | COMMENT |
| LOW | trader/hyperliquid/trader_account.go | 149 | // Step 7: Unified Account mode - Spot USDC is used as collateral for Perps | COMMENT |
| LOW⚡ | trader/lighter/integration_test.go | 861 | // Step 2: Set leverage | COMMENT |
| LOW⚡ | trader/lighter/integration_test.go | 871 | // Step 3: Open Long Position | COMMENT |
| LOW⚡ | trader/lighter/integration_test.go | 881 | // Step 4: Verify position | COMMENT |
| LOW⚡ | trader/lighter/integration_test.go | 891 | // Step 5: Place limit order (sell at higher price) | COMMENT |
| LOW⚡ | trader/lighter/integration_test.go | 914 | // Step 7: Cancel all orders | COMMENT |
| LOW⚡ | trader/lighter/integration_test.go | 924 | // Step 8: Close position | COMMENT |
| LOW⚡ | trader/lighter/integration_test.go | 934 | // Step 9: Verify position closed | COMMENT |
| LOW⚡ | trader/lighter/integration_test.go | 943 | // Step 10: Get final balance | COMMENT |
| LOW | trader/lighter/integration_test.go | 848 | // Step 1: Get initial state | COMMENT |
| LOW | trader/lighter/integration_test.go | 902 | // Step 6: Get open orders | COMMENT |
| LOW⚡ | trader/binance/order_sync.go | 64 | // Step 1: Get max trade IDs from local DB for incremental sync | COMMENT |
| LOW⚡ | trader/binance/order_sync.go | 71 | // Step 2: Detect symbols to sync using multiple methods | COMMENT |
| LOW | trader/binance/order_sync.go | 130 | // Step 3: Query trades for changed symbols using fromId (incremental) or time-based (new symbols) | COMMENT |
| LOW⚡ | trader/binance/order_sync_test.go | 256 | // Step 1: Determine lastSyncTime (simulating first run) | COMMENT |
| LOW⚡ | trader/binance/order_sync_test.go | 260 | // Step 2: Detect symbols using all methods | COMMENT |
| LOW | trader/binance/order_sync_test.go | 329 | // Step 3: Query trades for each symbol | COMMENT |
| LOW⚡ | trader/binance/sync_verify_test.go | 41 | // Step 1: Run sync | COMMENT |
| LOW⚡ | trader/binance/sync_verify_test.go | 51 | // Step 2: Get all trades from exchange for verification | COMMENT |
| LOW | trader/binance/sync_verify_test.go | 102 | // Step 3: Get all fills from DB | COMMENT |
| LOW | trader/binance/sync_verify_test.go | 123 | // Step 4: Check for missing trades | COMMENT |
| LOW | trader/binance/sync_verify_test.go | 150 | // Step 5: Check for extra/duplicate trades | COMMENT |
| LOW | trader/binance/sync_verify_test.go | 177 | // Step 6: Check for data accuracy | COMMENT |
| LOW | trader/binance/sync_verify_test.go | 243 | // Step 7: Summary by symbol | COMMENT |
| LOW | trader/binance/sync_verify_test.go | 304 | // Step 8: Position verification | COMMENT |
| LOW⚡ | mcp/client.go | 383 | // Step 1: Build request body (via hooks for dynamic dispatch) | COMMENT |
| LOW⚡ | mcp/client.go | 386 | // Step 2: Serialize request body (via hooks for dynamic dispatch) | COMMENT |
| LOW⚡ | mcp/client.go | 392 | // Step 3: Build URL (via hooks for dynamic dispatch) | COMMENT |
| LOW⚡ | mcp/client.go | 396 | // Step 4: Create HTTP request (fixed logic) | COMMENT |
| LOW⚡ | mcp/client.go | 402 | // Step 5: Send HTTP request (fixed logic) | COMMENT |
| LOW⚡ | mcp/client.go | 409 | // Step 6: Read response body (fixed logic) | COMMENT |
| LOW⚡ | mcp/client.go | 415 | // Step 7: Check HTTP status code (fixed logic) | COMMENT |
| LOW⚡ | mcp/client.go | 420 | // Step 8: Parse response (via hooks for dynamic dispatch) | COMMENT |
| LOW⚡ | docs/research/AI-Trader-Analysis-Report.md | 536 | # Step 1: 连接MCP服务 | COMMENT |
| LOW⚡ | docs/research/AI-Trader-Analysis-Report.md | 540 | # Step 2: 加载工具 | COMMENT |
| LOW⚡ | docs/research/AI-Trader-Analysis-Report.md | 544 | # Step 3: 初始化LLM (根据模型类型选择适配器) | COMMENT |
| LOW⚡ | docs/research/AI-Trader-Analysis-Report.md | 547 | # Step 4: 绑定工具 | COMMENT |
| LOW | docs/maintainers/SETUP_GUIDE.md | 36 | ### Step 1: Sync GitHub Labels | COMMENT |
| LOW | docs/maintainers/SETUP_GUIDE.md | 72 | ### Step 2: Enable GitHub Actions | COMMENT |
| LOW | docs/maintainers/SETUP_GUIDE.md | 79 | ### Step 3: Set Up Branch Protection Rules | COMMENT |
| LOW | docs/maintainers/SETUP_GUIDE.md | 103 | ### Step 4: Create GitHub Projects | COMMENT |
| LOW | docs/maintainers/SETUP_GUIDE.md | 115 | ### Step 5: Enable Discussions (Optional but Recommended) | COMMENT |
| LOW | docs/maintainers/SETUP_GUIDE.md | 126 | ### Step 6: Configure Issue Templates | COMMENT |
| LOW | docs/maintainers/SETUP_GUIDE.md | 138 | ### Step 7: Set Up Code Owners (Optional) | COMMENT |
| LOW | docs/maintainers/SETUP_GUIDE.md | 160 | ### Step 8: Configure Notifications | COMMENT |
| LOW⚡ | docs/getting-started/lighter-agent-wallet.md | 17 | ## Step 1: Connect Your Main Wallet | COMMENT |
| LOW⚡ | docs/getting-started/lighter-agent-wallet.md | 24 | ## Step 2: Create Agent Wallet | COMMENT |
| LOW⚡ | docs/getting-started/lighter-agent-wallet.md | 31 | ## Step 3: Save Agent Credentials | COMMENT |
| LOW | docs/getting-started/lighter-agent-wallet.md | 43 | ## Step 4: Configure in NOFX | COMMENT |
| LOW⚡ | docs/getting-started/hyperliquid-agent-wallet.md | 17 | ## Step 1: Connect Your Main Wallet | COMMENT |
| LOW⚡ | docs/getting-started/hyperliquid-agent-wallet.md | 24 | ## Step 2: Create Agent Wallet | COMMENT |
| LOW⚡ | docs/getting-started/hyperliquid-agent-wallet.md | 32 | ## Step 3: Save Agent Credentials | COMMENT |
| 14 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | docs/getting-started/custom-api.md | 103 | "custom_api_key": "your-api-key", | CODE |
| HIGH | docs/getting-started/custom-api.en.md | 103 | "custom_api_key": "your-api-key", | CODE |
| HIGH | docs/api/API_REFERENCE.md | 16 | GET /api/ai500/list?auth=your_api_key | CODE |
| HIGH | docs/api/API_REFERENCE.md | 22 | Authorization: Bearer your_api_key | CODE |
| HIGH⚡ | docs/api/API_REFERENCE.md | 665 | curl "https://nofxos.ai/api/ai500/list?auth=your_api_key" | CODE |
| HIGH⚡ | docs/api/API_REFERENCE.md | 669 | -H "Authorization: Bearer your_api_key" | CODE |
| HIGH⚡ | docs/api/API_REFERENCE.md | 672 | curl "https://nofxos.ai/api/price/ranking?duration=1h&limit=20&auth=your_api_key" | CODE |
| HIGH⚡ | docs/api/API_REFERENCE.md | 675 | curl "https://nofxos.ai/api/price/ranking?duration=1h,4h,24h&limit=10&auth=your_api_key" | CODE |
| HIGH⚡ | docs/api/API_REFERENCE.md | 678 | curl "https://nofxos.ai/api/coin/BTC?auth=your_api_key" | CODE |
| HIGH⚡ | docs/api/API_REFERENCE.md | 681 | curl "https://nofxos.ai/api/coin/BTC?include=netflow,oi&auth=your_api_key" | CODE |
| HIGH⚡ | docs/api/API_REFERENCE.md | 684 | curl "https://nofxos.ai/api/oi/top-ranking?duration=4h&limit=50&auth=your_api_key" | CODE |
| HIGH⚡ | docs/api/API_REFERENCE.md | 687 | curl "https://nofxos.ai/api/oi/low-ranking?duration=24h&limit=30&auth=your_api_key" | CODE |
| HIGH⚡ | docs/api/API_REFERENCE.md | 690 | curl "https://nofxos.ai/api/netflow/top-ranking?type=institution&trade=future&duration=1h&auth=your_api_key" | CODE |
| HIGH⚡ | docs/api/API_REFERENCE.md | 693 | curl "https://nofxos.ai/api/netflow/low-ranking?type=personal&trade=spot&duration=4h&auth=your_api_key" | CODE |
| HIGH⚡ | docs/api/API_REFERENCE.md | 702 | API_KEY = "your_api_key" | CODE |
| HIGH | docs/api/API_REFERENCE.md | 783 | const API_KEY = "your_api_key"; | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | trader/position_snapshot.go | 21 | // Step 1: Delete all OPEN positions | COMMENT |
| LOW⚡ | trader/position_snapshot.go | 28 | // Step 2: Get current positions from exchange | COMMENT |
| LOW | trader/position_snapshot.go | 42 | // Step 3: Create snapshot record for each position | COMMENT |
| LOW | trader/hyperliquid/trader_account.go | 20 | // Step 1: Query Spot account balance | COMMENT |
| LOW⚡ | trader/hyperliquid/trader_account.go | 35 | // Step 2: Query Perpetuals contract account status | COMMENT |
| LOW⚡ | trader/hyperliquid/trader_account.go | 45 | // Step 3: Dynamically select correct summary based on margin mode (CrossMarginSummary or MarginSummary) | COMMENT |
| LOW | trader/hyperliquid/trader_account.go | 93 | // Step 4: Use Withdrawable field (PR #443) | COMMENT |
| LOW | trader/hyperliquid/trader_account.go | 113 | // Step 5: Query xyz dex balance (stock perps, forex, commodities) | COMMENT |
| LOW | trader/hyperliquid/trader_account.go | 149 | // Step 7: Unified Account mode - Spot USDC is used as collateral for Perps | COMMENT |
| LOW⚡ | trader/lighter/integration_test.go | 861 | // Step 2: Set leverage | COMMENT |
| LOW⚡ | trader/lighter/integration_test.go | 871 | // Step 3: Open Long Position | COMMENT |
| LOW⚡ | trader/lighter/integration_test.go | 881 | // Step 4: Verify position | COMMENT |
| LOW⚡ | trader/lighter/integration_test.go | 891 | // Step 5: Place limit order (sell at higher price) | COMMENT |
| LOW⚡ | trader/lighter/integration_test.go | 914 | // Step 7: Cancel all orders | COMMENT |
| LOW⚡ | trader/lighter/integration_test.go | 924 | // Step 8: Close position | COMMENT |
| LOW⚡ | trader/lighter/integration_test.go | 934 | // Step 9: Verify position closed | COMMENT |
| LOW⚡ | trader/lighter/integration_test.go | 943 | // Step 10: Get final balance | COMMENT |
| LOW | trader/lighter/integration_test.go | 848 | // Step 1: Get initial state | COMMENT |
| LOW | trader/lighter/integration_test.go | 902 | // Step 6: Get open orders | COMMENT |
| LOW⚡ | trader/binance/order_sync.go | 64 | // Step 1: Get max trade IDs from local DB for incremental sync | COMMENT |
| LOW⚡ | trader/binance/order_sync.go | 71 | // Step 2: Detect symbols to sync using multiple methods | COMMENT |
| LOW | trader/binance/order_sync.go | 130 | // Step 3: Query trades for changed symbols using fromId (incremental) or time-based (new symbols) | COMMENT |
| LOW⚡ | trader/binance/order_sync_test.go | 256 | // Step 1: Determine lastSyncTime (simulating first run) | COMMENT |
| LOW⚡ | trader/binance/order_sync_test.go | 260 | // Step 2: Detect symbols using all methods | COMMENT |
| LOW | trader/binance/order_sync_test.go | 329 | // Step 3: Query trades for each symbol | COMMENT |
| LOW⚡ | trader/binance/sync_verify_test.go | 41 | // Step 1: Run sync | COMMENT |
| LOW⚡ | trader/binance/sync_verify_test.go | 51 | // Step 2: Get all trades from exchange for verification | COMMENT |
| LOW | trader/binance/sync_verify_test.go | 102 | // Step 3: Get all fills from DB | COMMENT |
| LOW | trader/binance/sync_verify_test.go | 123 | // Step 4: Check for missing trades | COMMENT |
| LOW | trader/binance/sync_verify_test.go | 150 | // Step 5: Check for extra/duplicate trades | COMMENT |
| LOW | trader/binance/sync_verify_test.go | 177 | // Step 6: Check for data accuracy | COMMENT |
| LOW | trader/binance/sync_verify_test.go | 243 | // Step 7: Summary by symbol | COMMENT |
| LOW | trader/binance/sync_verify_test.go | 304 | // Step 8: Position verification | COMMENT |
| LOW⚡ | mcp/client.go | 383 | // Step 1: Build request body (via hooks for dynamic dispatch) | COMMENT |
| LOW⚡ | mcp/client.go | 386 | // Step 2: Serialize request body (via hooks for dynamic dispatch) | COMMENT |
| LOW⚡ | mcp/client.go | 392 | // Step 3: Build URL (via hooks for dynamic dispatch) | COMMENT |
| LOW⚡ | mcp/client.go | 396 | // Step 4: Create HTTP request (fixed logic) | COMMENT |
| LOW⚡ | mcp/client.go | 402 | // Step 5: Send HTTP request (fixed logic) | COMMENT |
| LOW⚡ | mcp/client.go | 409 | // Step 6: Read response body (fixed logic) | COMMENT |
| LOW⚡ | mcp/client.go | 415 | // Step 7: Check HTTP status code (fixed logic) | COMMENT |
| LOW⚡ | mcp/client.go | 420 | // Step 8: Parse response (via hooks for dynamic dispatch) | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | install.sh | 6 | # Usage: | COMMENT |
| LOW | install-stable.sh | 5 | # Usage: | COMMENT |
| LOW | mcp/options.go | 17 | // Usage example: | COMMENT |
| LOW | mcp/options.go | 31 | // Usage example: | COMMENT |
| LOW | mcp/options.go | 46 | // Usage example: | COMMENT |
| LOW | mcp/options.go | 57 | // Usage example: | COMMENT |
| LOW | mcp/options.go | 67 | // Usage example: | COMMENT |
| LOW | mcp/options.go | 81 | // Usage example: | COMMENT |
| LOW | mcp/options.go | 93 | // Usage example: | COMMENT |
| LOW | mcp/options.go | 104 | // Usage example: | COMMENT |
| LOW | mcp/options.go | 157 | // Usage example: | COMMENT |
| LOW | mcp/options.go | 170 | // Usage example: | COMMENT |
| LOW | mcp/options.go | 183 | // Usage example: | COMMENT |
| LOW | mcp/request_builder.go | 24 | // Usage example: | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | install.sh | 1 | #!/bin/bash | COMMENT |
| LOW | cli.go | 21 | ) | COMMENT |
| LOW | web/src/pages/StrategyMarketPage.tsx | 21 | title={t('strategyMarket', language) || 'Strategy Market'} | COMMENT |
| LOW | trader/auto_trader_loop.go | 201 | if at.isSafeMode() { | COMMENT |
| LOW | trader/auto_trader_loop.go | 221 | // logger.Infof("📋 AI decision list (%d items):\n", len(kernel.Decisions)) | COMMENT |
| LOW | trader/okx/trader_account.go | 81 | // Update cache | COMMENT |
| LOW | trader/lighter/trader.go | 581 | // 2. side: BUY or SELL | COMMENT |
| LOW | provider/hyperliquid/kline.go | 461 | } | COMMENT |
| LOW | mcp/interface.go | 21 | // Returns the complete final text when done. | COMMENT |
| LOW | mcp/request_builder.go | 21 | COMMENT | |
| LOW | mcp/client.go | 81 | // Hooks are used to implement dynamic dispatch (polymorphism) | COMMENT |
| LOW | mcp/client.go | 101 | // // Custom logger | COMMENT |
| LOW | mcp/intro/BUILDER_EXAMPLES.md | 461 | response, err := client.CallWithRequest(request) | COMMENT |
| LOW | mcp/provider/claude.go | 1 | // Package provider — ClaudeClient implements the Anthropic Messages API. | COMMENT |
| LOW | telegram/agent/agent.go | 181 | return sb.String() | COMMENT |
| LOW | telegram/agent/apicall.go | 41 | // botAPIAllowlist enumerates the endpoints the Telegram LLM agent is permitted | COMMENT |
| LOW | api/server.go | 181 | s.route(api, "POST", "/strategies/estimate-tokens", "Estimate token usage for a strategy config", s.handleEstimateToke | COMMENT |
| LOW | kernel/engine_prompt.go | 141 | } | COMMENT |
| LOW | store/position_reconcile.go | 21 | // | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | docs/research/AI-Trader-Analysis-Report.md | 727 | except Exception as e: | CODE |
| LOW | docs/research/AI-Trader-Analysis-Report.md | 1374 | except Exception as e: | CODE |
| MEDIUM | .github/workflows/scripts/calculate_coverage.py | 26 | print(f"Error: Coverage file {coverage_file} not found", file=sys.stderr) | CODE |
| MEDIUM | .github/workflows/scripts/calculate_coverage.py | 40 | print(f"Error running go tool cover: {e}", file=sys.stderr) | CODE |
| MEDIUM | .github/workflows/scripts/calculate_coverage.py | 128 | print(f"Error generating coverage report: {e}", file=sys.stderr) | CODE |
| MEDIUM | .github/workflows/scripts/comment_pr.py | 101 | print(f"Error fetching comments: {e}", file=sys.stderr) | STRING |
| MEDIUM | .github/workflows/scripts/comment_pr.py | 132 | print(f"Error posting comment: {e}", file=sys.stderr) | STRING |
| MEDIUM | .github/workflows/scripts/comment_pr.py | 164 | print(f"Error updating comment: {e}", file=sys.stderr) | STRING |
| MEDIUM⚡ | .github/workflows/scripts/comment_pr.py | 216 | print("Error: GITHUB_TOKEN environment variable not set", file=sys.stderr) | CODE |
| MEDIUM⚡ | .github/workflows/scripts/comment_pr.py | 220 | print("Error: GITHUB_REPOSITORY environment variable not set", file=sys.stderr) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | docs/research/AI-Trader-Analysis-Report.md | 809 | 带重试的LLM调用 实现指数退避策略处理常见错误: - RateLimitError: API速率限制 - APIError: 服务端错误 - TimeoutError: 请求超时 Ar | STRING |
| HIGH | docs/research/AI-Trader-Analysis-Report.md | 994 | 执行交易指令 Args: symbol: 交易标的代码 - 美股: "AAPL", "MSFT", "GOOGL"等 - 加密货币: "BTCUSDT", | STRING |
| HIGH | docs/research/AI-Trader-Analysis-Report.md | 1310 | 执行数学计算 支持基础数学运算和金融计算函数。 Args: expression: 数学表达式字符串 支持的运算: 基础运算: +, -, *, /, ** ( | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | web/src/components/trader/ModelConfigModal.tsx | 1151 | function StandardProviderConfigForm({ | CODE |
| LOW | web/src/components/charts/TradingViewChart.tsx | 52 | function TradingViewChartComponent({ | CODE |
| LOW | web/src/components/charts/ChartTabs.tsx | 48 | function getMarketTypeFromExchange(exchangeId: string | undefined): MarketType { | CODE |
| LOW | web/src/components/common/WebCryptoEnvironmentCheck.tsx | 20 | export function WebCryptoEnvironmentCheck({ | CODE |
| LOW | web/src/components/common/HyperliquidWalletConnect.tsx | 115 | function getPreferredWalletProvider(): WalletProvider | undefined { | CODE |
| LOW | web/src/components/common/HyperliquidWalletConnect.tsx | 459 | async function reuseSavedExchangeIfPresent(address: string) { | CODE |
| LOW | web/src/components/common/HyperliquidWalletConnect.tsx | 913 | function resetTradingAuthorization() { | CODE |
| LOW | web/src/lib/crypto.ts | 211 | export function diagnoseWebCryptoEnvironment(): WebCryptoEnvironmentInfo { | CODE |
| LOW | web/src/lib/onboarding.ts | 31 | export function hasCompletedBeginnerOnboarding(): boolean { | CODE |
| LOW | web/src/lib/onboarding.ts | 35 | export function markBeginnerOnboardingCompleted() { | CODE |
| LOW | web/src/pages/TraderDashboardPage.tsx | 42 | function getExchangeDisplayNameFromList( | CODE |
| LOW | docs/research/AI-Trader-Analysis-Report.md | 1809 | def _get_trading_restrictions(self) -> str: | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | .github/workflows/pr-checks.yml | 336 | # Check if any critical checks failed (excluding validate-pr which is advisory) | COMMENT |
| LOW | .github/workflows/scripts/calculate_coverage.py | 172 | # Output results | COMMENT |
| LOW⚡ | .github/workflows/scripts/comment_pr.py | 223 | # Check if fork PR | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | api/crypto_handler.go | 78 | // TODO: Add validation for other chains | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | .github/workflows/scripts/calculate_coverage.py | 138 | def set_github_output(name: str, value: str) -> None: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | .github/workflows/scripts/calculate_coverage.py | 12 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | .github/workflows/scripts/calculate_coverage.py | 15 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | api/utils_test.go | 236 | input: "user@example.com", | CODE |