Your AI trading terminal assistant for US stocks, commodities, forex, and crypto.
This report summarizes scanner evidence for NoFxAiOS/nofx, a Go project with 13,033 GitHub stars. SynthScan examined 175,877 lines of code across 596 source files, recording 419 pattern matches distributed across 16 syntactic categories. The legacy adjusted pattern signal is 6.4 (Moderate pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 294 finding(s).
Are imports declared and package/API names verified? 20 finding(s).
Are wrappers, guards, and repeated structures necessary? 120 finding(s).
Which changes need focused human review? 419 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 419 distinct pattern matches across 16 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| 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 | 444 | // ClampLimits above bounds it (ratio 0.5–10, leverage caps), and the | COMMENT |
| MEDIUM | trader/auto_trader.go | 706 | // calculatePnLPercentage calculates P&L percentage (based on margin, automatically considers leverage) | COMMENT |
| MEDIUM | trader/auto_trader_throttle.go | 16 | // values. Thresholds are PRICE-move percentages (leverage-independent). | COMMENT |
| MEDIUM | trader/auto_trader_loop.go | 534 | // Calculate P&L percentage (based on margin, considering leverage) | COMMENT |
| MEDIUM | trader/auto_trader_loop.go | 624 | // 5. Get leverage from strategy config | COMMENT |
| MEDIUM | trader/auto_trader_risk.go | 15 | // position's favor (leverage-independent — at 10x the old margin-basis | COMMENT |
| MEDIUM | trader/auto_trader_risk.go | 88 | // not tighten as leverage grows; the margin-basis (leveraged) value is | 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/auto_trader_throttle_test.go | 51 | // At 10x leverage the exchange reports margin-based PnL: -6% margin is | 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 | 53 | // Fail closed before touching protective orders if leverage cannot be set. | COMMENT |
| MEDIUM | trader/hyperliquid/trader_orders.go | 1176 | // Set leverage if specified. | COMMENT |
| MEDIUM | trader/hyperliquid/authorization_test.go | 50 | // accidentally gets past the leverage guard. No funded key is used. | COMMENT |
| MEDIUM | trader/hyperliquid/authorization.go | 72 | // The SDK's default exchange indexes only core perps. HIP-3 leverage must use | 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 |
| 62 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 | 241 | // ── Format overrides for Anthropic endpoints ───────────────────────────────── | COMMENT |
| MEDIUM | mcp/payment/x402.go | 129 | // ── Shared x402 types ──────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | mcp/payment/x402.go | 160 | // ── Shared x402 helpers ────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | mcp/payment/x402.go | 663 | // ── 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 | 22 | // Step 1: Query Spot account balance | COMMENT |
| LOW⚡ | trader/hyperliquid/trader_account.go | 53 | // Step 2: Query Perpetuals contract account status | COMMENT |
| LOW⚡ | trader/hyperliquid/trader_account.go | 63 | // Step 3: Dynamically select correct summary based on margin mode (CrossMarginSummary or MarginSummary) | COMMENT |
| LOW | trader/hyperliquid/trader_account.go | 111 | // Step 4: Use Withdrawable field (PR #443) | COMMENT |
| LOW | trader/hyperliquid/trader_account.go | 131 | // Step 5: Query xyz dex balance (stock perps, forex, commodities) | COMMENT |
| LOW | trader/hyperliquid/trader_account.go | 175 | // 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 | 409 | // Step 1: Build request body (via hooks for dynamic dispatch) | COMMENT |
| LOW⚡ | mcp/client.go | 412 | // Step 2: Serialize request body (via hooks for dynamic dispatch) | COMMENT |
| LOW⚡ | mcp/client.go | 418 | // Step 3: Build URL (via hooks for dynamic dispatch) | COMMENT |
| LOW⚡ | mcp/client.go | 422 | // Step 4: Create HTTP request (fixed logic) | COMMENT |
| LOW⚡ | mcp/client.go | 428 | // Step 5: Send HTTP request (fixed logic) | COMMENT |
| LOW⚡ | mcp/client.go | 435 | // Step 6: Read response body (fixed logic) | COMMENT |
| LOW⚡ | mcp/client.go | 441 | // Step 7: Check HTTP status code (fixed logic) | COMMENT |
| LOW⚡ | mcp/client.go | 446 | // 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 | 22 | // Step 1: Query Spot account balance | COMMENT |
| LOW⚡ | trader/hyperliquid/trader_account.go | 53 | // Step 2: Query Perpetuals contract account status | COMMENT |
| LOW⚡ | trader/hyperliquid/trader_account.go | 63 | // Step 3: Dynamically select correct summary based on margin mode (CrossMarginSummary or MarginSummary) | COMMENT |
| LOW | trader/hyperliquid/trader_account.go | 111 | // Step 4: Use Withdrawable field (PR #443) | COMMENT |
| LOW | trader/hyperliquid/trader_account.go | 131 | // Step 5: Query xyz dex balance (stock perps, forex, commodities) | COMMENT |
| LOW | trader/hyperliquid/trader_account.go | 175 | // 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 | 409 | // Step 1: Build request body (via hooks for dynamic dispatch) | COMMENT |
| LOW⚡ | mcp/client.go | 412 | // Step 2: Serialize request body (via hooks for dynamic dispatch) | COMMENT |
| LOW⚡ | mcp/client.go | 418 | // Step 3: Build URL (via hooks for dynamic dispatch) | COMMENT |
| LOW⚡ | mcp/client.go | 422 | // Step 4: Create HTTP request (fixed logic) | COMMENT |
| LOW⚡ | mcp/client.go | 428 | // Step 5: Send HTTP request (fixed logic) | COMMENT |
| LOW⚡ | mcp/client.go | 435 | // Step 6: Read response body (fixed logic) | COMMENT |
| LOW⚡ | mcp/client.go | 441 | // Step 7: Check HTTP status code (fixed logic) | COMMENT |
| LOW⚡ | mcp/client.go | 446 | // 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 | 241 | // logger.Infof(strings.Repeat("=", 70) + "\n") | COMMENT |
| LOW | trader/okx/trader_account.go | 81 | // Update cache | COMMENT |
| LOW | trader/hyperliquid/trader.go | 61 | "GOLD": true, "SILVER": true, | 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 | // LastCallSettledUSD is the actually-settled cost (USD) of the most | COMMENT |
| LOW | mcp/client.go | 101 | func New() AIClient { | 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 |
| LOW | scripts/optimize/search.py | 127 | except Exception as e: # sklearn not installed etc. | 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 | 1154 | 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 | 547 | async function reuseSavedExchangeIfPresent(address: string) { | CODE |
| LOW | web/src/components/common/HyperliquidWalletConnect.tsx | 1181 | function resetTradingAuthorization() { | CODE |
| LOW | web/src/lib/crypto.ts | 211 | export function diagnoseWebCryptoEnvironment(): WebCryptoEnvironmentInfo { | CODE |
| LOW | web/src/lib/hyperliquidWallet.ts | 108 | export function getPreferredWalletProvider(): WalletProvider | undefined { | CODE |
| LOW | web/src/lib/hyperliquidWallet.ts | 131 | export async function getWalletProviderForAddress( | CODE |
| LOW | web/src/lib/hyperliquidWallet.ts | 165 | export async function ensureWalletSigningAccount(provider: WalletProvider, expectedAddress: string) { | CODE |
| LOW | web/src/lib/hyperliquidWallet.ts | 298 | export async function signHyperliquidUserAction( | 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 | scripts/optimize/simulate.py | 19 | CODE | |
| LOW | scripts/optimize/search.py | 12 | CODE | |
| LOW | .github/workflows/scripts/calculate_coverage.py | 12 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/optimize/simulate.py | 148 | CODE | |
| LOW | .github/workflows/scripts/calculate_coverage.py | 15 | CODE |
| 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 | api/utils_test.go | 236 | input: "user@example.com", | CODE |