opportunity-scanner by senpi-ai/senpi-skills
npx skills add https://github.com/senpi-ai/senpi-skills --skill opportunity-scannerHyperliquid 上有 521 个永续合约。获取所有合约的 K 线数据并计算技术指标 = 超过 50 万代币。此扫描器会筛选所有合约,但只在实际机会上消耗代币。
所有计算均在 Python 中完成。几乎不使用 LLM 代币。
数据源:BTC 4 小时 + 1 小时 K 线(2 次 API 调用)。输出:btc_trend(strong_down/down/neutral/up/strong_up)以及应用于所有最终分数的 macro_modifier。可通过 scanner-config.json 配置。
数据源:单次 API 调用 — metaAndAssetCtxs。筛选条件:24 小时交易量 > 50 万美元(可配置)。输出:约 70 个通过最低流动性要求的资产。
数据源:leaderboard_get_markets + leaderboard_get_top(limit=100)。每个资产有两个条目(多头 + 空头)— 保留主导方向。新鲜度:avgAtPeak(>85% = 活跃,<50% = 陈旧),。筛选:根据快速得分取前 15-16 名。强制包含前 8 名聪明钱资产。
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
nearPeakPct通过 ThreadPoolExecutor 并行获取 K 线数据(约 20 秒,顺序执行约 60 秒)。
| 时间框架 | 周期 | K 线数量 | 用途 |
|---|---|---|---|
| 4 小时 | 7 天 | ~42 | 宏观趋势(EMA 5/13 交叉) |
| 1 小时 | 24 小时 | ~24 | 小时趋势结构 + RSI、成交量、支撑/阻力、形态 |
| 15 分钟 | 6 小时 | ~24 | 入场:RSI、形态、动量、成交量背离 |
v5:小时趋势分类 — 分析 1 小时数据中的摆动高点和低点,将其分类为 UP/DOWN/NEUTRAL。算法请参阅 references/hourly-trend.md。
这是所有交易决策的首要关卡。 切勿在 hourlyTrend: "DOWN" 时开立 LONG,或在 hourlyTrend: "UP" 时开立 SHORT。
每个时间框架的错误恢复:如果 15 分钟数据获取失败,分析将继续使用 4 小时和 1 小时数据。
将结果保存到 scan-history.json。计算 scoreDelta(与上次扫描相比的变化)和 scanStreak(连续出现的次数)。
完整的分数明细请参阅 references/scoring.md。
盈亏贡献层级、交易者数量(v5:400+ = +30 分)、加速、新鲜度。交易者数量将真实信号与噪音区分开来 — 130 名交易者的 conviction 4 导致了反复震荡,而 400+ 名交易者的 conviction 4 则始终是真实的。
成交量、成交量激增、未平仓合约、OI/成交量比率。
4 小时趋势一致性、1 小时趋势结构(v5)、RSI 多时间框架收敛、成交量确认、K 线形态、动量。小时级别逆势:-30 分(v5)。
中性资金费率最佳(+40)。有利的极端情况为强势(+35)。不利的极端情况会扣分(-20)。
应用于最终分数。在 BTC 下跌趋势期间惩罚山寨币 LONG,提升 SHORT(反之亦然)。所有修正因子均可配置。
这些条件会导致机会被完全跳过,而不仅仅是扣分:
| 条件 | 理由 |
|---|---|
| 小时级别逆势 | 聪明钱在 1 分钟反弹上的 conviction 无法推翻 2 周的下跌趋势。价值 346 美元的教训。 |
| 极端 RSI(SHORT < 20,LONG > 80) | 反转在即 |
| 4 小时级别逆势且强度 > 50 | 强劲的宏观趋势对你不利 |
| 成交量萎缩(两个时间框架的比率均 < 0.5) | 缺乏流动性 |
| 资金费率严重对你不利(> 50% 年化) | 手续费拖累会吞噬利润 |
| BTC 宏观逆风 > 30 分 | 全市场风险 |
┌──────────────────────────────────────────┐
│ 阶段 0: BTC 宏观(2 次 API 调用) │
├──────────────────────────────────────────┤
│ 阶段 1: metaAndAssetCtxs → ~70 个资产 │
├──────────────────────────────────────────┤
│ 阶段 2: 聪明钱 + 新鲜度 → 前 15-16 名 │
├──────────────────────────────────────────┤
│ 阶段 3: 并行 K 线获取 + v5 │
│ 小时趋势分类 │
├──────────────────────────────────────────┤
│ 阶段 4: 跨扫描动量 │
├──────────────────────────────────────────┤
│ v5: 硬性淘汰条件检查 │
├──────────────────────────────────────────┤
│ 最终: 带分数的 JSON → LLM 格式化报告 │
│ 总计: ~5k LLM 代币 │
└──────────────────────────────────────────┘
| 文件 | 用途 |
|---|---|
scripts/opportunity-scan-v5.py | Python 流水线 — 获取数据、评分、应用小时关卡 |
scripts/opportunity-report.sh | 包装器 — 运行流水线 + 输出 LLM 提示 |
scanner-config.json | 用户偏好:风险、杠杆、宏观修正因子 |
scan-history.json | 自动维护:最近 12 次扫描用于跨扫描追踪 |
active-positions.json | 当前持仓(冲突标志) |
包含所有选项的完整配置请参阅 references/config-schema.md。
完整的输出 JSON 模式请参阅 references/output-schema.md。
每个机会的关键字段:asset、direction、leverage、finalScore、hourlyTrend、trendAligned、pillarScores、smartMoney、technicals、funding、risks、scoreDelta、scanStreak。
被淘汰的资产将单独报告,包含 reason 和 wouldHaveScored 以提高透明度。
v5 对 Python 扫描器的补充(小时趋势分类、评分变更、硬性淘汰逻辑)请参阅 references/source-code-v5.md。
每 10-30 分钟运行一次(可选时间感知调度):
python3 scripts/opportunity-scan-v5.py | python3 scripts/opportunity-report.sh
可直接替换。所有 v5 功能都有合理的默认值:
hourlyTrendGate: false 可禁用)hourlyTrend 和 trendAligneddisqualifiedAssets 显示被过滤的内容每周安装次数
113
代码仓库
GitHub 星标数
52
首次出现
2026 年 2 月 27 日
安全审计
安装于
openclaw109
opencode106
gemini-cli106
github-copilot106
codex106
kimi-cli106
521 perps on Hyperliquid. Fetching candles + computing technicals for all = 500k+ tokens. This scanner screens everything but only burns tokens on real opportunities.
All computation in Python. Near-zero LLM tokens.
Source: BTC 4h + 1h candles (2 API calls). Output: btc_trend (strong_down/down/neutral/up/strong_up) and a macro_modifier applied to all final scores. Configurable via scanner-config.json.
Source: Single API call — metaAndAssetCtxs. Filter: 24h volume > $500K (configurable). Output: ~70 assets that pass minimum liquidity.
Sources: leaderboard_get_markets + leaderboard_get_top (limit=100). Two entries per asset (long + short) — keeps dominant side. Freshness: avgAtPeak (>85% = live, <50% = stale), nearPeakPct. Filter: Top 15-16 by quick score. Force-include top 8 SM assets.
Parallel candle fetches via ThreadPoolExecutor (~20s vs ~60s sequential).
| Timeframe | Period | Candles | Purpose |
|---|---|---|---|
| 4h | 7 days | ~42 | Macro trend (EMA 5/13 crossover) |
| 1h | 24h | ~24 | Hourly trend structure + RSI, volume, S/R, patterns |
| 15m | 6h | ~24 | Entry: RSI, patterns, momentum, volume divergence |
v5: Hourly Trend Classification — analyzes swing highs/lows in 1h data to classify as UP/DOWN/NEUTRAL. See references/hourly-trend.md for the algorithm.
This is the #1 gate for all trade decisions. NEVER open a LONG on hourlyTrend: "DOWN" or a SHORT on hourlyTrend: "UP".
Per-TF error recovery: if 15m fetch fails, analysis continues with 4h+1h data.
Saves results to scan-history.json. Computes scoreDelta (change from last scan) and scanStreak (consecutive appearances).
See references/scoring.md for the complete point breakdowns.
PnL contribution tiers, trader count (v5: 400+ = +30 pts), acceleration, freshness. Trader count separates real signals from noise — conviction 4 with 130 traders caused whipsaws, conviction 4 with 400+ was consistently real.
Volume, volume surge, open interest, OI/volume ratio.
4h trend alignment, 1h trend structure (v5), RSI multi-TF convergence, volume confirmation, candlestick patterns, momentum. Counter-trend on hourly: -30 points (v5).
Neutral funding is best (+40). Favorable extreme is strong (+35). Unfavorable extreme hurts (-20).
Applied to final scores. Penalizes alt LONGs during BTC downtrend, boosts SHORTs (and vice versa). All modifiers configurable.
These cause an opportunity to be skipped entirely , not just penalized:
| Condition | Rationale |
|---|---|
| Counter-trend on hourly | SM conviction on a 1-min bounce doesn't override a 2-week downtrend. $346 lesson. |
| Extreme RSI (< 20 for SHORTs, > 80 for LONGs) | Reversal imminent |
| Counter-trend on 4h with strength > 50 | Strong macro against you |
| Volume dying (ratio < 0.5 on both TFs) | No liquidity |
| Funding heavily against you (> 50% ann) | Fee drag kills profits |
| BTC macro headwind > 30 pts | Market-wide risk |
┌──────────────────────────────────────────┐
│ Stage 0: BTC macro (2 API calls) │
├──────────────────────────────────────────┤
│ Stage 1: metaAndAssetCtxs → ~70 assets │
├──────────────────────────────────────────┤
│ Stage 2: SM + freshness → top 15-16 │
├──────────────────────────────────────────┤
│ Stage 3: parallel candle fetch + v5 │
│ hourly trend classification │
├──────────────────────────────────────────┤
│ Stage 4: cross-scan momentum │
├──────────────────────────────────────────┤
│ v5: Hard disqualifier check │
├──────────────────────────────────────────┤
│ Final: scored JSON → LLM formats report │
│ Total: ~5k LLM tokens │
└──────────────────────────────────────────┘
| File | Purpose |
|---|---|
scripts/opportunity-scan-v5.py | Python pipeline — fetches, scores, applies hourly gate |
scripts/opportunity-report.sh | Wrapper — runs pipeline + outputs LLM prompt |
scanner-config.json | User prefs: risk, leverage, macro modifiers |
scan-history.json | Auto-maintained: last 12 scans for cross-scan tracking |
active-positions.json | Current positions (conflict flags) |
See references/config-schema.md for the complete config with all options.
See references/output-schema.md for the full output JSON schema.
Key fields per opportunity: asset, direction, leverage, finalScore, hourlyTrend, trendAligned, pillarScores, smartMoney, technicals, funding, risks, scoreDelta, .
Disqualified assets reported separately with reason and wouldHaveScored for transparency.
See references/source-code-v5.md for the v5 additions to the Python scanner (hourly trend classification, scoring changes, hard disqualifier logic).
Run every 10-30 minutes (time-aware scheduling optional):
python3 scripts/opportunity-scan-v5.py | python3 scripts/opportunity-report.sh
Drop-in replacement. All v5 features have sensible defaults:
hourlyTrendGate: false to disable)hourlyTrend and trendAligned added to outputdisqualifiedAssets shows what was filteredWeekly Installs
113
Repository
GitHub Stars
52
First Seen
Feb 27, 2026
Security Audits
Gen Agent Trust HubFailSocketPassSnykPass
Installed on
openclaw109
opencode106
gemini-cli106
github-copilot106
codex106
kimi-cli106
Skills CLI 使用指南:AI Agent 技能包管理器安装与管理教程
43,100 周安装
scanStreak