🔍 加密日盘猎杀 Skill v6.0 版本 : 6.0 | 日期 : 2026-05-03 | 风格 : 稳健 + 风投双层 v6核心:Polymarket市场概率 + Binance广场新闻 = 综合判断方向。YES和NO都可以买。 --- 核心逻辑 不是预测市场,是验证市场。市场说80%会发生,新闻也支持 → 买YES。新闻不支持 → 不交易。 --- 两层分类 | 层级 | YES价格区间 | 含义 | 仓位上限 | |------|-----------|------|---------| | 稳健层 | 80-96¢ | 市场认为大概率发生,新闻确认就买 | $4/笔 | | 风投层 | 60-80¢ | 市场认为中概率,需要新闻+趋势都支持 | $2.5/笔 | NO交易 : 当YES价格在4-40¢时,NO价格在60-96¢区间。新闻支持NO方向就买NO。 总风险上限 : $8 | Bankroll : $26-28 --- 决策流程 --- 硬性规则 | 规则 | 说明 | |------|------| | UP/DOWN盘禁止 | 50/50赌博,无edge | | T<3h禁止 | 流动性太差,结算太近 | | YES 96¢禁止 | 2% fee后负EV | | YES<4¢禁止 | 纯赌博 | | 单笔≤$4 | 仓位控制 | | 总风险≤$8 |…

, '')\n # \"1pt40\" → \"1.40\" (XRP格式)\n s = s.replace('pt', '.')\n # \"78k\" → 78000\n if s.lower().endswith('k'):\n try:\n return float(s[:-1]) * 1000\n except:\n pass\n try:\n return float(s)\n except:\n return 0.0\n\n\ndef classify_layer(yes_price: float, direction: str) -> tuple:\n \"\"\"分层: 稳健/风投/禁止\"\"\"\n if direction == \"YES\":\n if STABLE_YES_MIN \u003c= yes_price \u003c= STABLE_YES_MAX:\n return \"稳健\", \"YES\"\n elif RISK_YES_MIN \u003c= yes_price \u003c STABLE_YES_MIN:\n return \"风投\", \"YES\"\n elif yes_price > STABLE_YES_MAX:\n return \"禁止\", \"YES\"\n else:\n return \"禁止\", \"YES\"\n else: # NO\n no_price = 1 - yes_price\n if NO_YES_MIN \u003c= yes_price \u003c= 0.20:\n return \"稳健\", \"NO\"\n elif 0.20 \u003c yes_price \u003c= NO_YES_MAX:\n return \"风投\", \"NO\"\n else:\n return \"禁止\", \"NO\"\n\n\ndef fetch_latest_news() -> list:\n \"\"\"\n 从web搜索Binance广场最新6h内的加密新闻\n 返回: [{title, time, direction, coin, impact}]\n \"\"\"\n # 这里在实际运行时会由hunt.sh调用web搜索\n # decision_engine自己不做网络请求,依赖调用方注入\n # 从news_direction.json读取(如果有)\n news_data = load_json(DATA_DIR / \"news_direction.json\", {})\n if news_data:\n score = float(news_data.get(\"score\", 0))\n direction = \"BULLISH\" if score > 0.1 else (\"BEARISH\" if score \u003c -0.1 else \"NEUTRAL\")\n return [{\n 'direction': direction,\n 'confidence': min(1.0, abs(score)),\n 'source': 'news_direction.json',\n }]\n return [{'direction': 'NEUTRAL', 'confidence': 0.0, 'source': 'default'}]\n\n\ndef get_trend_info(trend_data: dict, coin: str) -> tuple:\n \"\"\"获取趋势 (direction, price)\"\"\"\n d = trend_data.get(coin, {})\n if not d:\n return \"NEUTRAL\", 0\n trend = d.get(\"trend\", \"NEUTRAL\")\n price = d.get(\"price\", 0)\n if trend in (\"STRONG_UP\", \"UP\"):\n return \"UP\", price\n elif trend in (\"STRONG_DOWN\", \"DOWN\"):\n return \"DOWN\", price\n return \"NEUTRAL\", price\n\n\ndef judge_trade(\n yes_price, direction, layer,\n news_items, trend_dir,\n market_type, price, threshold, hours_left\n) -> tuple:\n \"\"\"\n 综合判断\n \n 稳健层: 价格对就直接买,除非有重大利空反转信号\n 风投层: 需要新闻支持\n \n 权重: 新闻60% > 趋势20% > 价格位置20%\n \n Returns: (should_trade, reason, confidence)\n \"\"\"\n is_above = market_type == \"ABOVE\"\n price_above = price > threshold if threshold > 0 else False\n \n # 取最强的新闻信号\n news_dir = \"NEUTRAL\"\n news_conf = 0.0\n for n in news_items:\n if abs(n.get('confidence', 0)) > news_conf:\n news_dir = n.get('direction', 'NEUTRAL')\n news_conf = n.get('confidence', 0)\n \n # ── 判断新闻是否支持/反对交易方向 ──\n if direction == \"YES\":\n news_supports = (is_above and news_dir == \"BULLISH\") or (not is_above and news_dir == \"BEARISH\")\n news_opposes = (is_above and news_dir == \"BEARISH\") or (not is_above and news_dir == \"BULLISH\")\n trend_supports = (is_above and trend_dir == \"UP\") or (not is_above and trend_dir == \"DOWN\")\n price_supports = (is_above and price_above) or (not is_above and not price_above)\n else: # NO\n news_supports = (is_above and news_dir == \"BEARISH\") or (not is_above and news_dir == \"BULLISH\")\n news_opposes = (is_above and news_dir == \"BULLISH\") or (not is_above and news_dir == \"BEARISH\")\n trend_supports = (is_above and trend_dir == \"DOWN\") or (not is_above and trend_dir == \"UP\")\n price_supports = not ((is_above and price_above) or (not is_above and not price_above))\n \n score = 0\n reasons = []\n \n # 新闻权重60%\n if news_supports:\n score += news_conf * 0.60\n reasons.append(f\"新闻{news_dir}支持\")\n elif news_opposes:\n score -= 0.30\n reasons.append(f\"⚠️新闻{news_dir}反对\")\n else:\n # NEUTRAL: 不加分也不扣分\n pass\n \n # 趋势权重20% (辅助)\n if trend_supports:\n score += 0.20\n reasons.append(f\"趋势{trend_dir}辅助\")\n \n # 价格位置20%\n if price_supports:\n score += 0.20\n reasons.append(\"价格位置支持\")\n \n # ── 层级判断 ──\n if layer == \"稳健\":\n # 稳健层: 价格大概率对,直接买\n # 唯一拦路虎: 重大利空反转\n if news_opposes and news_conf > 0.3:\n return False, f\"⚠️重大反转信号: {news_dir} conf={news_conf:.2f} | \" + \" | \".join(reasons), score\n # 价格位置不对也拦\n if not price_supports:\n return False, f\"价格位置不支持(价格{'\u003c低于阈值' if is_above else '>高于阈值'}) | \" + \" | \".join(reasons), score\n # 通过\n return True, \" | \".join(reasons) if reasons else \"稳健层直接通过\", max(score, 0.3)\n \n else: # 风投\n # 风投层: 需要新闻或趋势支持\n if score >= 0.35:\n return True, \" | \".join(reasons), score\n else:\n return False, f\"评分{score:.2f}\u003c0.35: \" + \" | \".join(reasons), score\n\n\ndef calc_position(layer, yes_price, direction, confidence):\n if layer == \"稳健\":\n base = MAX_POSITION_STABLE\n else:\n base = MAX_POSITION_RISK\n pos = base * max(confidence, 0.4) # 最低40%仓位\n pos = min(pos, BANKROLL * 0.15)\n return max(MIN_POSITION, round(pos, 1))\n\n\n# ━━━ 主逻辑 ━━━\ndef make_decisions():\n actionable = load_json(DATA_DIR / \"actionable\", [])\n if isinstance(actionable, dict):\n actionable = list(actionable.values())\n trend_data = load_json(DATA_DIR / \"trend_analysis.json\", {})\n news_items = fetch_latest_news()\n \n cst = datetime.now(timezone(timedelta(hours=8)))\n print(f\"\\n{'━'*60}\")\n print(f\"Decision Engine v6.1 — {cst.strftime('%Y-%m-%d %H:%M')} CST\")\n print(f\" 市场: {len(actionable)}\")\n news_dir = news_items[0]['direction'] if news_items else 'NEUTRAL'\n print(f\" 新闻: {news_dir}\")\n print(f\"{'━'*60}\")\n \n trades = []\n total_risk = 0.0\n \n for raw in actionable:\n if not isinstance(raw, dict):\n continue\n coin = raw.get(\"coin\", \"?\").upper()\n mtype = raw.get(\"type\", \"UNKNOWN\").upper()\n yes_price = raw.get(\"yes_price\", 0)\n threshold = parse_threshold(raw.get(\"threshold\", \"\"))\n hours_left = float(raw.get(\"hours_left\", 0))\n question = raw.get(\"question\", \"\")\n market_slug = raw.get(\"market_slug\", \"\")\n \n if not yes_price or mtype in (\"UPDOWN\", \"UNKNOWN\") or threshold \u003c= 0 or hours_left \u003c 2:\n continue\n \n trend_dir, price = get_trend_info(trend_data, coin)\n if price \u003c= 0:\n continue\n \n # 尝试YES和NO两个方向\n candidates = []\n for direction in [\"YES\", \"NO\"]:\n layer, _ = classify_layer(yes_price, direction)\n if layer == \"禁止\":\n continue\n \n should, reason, confidence = judge_trade(\n yes_price, direction, layer,\n news_items, trend_dir,\n mtype, price, threshold, hours_left\n )\n if should:\n pos = calc_position(layer, yes_price, direction, confidence)\n candidates.append({\n 'direction': direction, 'layer': layer,\n 'confidence': confidence, 'reason': reason, 'position': pos,\n })\n \n if not candidates:\n print(f\" ❌ {coin} {mtype}@{threshold:,.0f} YES={yes_price:.0%} | 无通过方向\")\n continue\n \n best = max(candidates, key=lambda c: c['confidence'])\n \n if total_risk + best['position'] > MAX_TOTAL_RISK:\n best['position'] = MAX_TOTAL_RISK - total_risk\n if best['position'] \u003c MIN_POSITION:\n continue\n \n total_risk += best['position']\n \n if best['direction'] == \"YES\":\n payoff, cost = 1 - yes_price, yes_price\n else:\n payoff, cost = yes_price, 1 - yes_price\n rr = payoff / cost if cost > 0 else 0\n buf = abs(price - threshold) / price * 100 if price > 0 else 0\n \n trades.append({\n 'market': market_slug,\n 'question': question[:80],\n 'coin': coin,\n 'market_type': mtype,\n 'threshold': threshold,\n 'yes_price': yes_price,\n 'direction': best['direction'],\n 'layer': best['layer'],\n 'news_direction': news_dir,\n 'trend_direction': trend_dir,\n 'position': round(best['position'], 1),\n 'risk_reward': round(rr, 2),\n 'buffer_pct': round(buf, 1),\n 'hours_left': round(hours_left, 1),\n 'confidence': round(best['confidence'], 2),\n 'reason': best['reason'],\n 'decision': 'TRADE',\n 'current_price': round(price, 2),\n })\n \n icon = \"🟢\" if best['layer'] == \"稳健\" else \"🟡\"\n print(f\" {icon} {coin} {mtype}@{threshold:,.0f} {best['direction']} \"\n f\"${best['position']:.1f} [{best['layer']}] \"\n f\"RR={rr:.2f} | {best['reason'][:60]}\")\n \n # 摘要\n print(f\"\\n{'━'*60}\")\n stable = [t for t in trades if t['layer'] == \"稳健\"]\n risk = [t for t in trades if t['layer'] == \"风投\"]\n print(f\" 稳健: {len(stable)}笔 ${sum(t['position'] for t in stable):.1f}\")\n print(f\" 风投: {len(risk)}笔 ${sum(t['position'] for t in risk):.1f}\")\n print(f\" 总风险: ${total_risk:.1f}/${MAX_TOTAL_RISK}\")\n \n with open(DATA_DIR / \"decisions.json\", \"w\") as f:\n json.dump(trades, f, indent=2, ensure_ascii=False)\n \n if trades:\n print(f\"\\n 执行:\")\n for t in trades:\n print(f\" python3 scripts/trade.py buy {t['coin']} \"\n f\"--type {t['market_type']} --threshold {t['threshold']} \"\n f\"--side {t['direction']} {t['position']}\")\n \n return trades\n\n\nif __name__ == \"__main__\":\n make_decisions()\n","content_type":"text/x-python; charset=utf-8","language":"python","size":11696,"content_sha256":"16cb777de3ad443477f4f264b6b4f6942bfd4af5ef2e8abfbe1da7abb102b183"},{"filename":"scripts/hunt.sh","content":"#!/bin/bash\n# hunt.sh — Master hunt pipeline: scan → trend → decide → execute\n# Usage: hunt.sh [--dry-run] [--skip-trade]\nset -euo pipefail\n\nSKILL_DIR=\"$(cd \"$(dirname \"${BASH_SOURCE[0]}\")/..\" && pwd)\"\nSCRIPTS=\"$SKILL_DIR/scripts\"\nDATA=\"$SKILL_DIR/data\"\n\nDRY_RUN=false\nSKIP_TRADE=false\nfor arg in \"$@\"; do\n case \"$arg\" in\n --dry-run) DRY_RUN=true ;;\n --skip-trade) SKIP_TRADE=true ;;\n esac\ndone\n\nmkdir -p \"$DATA\"\nlog() { echo \"[$(date '+%H:%M:%S')] $*\"; }\n\n# Step 1: Scan markets\nlog \"Step 1/4: Scanning markets...\"\nif ! python3 \"$SCRIPTS/scan_markets.py\"; then\n log \"⚠️ Scanner found no actionable markets. Exiting.\"\n exit 0\nfi\n\n# Step 2: Fetch trend data\nlog \"Step 2/4: Fetching trend data...\"\npython3 \"$SCRIPTS/trend_data.py\" || {\n log \"⚠️ Trend data fetch failed, continuing with stale data.\"\n}\n\n# Step 3: Analyze trends\nlog \"Step 3/4: Analyzing trends...\"\npython3 \"$SCRIPTS/trend_analysis.py\" || {\n log \"⚠️ Trend analysis failed, continuing with stale data.\"\n}\n\n# Step 4: Run decision engine\nlog \"Step 4/4: Running decision engine...\"\npython3 \"$SCRIPTS/decision_engine.py\" || {\n log \"❌ Decision engine failed.\"\n exit 1\n}\n\n# Step 5: Execute trades (unless skipped)\nif $SKIP_TRADE; then\n log \"Trade execution skipped (--skip-trade).\"\n exit 0\nfi\n\nif $DRY_RUN; then\n log \"Dry run — would execute trades.\"\n python3 \"$SCRIPTS/trade.py\" execute --dry-run\nelse\n log \"Executing trades...\"\n python3 \"$SCRIPTS/trade.py\" execute\nfi\n","content_type":"application/x-sh; charset=utf-8","language":"bash","size":1513,"content_sha256":"976e1c96fcfea9ce275180276057131e43e360ea79bac0dc4816b74fe8f6adbe"},{"filename":"scripts/scan_markets.py","content":"#!/usr/bin/env python3\n\"\"\"\nMarket Scanner v10.0\n并发版: ThreadPoolExecutor 10线程并发扫描,速度提升5-8x。\n5天 × 7币种 × 3类型 = 105个slug,串行~90s → 并发~15s。\n\"\"\"\nimport os, sys, json, re, datetime, time\nfrom pathlib import Path\nfrom concurrent.futures import ThreadPoolExecutor, as_completed\n\n# === 保留本地代理(127.0.0.1),不阻断 ===\n# Polymarket需要走本地代理才能访问,不要清除\n\n# DNS patch已不需要:本地代理处理DNS+路由\n\nimport requests\n\nGAMMA_API = \"https://gamma-api.polymarket.com\"\nMAX_WORKERS = 10 # 并发线程数\nREQUEST_TIMEOUT = 8 # 单个请求超时\n\nMONTHS = ['january','february','march','april','may','june',\n 'july','august','september','october','november','december']\n\nCOINS = [\n ('BTC', 'bitcoin', 'btc'),\n ('ETH', 'ethereum', 'eth'),\n ('SOL', 'solana', 'sol'),\n ('XRP', 'xrp', 'xrp'),\n ('BNB', 'bnb', 'bnb'),\n ('DOGE', 'dogecoin', 'doge'),\n ('HYPE', 'hype', 'hype'),\n]\n\n# 共享session(连接池复用TCP)\n_session = None\ndef get_session():\n global _session\n if _session is None:\n _session = requests.Session()\n _session.trust_env = False\n return _session\n\ndef resolve_slug(slug):\n \"\"\"解析单个slug,返回(slug, event_data)或(slug, None),带retry+429 backoff\"\"\"\n s = get_session()\n for attempt in range(3):\n try:\n r = s.get(f\"{GAMMA_API}/events/slug/{slug}\", timeout=REQUEST_TIMEOUT)\n if r.status_code == 200:\n return (slug, r.json())\n elif r.status_code == 429:\n time.sleep(1 * (attempt + 1))\n continue\n except Exception:\n if attempt \u003c 2:\n time.sleep(0.5 * (attempt + 1))\n return (slug, None)\n\ndef calc_hours_left(end_date_str):\n try:\n end = datetime.datetime.fromisoformat(end_date_str.replace('Z','+00:00'))\n now = datetime.datetime.now(datetime.timezone.utc)\n return max(0, (end - now).total_seconds() / 3600)\n except:\n return None\n\ndef extract_threshold(question):\n m = re.search(r'(?:above|below|over|under)\\s+\\$?([\\d,]+(?:\\.\\d+)?)', question, re.IGNORECASE)\n return m.group(1).replace(',', '') if m else None\n\ndef determine_type(question, slug):\n q, s = question.lower(), slug.lower()\n if 'above' in s or '>' in q: return 'ABOVE'\n if 'below' in s or '\u003c' in q: return 'BELOW'\n if 'up or down' in s or 'higher or lower' in q: return 'UPDOWN'\n return 'UNKNOWN'\n\ndef parse_market(m, slug):\n \"\"\"从Gamma API market对象提取标准化数据\"\"\"\n q = m.get('question', '')\n end_date = m.get('endDate', '')\n hours_left = calc_hours_left(end_date)\n if hours_left is None:\n return None\n\n coin = next((c for c, ak, uk in COINS if ak in slug.lower() or uk in slug.lower()), '?')\n mtype = determine_type(q, slug)\n threshold = extract_threshold(q)\n\n try:\n prices = json.loads(m.get('outcomePrices', '[]'))\n yes_p = float(prices[0]) if len(prices) >= 1 else None\n no_p = float(prices[1]) if len(prices) >= 2 else None\n except:\n yes_p = no_p = None\n\n clob_tokens = m.get('clobTokenIds', [])\n if isinstance(clob_tokens, str):\n try: clob_tokens = json.loads(clob_tokens)\n except: clob_tokens = []\n tokens = m.get('tokens', [])\n yes_token = clob_tokens[0] if len(clob_tokens) > 0 else (tokens[0].get('token_id', '') if tokens else '')\n no_token = clob_tokens[1] if len(clob_tokens) > 1 else (tokens[1].get('token_id', '') if len(tokens) > 1 else '')\n\n mkt_slug = m.get('slug', slug)\n if (not mkt_slug or mkt_slug == slug) and threshold and mtype in ('ABOVE', 'BELOW'):\n mkt_slug = f\"{slug}-{mtype.lower()}-{threshold}\"\n\n return {\n 'slug': slug,\n 'market_slug': mkt_slug,\n 'question': q[:80],\n 'coin': coin,\n 'type': mtype,\n 'threshold': threshold,\n 'hours_left': round(hours_left, 1),\n 'end_date': end_date[:16],\n 'yes_price': yes_p,\n 'no_price': no_p,\n 'yes_token': yes_token,\n 'no_token': no_token,\n 'condition_id': m.get('conditionId', ''),\n 'volume': float(m.get('volume', 0)),\n 'liquidity': float(m.get('liquidity', 0)),\n }\n\ndef scan_markets():\n now = datetime.datetime.now(datetime.timezone.utc)\n cst = datetime.datetime.now(datetime.timezone(datetime.timedelta(hours=8)))\n t0 = time.time()\n print(f\"Market Scan v11.0 — {cst.strftime('%H:%M')} CST ({now.isoformat()} UTC)\")\n\n ACTIONABLE_MAX = 12.0\n WATCHLIST_MAX = 48.0\n\n SKILL_DIR = Path(__file__).parent.parent\n data_dir = SKILL_DIR / \"data\"\n data_dir.mkdir(exist_ok=True)\n\n # 1. 生成所有slug\n all_slugs = []\n for offset in range(5):\n dt = now + datetime.timedelta(days=offset)\n month = MONTHS[dt.month - 1]\n day = dt.day\n year = dt.year\n for coin, above_kw, updown_kw in COINS:\n all_slugs += [\n f\"{above_kw}-above-on-{month}-{day}\",\n f\"{above_kw}-below-on-{month}-{day}\",\n f\"{updown_kw}-up-or-down-on-{month}-{day}-{year}\",\n ]\n\n # 2. 并发请求\n slug_to_event = {}\n with ThreadPoolExecutor(max_workers=MAX_WORKERS) as pool:\n futures = {pool.submit(resolve_slug, s): s for s in all_slugs}\n for fut in as_completed(futures):\n slug, event = fut.result()\n if event is not None:\n slug_to_event[slug] = event\n\n # 3. 解析markets\n all_markets = []\n for slug, event in slug_to_event.items():\n for m in event.get('markets', []):\n parsed = parse_market(m, slug)\n if parsed:\n all_markets.append(parsed)\n\n # 4. Noise filters\n filtered_low_price = 0\n filtered_low_liquidity = 0\n filtered_dedup = 0\n\n # Price range filter: skip markets with no information content\n price_filtered = []\n for m in all_markets:\n yp = m['yes_price']\n if yp is not None and (yp \u003c 0.02 or yp > 0.98):\n filtered_low_price += 1\n continue\n price_filtered.append(m)\n\n # Liquidity filter: skip low-liquidity markets\n liq_filtered = []\n for m in price_filtered:\n vol = m.get('volume', 0)\n liq = m.get('liquidity', 0)\n if vol \u003c 1000 and liq \u003c 500:\n filtered_low_liquidity += 1\n continue\n liq_filtered.append(m)\n\n # Dedup by (coin, type, threshold) keeping closest expiry\n dedup_map = {}\n for m in liq_filtered:\n coin = m.get('coin', '?')\n mtype = m.get('type', '')\n thresh = m.get('threshold', '')\n key = (coin, mtype, thresh)\n if key not in dedup_map or m['hours_left'] \u003c dedup_map[key]['hours_left']:\n dedup_map[key] = m\n deduped = list(dedup_map.values())\n filtered_dedup = len(liq_filtered) - len(deduped)\n\n deduped.sort(key=lambda x: x['hours_left'])\n\n actionable = [m for m in deduped if m['hours_left'] \u003c ACTIONABLE_MAX]\n watchlist = [m for m in deduped if ACTIONABLE_MAX \u003c= m['hours_left'] \u003c WATCHLIST_MAX]\n blocked = [m for m in deduped if m['hours_left'] >= WATCHLIST_MAX]\n\n # 5. 写文件\n (data_dir / \"actionable\").write_text(json.dumps(actionable, indent=2, ensure_ascii=False))\n (data_dir / \"watchlist\").write_text(json.dumps(watchlist, indent=2, ensure_ascii=False))\n (data_dir / \"blocked\").write_text(json.dumps(blocked, indent=2, ensure_ascii=False))\n\n log_entry = {\n 'ts': now.isoformat(),\n 'actionable': len(actionable),\n 'watchlist': len(watchlist),\n 'blocked': len(blocked),\n 'scan_time_s': round(time.time() - t0, 1),\n 'markets': [{k: m[k] for k in ['slug','market_slug','coin','type','threshold','hours_left','yes_price','no_price'] if k in m} for m in (actionable + watchlist)],\n }\n with open(data_dir / \"hunt-log.jsonl\", 'a') as f:\n f.write(json.dumps(log_entry, ensure_ascii=False) + '\\n')\n\n elapsed = round(time.time() - t0, 1)\n print(f\" Scanned {len(all_markets)} markets → price-filtered: {filtered_low_price}, liq-filtered: {filtered_low_liquidity}, deduped: {filtered_dedup}\")\n print(f\" → {len(actionable)} actionable (\u003c{ACTIONABLE_MAX}h), {len(watchlist)} watchlist (\u003c{WATCHLIST_MAX}h), {len(blocked)} blocked\")\n\n if actionable:\n print(\"\\n ★ ACTIONABLE MARKETS:\")\n for m in actionable:\n thresh_str = f\" @{m['threshold']}\" if m.get('threshold') else ''\n print(f\" [{m['hours_left']}h] {m['coin']} {m['type']}{thresh_str} YES:{m['yes_price']} NO:{m['no_price']} | {m['question'][:50]}\")\n\n if watchlist:\n print(f\"\\n 👀 WATCHLIST ({len(watchlist)} markets):\")\n for m in watchlist[:10]:\n print(f\" [{m['hours_left']}h] {m['coin']} {m['type']} YES:{m['yes_price']} | {m['question'][:50]}\")\n if len(watchlist) > 10:\n print(f\" ... and {len(watchlist)-10} more\")\n\n return 0 if actionable else 1\n\nif __name__ == '__main__':\n sys.exit(scan_markets())\n","content_type":"text/x-python; charset=utf-8","language":"python","size":9115,"content_sha256":"ea774a02d599cb6d49d907d051f673c0a7e39565d0a04be14059545a37ae54bd"},{"filename":"scripts/trade.py","content":"#!/usr/bin/env python3\n\"\"\"\nCLOB Trade Executor v8.0\n复用 skills/polymarket-api/scripts/trade.py 的真实API连接。\n支持: info/buy/sell/balance/price\n\n用法:\n python3 trade.py info BTC --type ABOVE --threshold 76000 --date 2026-04-30\n python3 trade.py buy BTC --type ABOVE --threshold 76000 --side NO 10 --date 2026-04-30\n python3 trade.py balance\n\"\"\"\nimport json, sys, os, re, argparse\nfrom pathlib import Path\n\nSKILL_DIR = Path(__file__).parent.parent\n\n# 复用 polymarket-api 的真实 trade 模块\nPOLY_TRADE = SKILL_DIR.parent / \"polymarket-api\" / \"scripts\" / \"trade.py\"\n\nCOIN_NAMES = {\n 'btc': 'bitcoin', 'eth': 'ethereum', 'sol': 'solana',\n 'xrp': 'xrp', 'bnb': 'bnb', 'doge': 'dogecoin', 'hype': 'hype',\n}\nMONTHS = ['january','february','march','april','may','june',\n 'july','august','september','october','november','december']\n\ndef coin_to_slug(coin: str, mtype: str, date_str: str = \"\") -> str:\n \"\"\"生成Gamma slug\"\"\"\n from datetime import datetime\n dt = datetime.fromisoformat(date_str) if date_str else datetime.now()\n month = MONTHS[dt.month - 1]\n day = dt.day\n coin_name = COIN_NAMES.get(coin.lower(), coin.lower())\n \n if mtype.upper() in ('ABOVE', 'BELOW'):\n return f\"{coin_name}-{mtype.lower()}-on-{month}-{day}\"\n else:\n return f\"{coin.lower()}-up-or-down-on-{month}-{day}-{dt.year}\"\n\ndef run_poly_trade(args: list):\n \"\"\"调用真实 polymarket-api trade.py\"\"\"\n import subprocess\n env = os.environ.copy()\n # 清除 proxy 避免 httpx SOCKS crash\n for k in ['ALL_PROXY', 'all_proxy', 'HTTP_PROXY', 'HTTPS_PROXY']:\n env.pop(k, None)\n env[\"PYTHONPATH\"] = str(POLY_TRADE.parent)\n \n result = subprocess.run(\n [sys.executable, str(POLY_TRADE)] + args,\n capture_output=True, text=True, timeout=30,\n cwd=str(POLY_TRADE.parent),\n env=env,\n )\n print(result.stdout, end=\"\")\n if result.stderr and \"urllib3\" not in result.stderr and \"warning\" not in result.stderr.lower():\n # 只打印真正的错误\n for line in result.stderr.split(\"\\n\"):\n if line.strip() and \"urllib3\" not in line and \"DEBUG\" not in line:\n print(f\" stderr: {line}\", file=sys.stderr)\n return result.returncode\n\ndef main():\n parser = argparse.ArgumentParser(description='Crypto-Hunt Trade Executor v8.0 (real API)')\n subparsers = parser.add_subparsers(dest='command')\n \n def add_market_args(p):\n p.add_argument('coin', help='BTC/ETH/SOL/XRP/BNB/DOGE/HYPE')\n p.add_argument('--type', dest='market_type', default='ABOVE', \n choices=['ABOVE', 'BELOW', 'UPDOWN'])\n p.add_argument('--threshold', default='', help='Price threshold')\n p.add_argument('--date', default='', help='YYYY-MM-DD')\n p.add_argument('--side', default='YES', choices=['YES', 'NO'])\n \n # info\n p_info = subparsers.add_parser('info')\n add_market_args(p_info)\n \n # price\n p_price = subparsers.add_parser('price')\n add_market_args(p_price)\n \n # buy\n p_buy = subparsers.add_parser('buy')\n add_market_args(p_buy)\n p_buy.add_argument('amount', type=float, help='USD amount')\n p_buy.add_argument('--price', type=float, default=None)\n \n # sell\n p_sell = subparsers.add_parser('sell')\n add_market_args(p_sell)\n p_sell.add_argument('amount', type=float, help='USD amount')\n p_sell.add_argument('--price', type=float, default=None)\n \n # balance\n subparsers.add_parser('balance')\n \n # execute (从 decisions.json 自动执行)\n p_exec = subparsers.add_parser('execute')\n p_exec.add_argument('--max-amount', type=float, default=20)\n p_exec.add_argument('--dry-run', action='store_true')\n p_exec.add_argument('--yes', action='store_true', help='Skip confirmation prompt')\n p_exec.add_argument('--market-id', help='Direct CLOB token market ID')\n \n args = parser.parse_args()\n \n if args.command == 'balance':\n return run_poly_trade(['balance'])\n \n if args.command == 'execute':\n return cmd_execute(args)\n \n if args.command in ('info', 'price', 'buy', 'sell'):\n slug = coin_to_slug(args.coin, args.market_type, args.date)\n threshold = args.threshold.replace(',', '') if args.threshold else None\n \n if args.command == 'info':\n poly_args = ['info', slug]\n if threshold:\n poly_args += ['--threshold', threshold]\n elif args.command == 'price':\n poly_args = ['price', slug, args.side]\n if threshold:\n poly_args += ['--threshold', threshold]\n elif args.command == 'buy':\n price_str = f\"{args.price:.2f}\" if args.price else None\n poly_args = ['buy', slug, args.side, str(args.amount)]\n if price_str:\n poly_args.append(price_str)\n if threshold:\n poly_args += ['--threshold', threshold]\n elif args.command == 'sell':\n price_str = f\"{args.price:.2f}\" if args.price else None\n poly_args = ['sell', slug, args.side, str(args.amount)]\n if price_str:\n poly_args.append(price_str)\n if threshold:\n poly_args += ['--threshold', threshold]\n \n return run_poly_trade(poly_args)\n \n parser.print_help()\n return 1\n\ndef cmd_execute(args):\n \"\"\"从 decisions.json 自动执行交易 (v6 format)\"\"\"\n decisions_path = SKILL_DIR / \"data\" / \"decisions.json\"\n if not decisions_path.exists():\n print(\"❌ No decisions.json. Run decision_engine.py first.\")\n return 1\n \n with open(decisions_path) as f:\n decisions = json.load(f)\n \n # v6 format: decision == \"TRADE\", has direction/position/coin/market_type/threshold\n tradeable = [d for d in decisions if d.get(\"decision\") == \"TRADE\"]\n if not tradeable:\n print(\"No tradeable decisions.\")\n return 0\n \n # 按confidence排序\n tradeable.sort(key=lambda x: x.get(\"confidence\", 0), reverse=True)\n \n for t in tradeable:\n amount = min(t.get(\"position\", 2.0), args.max_amount)\n amount = max(0.5, amount)\n direction = t.get(\"direction\", \"YES\")\n coin = t.get(\"coin\", \"BTC\")\n mtype = t.get(\"market_type\", t.get(\"type\", \"ABOVE\"))\n threshold = t.get(\"threshold\", \"\")\n market_slug = t.get(\"market\", \"\")\n layer = t.get(\"layer\", \"?\")\n \n print(f\"🎯 {coin} {mtype}@{threshold:,.0f} → {direction} ${amount:.1f} [{layer}]\")\n print(f\" conf={t.get('confidence',0):.2f} RR={t.get('risk_reward',0):.2f} | {t.get('reason','')[:60]}\")\n \n if args.dry_run:\n print(f\" [DRY RUN] Would execute\")\n continue\n \n # 确认\n if not args.yes:\n try:\n confirm = input(f\" Execute? [y/N] \").strip().lower()\n if confirm != 'y':\n print(\" Skipped.\")\n continue\n except (EOFError, KeyboardInterrupt):\n print(\" Cancelled.\")\n return 0\n \n slug = market_slug or coin_to_slug(coin, mtype, \"\")\n thresh_str = str(int(float(threshold))) if threshold else None\n \n try:\n poly_args = ['buy', slug, direction, f\"{amount:.1f}\"]\n if thresh_str:\n poly_args += ['--threshold', thresh_str]\n print(f\" Executing: {' '.join(poly_args)}\")\n rc = run_poly_trade(poly_args)\n if rc != 0:\n print(f\" ❌ Failed (rc={rc})\")\n except Exception as e:\n print(f\" ❌ Error: {e}\")\n \n return 0\n\nif __name__ == '__main__':\n sys.exit(main())\n","content_type":"text/x-python; charset=utf-8","language":"python","size":7752,"content_sha256":"b8dba6ed4c495e4f45cdb3a2009fe199f9c35bdc85678775b238b023d3fbd2c7"},{"filename":"scripts/trend_analysis.py","content":"#!/usr/bin/env python3\n\"\"\"\nTrend Analyzer v1.0\n从 trend_raw.json 读取原始K线数据,做趋势分析+入场判断。\n\n输出: data/trend_analysis.json — 每币种的趋势指标和入场评估\n\n分析内容:\n1. 均线趋势 (SMA5/SMA10/SMA20)\n2. 动量 (4h/12h/24h变化率)\n3. RSI (14周期)\n4. 趋势强度评分\n5. 入场时机: 结合趋势方向+均值偏离度判断\n6. 结算预测: 基于当前趋势预测N小时后的价格走向\n\n用法: python3 trend_analysis.py [--predict-hours 14]\n\"\"\"\nimport json, sys, os, math\nfrom pathlib import Path\nfrom datetime import datetime, timezone, timedelta\n\nSKILL_DIR = Path(__file__).parent.parent\nDATA_DIR = SKILL_DIR / \"data\"\n\ndef sma(data: list, period: int) -> list:\n \"\"\"简单移动平均\"\"\"\n result = []\n for i in range(len(data)):\n if i \u003c period - 1:\n result.append(None)\n else:\n result.append(sum(data[i-period+1:i+1]) / period)\n return result\n\ndef rsi(closes: list, period: int = 14) -> float:\n \"\"\"RSI计算\"\"\"\n if len(closes) \u003c period + 1:\n return 50.0\n deltas = [closes[i] - closes[i-1] for i in range(1, len(closes))]\n gains = [d if d > 0 else 0 for d in deltas[-period:]]\n losses = [-d if d \u003c 0 else 0 for d in deltas[-period:]]\n avg_gain = sum(gains) / period\n avg_loss = sum(losses) / period\n if avg_loss == 0:\n return 100.0\n rs = avg_gain / avg_loss\n return 100.0 - (100.0 / (1.0 + rs))\n\ndef volatility(closes: list, period: int = 24) -> float:\n \"\"\"年化波动率(基于小时收益率)\"\"\"\n if len(closes) \u003c period + 1:\n return 0.0\n returns = [(closes[i] - closes[i-1]) / closes[i-1] for i in range(-period, 0)]\n mean_r = sum(returns) / len(returns)\n var = sum((r - mean_r) ** 2 for r in returns) / len(returns)\n return math.sqrt(var) * math.sqrt(8760) * 100 # 年化\n\ndef predict_price(closes: list, hours_ahead: float) -> dict:\n \"\"\"\n 基于趋势外推预测价格。\n 用最近12h的线性回归斜率外推,结合波动率给置信区间。\n \"\"\"\n if len(closes) \u003c 12:\n return {\"predicted\": closes[-1], \"low\": closes[-1], \"high\": closes[-1], \"confidence\": 0}\n \n recent = closes[-12:]\n n = len(recent)\n # 线性回归\n x_mean = (n - 1) / 2\n y_mean = sum(recent) / n\n num = sum((i - x_mean) * (recent[i] - y_mean) for i in range(n))\n den = sum((i - x_mean) ** 2 for i in range(n))\n slope = num / den if den != 0 else 0\n \n predicted = closes[-1] + slope * hours_ahead\n \n # 置信区间: 1个标准差 × sqrt(hours)\n vol = 0\n if len(closes) > 2:\n returns = [(closes[i] - closes[i-1]) / closes[i-1] for i in range(1, len(closes))]\n vol = math.sqrt(sum(r**2 for r in returns) / len(returns))\n \n uncertainty = closes[-1] * vol * math.sqrt(hours_ahead)\n \n return {\n \"predicted\": round(predicted, 4),\n \"low\": round(predicted - uncertainty, 4),\n \"high\": round(predicted + uncertainty, 4),\n \"slope_per_hour\": round(slope, 6),\n \"confidence\": round(min(1.0, 1.0 - uncertainty / closes[-1] if closes[-1] > 0 else 0), 2),\n }\n\ndef classify_trend(closes: list) -> dict:\n \"\"\"\n 综合判断趋势: 均线排列 + 动量 + RSI\n \"\"\"\n if len(closes) \u003c 20:\n return {\"trend\": \"NEUTRAL\", \"strength\": 0, \"details\": \"insufficient data\"}\n \n sma5 = sma(closes, 5)\n sma10 = sma(closes, 10)\n sma20 = sma(closes, 20)\n \n current = closes[-1]\n s5 = sma5[-1]\n s10 = sma10[-1]\n s20 = sma20[-1]\n \n # 均线排列得分 (-3 to +3)\n ma_score = 0\n if s5 and s10 and s20:\n if s5 > s10 > s20:\n ma_score = 3 # 完美多头\n elif s5 > s10:\n ma_score = 2\n elif s5 > s20:\n ma_score = 1\n elif s5 \u003c s10 \u003c s20:\n ma_score = -3 # 完美空头\n elif s5 \u003c s10:\n ma_score = -2\n elif s5 \u003c s20:\n ma_score = -1\n \n # 动量得分 (4h, 12h, 24h)\n chg_4h = (closes[-1] - closes[-5]) / closes[-5] * 100 if len(closes) >= 5 else 0\n chg_12h = (closes[-1] - closes[-13]) / closes[-13] * 100 if len(closes) >= 13 else 0\n chg_24h = (closes[-1] - closes[-25]) / closes[-25] * 100 if len(closes) >= 25 else 0\n \n mom_score = chg_4h * 0.5 + chg_12h * 0.3 + chg_24h * 0.2\n \n # RSI\n rsi_val = rsi(closes, 14)\n \n # 综合得分\n total = ma_score * 0.4 + max(-3, min(3, mom_score)) * 0.35 + ((rsi_val - 50) / 16.67) * 0.25\n \n if total > 1.5:\n trend = \"STRONG_UP\"\n elif total > 0.5:\n trend = \"UP\"\n elif total \u003c -1.5:\n trend = \"STRONG_DOWN\"\n elif total \u003c -0.5:\n trend = \"DOWN\"\n else:\n trend = \"NEUTRAL\"\n \n return {\n \"trend\": trend,\n \"strength\": round(total, 2),\n \"ma_score\": ma_score,\n \"mom_4h\": round(chg_4h, 2),\n \"mom_12h\": round(chg_12h, 2),\n \"mom_24h\": round(chg_24h, 2),\n \"rsi\": round(rsi_val, 1),\n \"sma5\": round(s5, 4) if s5 else None,\n \"sma10\": round(s10, 4) if s10 else None,\n \"sma20\": round(s20, 4) if s20 else None,\n \"price\": current,\n }\n\ndef entry_signal(trend_info: dict, side: str) -> dict:\n \"\"\"\n 判断是否适合入场。\n side: YES(押涨) 或 NO(押跌)\n \n 逻辑:\n - 趋势方向和side一致 → 适合入场\n - 趋势方向和side相反 → 需要更强的buffer保护\n - 均值偏离度大 → 可能均值回归,但风险也大\n \"\"\"\n trend = trend_info[\"trend\"]\n strength = trend_info[\"strength\"]\n rsi = trend_info[\"rsi\"]\n \n is_bullish_side = side.upper() == \"YES\"\n \n # 趋势一致性\n if is_bullish_side:\n trend_aligned = trend in (\"STRONG_UP\", \"UP\")\n trend_opposed = trend in (\"STRONG_DOWN\", \"DOWN\")\n else:\n trend_aligned = trend in (\"STRONG_DOWN\", \"DOWN\")\n trend_opposed = trend in (\"STRONG_UP\", \"UP\")\n \n # RSI辅助\n rsi_favorable = (is_bullish_side and rsi \u003c 65) or (not is_bullish_side and rsi > 35)\n rsi_extreme = rsi > 80 or rsi \u003c 20\n \n if trend_aligned and rsi_favorable:\n signal = \"FAVORABLE\"\n multiplier = 1.0\n elif trend_aligned:\n signal = \"OK\"\n multiplier = 0.75\n elif trend == \"NEUTRAL\":\n signal = \"NEUTRAL\"\n multiplier = 0.5\n elif trend_opposed and not rsi_extreme:\n signal = \"UNFAVORABLE\"\n multiplier = 0.25\n else:\n signal = \"DANGEROUS\"\n multiplier = 0.1\n \n return {\n \"signal\": signal,\n \"multiplier\": multiplier,\n \"trend_aligned\": trend_aligned,\n \"trend_opposed\": trend_opposed,\n \"rsi_favorable\": rsi_favorable,\n }\n\ndef main():\n predict_hours = 14.0\n if \"--predict-hours\" in sys.argv:\n idx = sys.argv.index(\"--predict-hours\")\n predict_hours = float(sys.argv[idx + 1])\n \n raw_path = DATA_DIR / \"trend_raw.json\"\n if not raw_path.exists():\n print(\"❌ trend_raw.json not found. Run trend_data.py first.\")\n return 1\n \n with open(raw_path) as f:\n raw = json.load(f)\n \n cst = datetime.now(timezone(timedelta(hours=8)))\n print(f\"Trend Analysis v1.0 — {cst.strftime('%Y-%m-%d %H:%M')} CST\")\n print(\"━\" * 50)\n \n analysis = {}\n for coin, d in raw.items():\n closes = [k[\"close\"] for k in d[\"klines\"]]\n if len(closes) \u003c 20:\n print(f\" ⚠ {coin}: insufficient data ({len(closes)} candles)\")\n continue\n \n trend_info = classify_trend(closes)\n vol = volatility(closes)\n pred = predict_price(closes, predict_hours)\n \n yes_entry = entry_signal(trend_info, \"YES\")\n no_entry = entry_signal(trend_info, \"NO\")\n \n analysis[coin] = {\n **trend_info,\n \"volatility_ann\": round(vol, 1),\n \"predict_hours\": predict_hours,\n \"prediction\": pred,\n \"entry_YES\": yes_entry,\n \"entry_NO\": no_entry,\n }\n \n print(f\" {coin}: ${trend_info['price']:,.2f} | {trend_info['trend']} (str={trend_info['strength']:.1f})\")\n print(f\" RSI={trend_info['rsi']:.0f} | Vol={vol:.0f}% | 4h={trend_info['mom_4h']:+.2f}%\")\n print(f\" SMA5/10/20: {trend_info['sma5']:.2f} / {trend_info['sma10']:.2f} / {trend_info['sma20']:.2f}\")\n print(f\" Predict({predict_hours}h): ${pred['predicted']:,.2f} [{pred['low']:,.2f} ~ {pred['high']:,.2f}] conf={pred['confidence']}\")\n print(f\" Entry: YES={yes_entry['signal']}({yes_entry['multiplier']}) | NO={no_entry['signal']}({no_entry['multiplier']})\")\n \n out_path = DATA_DIR / \"trend_analysis.json\"\n with open(out_path, \"w\") as f:\n json.dump(analysis, f, indent=2, ensure_ascii=False)\n print(f\"\\nSaved → {out_path}\")\n return 0\n\nif __name__ == \"__main__\":\n sys.exit(main())\n","content_type":"text/x-python; charset=utf-8","language":"python","size":8849,"content_sha256":"31eb39f647f97496733da427e7066410928de357ea1d49f1e099beef5bbbd350"},{"filename":"scripts/trend_data.py","content":"#!/usr/bin/env python3\n\"\"\"\nTrend Data Fetcher v1.0\n从 Binance 获取 1h K线原始数据,不做分析。\n输出: data/trend_raw.json — 每币种最近48根1h K线 (OHLCV)\n\n用法: python3 trend_data.py [--coins BTC,ETH,SOL,...]\n\"\"\"\nimport json, sys, os, requests\nfrom datetime import datetime, timezone, timedelta\nfrom pathlib import Path\n\nSKILL_DIR = Path(__file__).parent.parent\nDATA_DIR = SKILL_DIR / \"data\"\nDATA_DIR.mkdir(exist_ok=True)\n\n# 不走代理\nsession = requests.Session()\nsession.trust_env = False\n\nDEFAULT_COINS = [\"BTCUSDT\", \"ETHUSDT\", \"SOLUSDT\", \"XRPUSDT\", \"BNBUSDT\", \"DOGEUSDT\"]\nBINANCE_API = \"https://api.binance.com/api/v3/klines\"\n\ndef fetch_klines(symbol: str, interval: str = \"1h\", limit: int = 48) -> list:\n \"\"\"获取K线原始数据\"\"\"\n try:\n r = session.get(BINANCE_API, params={\n \"symbol\": symbol, \"interval\": interval, \"limit\": limit\n }, timeout=15)\n if r.status_code == 200:\n return [{\n \"open_time\": k[0],\n \"open\": float(k[1]),\n \"high\": float(k[2]),\n \"low\": float(k[3]),\n \"close\": float(k[4]),\n \"volume\": float(k[5]),\n \"close_time\": k[6],\n } for k in r.json()]\n except Exception as e:\n print(f\" ⚠ {symbol}: {e}\", file=sys.stderr)\n return []\n\ndef main():\n coins_str = os.environ.get(\"COINS\", \"\")\n if \"--coins\" in sys.argv:\n idx = sys.argv.index(\"--coins\")\n coins_str = sys.argv[idx + 1] if idx + 1 \u003c len(sys.argv) else \"\"\n \n pairs = coins_str.split(\",\") if coins_str else DEFAULT_COINS\n \n now = datetime.now(timezone.utc)\n cst = now + timedelta(hours=8)\n print(f\"Trend Data Fetcher v1.0 — {cst.strftime('%Y-%m-%d %H:%M')} CST\")\n \n result = {}\n for pair in pairs:\n coin = pair.replace(\"USDT\", \"\")\n klines = fetch_klines(pair)\n if klines:\n result[coin] = {\n \"symbol\": pair,\n \"interval\": \"1h\",\n \"count\": len(klines),\n \"klines\": klines,\n \"last_close\": klines[-1][\"close\"],\n \"last_time\": klines[-1][\"close_time\"],\n \"fetched_at\": now.isoformat(),\n }\n print(f\" {coin}: {len(klines)} candles, last=${klines[-1]['close']:,.4f}\")\n else:\n print(f\" {coin}: no data\")\n \n out_path = DATA_DIR / \"trend_raw.json\"\n with open(out_path, \"w\") as f:\n json.dump(result, f, indent=2)\n print(f\"Saved → {out_path}\")\n \n # 兼容旧 trend_results.json (简单趋势标签)\n trend_compat = {}\n for coin, d in result.items():\n closes = [k[\"close\"] for k in d[\"klines\"]]\n if len(closes) \u003c 24:\n continue\n last_24 = closes[-24:]\n pct = (last_24[-1] - last_24[0]) / last_24[0] * 100\n up_c = sum(1 for i in range(1, len(last_24)) if last_24[i] > last_24[i-1])\n if pct > 1.0 and up_c >= 16:\n trend = \"STRONG_UP\"\n elif pct > 0.3:\n trend = \"UP\"\n elif pct \u003c -1.0 and (24 - up_c) >= 16:\n trend = \"STRONG_DOWN\"\n elif pct \u003c -0.3:\n trend = \"DOWN\"\n else:\n trend = \"NEUTRAL\"\n trend_compat[coin] = {\n \"trend\": trend,\n \"momentum\": round(pct, 2),\n \"price\": closes[-1],\n \"yes_size\": {\"STRONG_UP\":100,\"UP\":100,\"NEUTRAL\":75,\"DOWN\":50,\"STRONG_DOWN\":25}.get(trend, 75),\n \"no_size\": {\"STRONG_UP\":25,\"UP\":50,\"NEUTRAL\":75,\"DOWN\":100,\"STRONG_DOWN\":100}.get(trend, 75),\n }\n \n compat_path = DATA_DIR / \"trend_results.json\"\n with open(compat_path, \"w\") as f:\n json.dump(trend_compat, f, indent=2)\n \n return 0\n\nif __name__ == \"__main__\":\n sys.exit(main())\n","content_type":"text/x-python; charset=utf-8","language":"python","size":3800,"content_sha256":"b290f4619cfe440799172d70269ad9aedc9662660f432cfd2d628ff46b3a7217"}],"content_json":{"type":"doc","content":[{"type":"heading","attrs":{"level":1},"content":[{"text":"🔍 加密日盘猎杀 Skill v6.0","type":"text"}]},{"type":"paragraph","content":[{"text":"版本","type":"text","marks":[{"type":"strong"}]},{"text":": 6.0 | ","type":"text"},{"text":"日期","type":"text","marks":[{"type":"strong"}]},{"text":": 2026-05-03 | ","type":"text"},{"text":"风格","type":"text","marks":[{"type":"strong"}]},{"text":": 稳健 + 风投双层","type":"text"}]},{"type":"blockquote","content":[{"type":"paragraph","content":[{"text":"v6核心:Polymarket市场概率 + Binance广场新闻 = 综合判断方向。YES和NO都可以买。","type":"text"}]}]},{"type":"hr","attrs":{"markup":"---"}},{"type":"heading","attrs":{"level":2},"content":[{"text":"核心逻辑","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":""},"content":[{"text":"Polymarket价格 = 市场认为的概率(尊重它)\nBinance广场新闻 = 验证市场判断是否合理(信息源)\n综合判断 → 买YES或NO","type":"text"}]},{"type":"paragraph","content":[{"text":"不是预测市场,是验证市场。市场说80%会发生,新闻也支持 → 买YES。新闻不支持 → 不交易。","type":"text","marks":[{"type":"strong"}]}]},{"type":"hr","attrs":{"markup":"---"}},{"type":"heading","attrs":{"level":2},"content":[{"text":"两层分类","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"层级","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"YES价格区间","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"含义","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"仓位上限","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"稳健层","type":"text","marks":[{"type":"strong"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"80-96¢","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"市场认为大概率发生,新闻确认就买","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"$4/笔","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"风投层","type":"text","marks":[{"type":"strong"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"60-80¢","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"市场认为中概率,需要新闻+趋势都支持","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"$2.5/笔","type":"text"}]}]}]}]},{"type":"paragraph","content":[{"text":"NO交易","type":"text","marks":[{"type":"strong"}]},{"text":": 当YES价格在4-40¢时,NO价格在60-96¢区间。新闻支持NO方向就买NO。","type":"text"}]},{"type":"paragraph","content":[{"text":"总风险上限","type":"text","marks":[{"type":"strong"}]},{"text":": $8 | ","type":"text"},{"text":"Bankroll","type":"text","marks":[{"type":"strong"}]},{"text":": $26-28","type":"text"}]},{"type":"hr","attrs":{"markup":"---"}},{"type":"heading","attrs":{"level":2},"content":[{"text":"决策流程","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":""},"content":[{"text":"1. 扫描Polymarket市场(scan_markets.py)\n2. 获取趋势数据(trend_data.py → trend_analysis.py)\n3. 获取新闻方向(news_direction.json)\n4. 对每个市场,尝试YES和NO两个方向:\n 1. 分层(稳健/风投/禁止)\n 2. 判断新闻+趋势+价格位置是否支持\n 3. 稳健层:只需不被反驳(门槛低)\n 4. 风投层:需要积极支持(门槛高)\n5. 选最优方向 → 计算仓位 → 输出","type":"text"}]},{"type":"hr","attrs":{"markup":"---"}},{"type":"heading","attrs":{"level":2},"content":[{"text":"硬性规则","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"规则","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"说明","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"UP/DOWN盘禁止","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"50/50赌博,无edge","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"T\u003c3h禁止","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"流动性太差,结算太近","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"YES>96¢禁止","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"2% fee后负EV","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"YES\u003c4¢禁止","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"纯赌博","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"单笔≤$4","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"仓位控制","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"总风险≤$8","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"分散风险","type":"text"}]}]}]}]},{"type":"hr","attrs":{"markup":"---"}},{"type":"heading","attrs":{"level":2},"content":[{"text":"综合评分","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":""},"content":[{"text":"新闻支持方向: +0.40 × news_confidence\n趋势支持方向: +0.30\n价格在正确侧: +0.20\n时间≥12h: +0.10\n新闻不支持: -0.15\n趋势不支持: -0.10\n\n稳健层门槛: ≥0.15 (不被反驳即可)\n风投层门槛: ≥0.35 (需要积极支持)","type":"text"}]},{"type":"hr","attrs":{"markup":"---"}},{"type":"heading","attrs":{"level":2},"content":[{"text":"仓位计算","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":""},"content":[{"text":"稳健层: position = min($4, bankroll × 15%) × confidence\n风投层: position = min($2.5, bankroll × 15%) × confidence","type":"text"}]},{"type":"hr","attrs":{"markup":"---"}},{"type":"heading","attrs":{"level":2},"content":[{"text":"回测验证","type":"text"}]},{"type":"paragraph","content":[{"text":"10轮参数测试(数据: 230个市场,Binance日线OHLC):","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Round","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Trades","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"WR","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"P&L","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"ROI","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"R1: 基准v6","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"19","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"95%","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"+$2.40","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"+9.2%","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"R2: 稳健扩到96¢","type":"text","marks":[{"type":"strong"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"21","type":"text","marks":[{"type":"strong"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"95%","type":"text","marks":[{"type":"strong"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"+$2.50","type":"text","marks":[{"type":"strong"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"+9.6%","type":"text","marks":[{"type":"strong"}]}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"R9: NO区间扩到50¢","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"22","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"86%","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"+$1.98","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"+7.6%","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"R10: 全宽","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"24","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"88%","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"+$2.08","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"+8.0%","type":"text"}]}]}]}]},{"type":"paragraph","content":[{"text":"最优参数: R2","type":"text","marks":[{"type":"strong"}]},{"text":" — 稳健层扩展到96¢,95%胜率","type":"text"}]},{"type":"paragraph","content":[{"text":"唯一亏损交易: BTC >$78K NO @6¢,BTC反涨,亏$0.94","type":"text"}]},{"type":"hr","attrs":{"markup":"---"}},{"type":"heading","attrs":{"level":2},"content":[{"text":"脚本目录","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":""},"content":[{"text":"scripts/\n├── scan_markets.py # Gamma API 扫描(v11,降噪版)\n├── trend_data.py # Binance 4h K线\n├── trend_analysis.py # 趋势分析\n├── decision_engine.py # v6 决策引擎\n├── trade.py # 交易执行\n├── get_balance_stable.py # 余额查询\n└── hunt.sh # 统一管线 (scan→trend→decide→execute)","type":"text"}]},{"type":"hr","attrs":{"markup":"---"}},{"type":"heading","attrs":{"level":2},"content":[{"text":"数据来源","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Polymarket Gamma API: ","type":"text"},{"text":"https://gamma-api.polymarket.com","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Binance: ","type":"text"},{"text":"https://api.binance.com/api/v3/klines","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"新闻: Binance广场 + CoinTelegraph + CoinDesk","type":"text"}]}]}]},{"type":"hr","attrs":{"markup":"---"}},{"type":"heading","attrs":{"level":2},"content":[{"text":"历史","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"版本","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"日期","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"说明","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"v6.0","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"2026-05-03","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"简化逻辑:Polymarket概率+新闻验证,稳健/风投双层,YES/NO均可,95%WR","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"v15.0","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"2026-05-03","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"R1-R9重构,BS概率,过度复杂化","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"v14.0","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"2026-05-03","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"prob_fusion→市场隐含概率,100%skip rate","type":"text"}]}]}]}]},{"type":"hr","attrs":{"markup":"---"}},{"type":"heading","attrs":{"level":2},"content":[{"text":"最后更新: 2026-05-03 | Simons (CQO)","type":"text","marks":[{"type":"em"}]}]}]},"metadata":{"date":"2026-06-05","author":"@skillopedia","source":{"stars":65,"repo_name":"claude-code-skills","origin_url":"https://github.com/aaaaqwq/claude-code-skills/blob/HEAD/skills/crypto-hunt/SKILL.md","repo_owner":"aaaaqwq","body_sha256":"d84289ae11691868aeabdbdcc3f4f0842512d9299e1d79aa6c0b580c12758c1d","cluster_key":"8077caea12aada1026baa4b6aa67189b5393bc4b3e726d3802e6d73035c10326","clean_bundle":{"format":"clean-skill-bundle-v1","source":"aaaaqwq/claude-code-skills/skills/crypto-hunt/SKILL.md","attachments":[{"id":"041d833f-43dd-558d-80c2-12e47ee7e770","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/041d833f-43dd-558d-80c2-12e47ee7e770/attachment","path":"data/actionable","size":667,"sha256":"ce8c6d61811e7c27d2fd91d5e610dfa966558328eb6e5f99b5163aa1d80a9bfe","contentType":"text/plain; charset=utf-8"},{"id":"5f619ccf-5bf2-53fd-9336-151fe9c9ba03","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/5f619ccf-5bf2-53fd-9336-151fe9c9ba03/attachment","path":"data/blocked","size":9541,"sha256":"c32098a75e7ba6ff1c6fb12208601d24b6bd1602680f18aa17d27170119126d2","contentType":"text/plain; charset=utf-8"},{"id":"84da31e0-7d24-5c76-b301-e1586863c056","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/84da31e0-7d24-5c76-b301-e1586863c056/attachment.json","path":"data/decisions.json","size":2,"sha256":"4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945","contentType":"application/json; charset=utf-8"},{"id":"34f3c5e6-91d6-5a72-918d-8ab362b8e1da","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/34f3c5e6-91d6-5a72-918d-8ab362b8e1da/attachment.jsonl","path":"data/hunt-log.jsonl","size":813123,"sha256":"08aa5c77b9ec25b64ba419e37f75b1516ab32330b50fe16d28ab26d79e94a157","contentType":"text/plain; charset=utf-8"},{"id":"76f131e8-0eda-5227-84b1-e9b833a95d2e","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/76f131e8-0eda-5227-84b1-e9b833a95d2e/attachment.json","path":"data/news_direction.json","size":105,"sha256":"66830a4df501f58428eb300f87ac963dd8e9fbe0d32959464bc901aec4681732","contentType":"application/json; charset=utf-8"},{"id":"11b0fb8b-aaa8-55c3-8d34-0da83f02b5db","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/11b0fb8b-aaa8-55c3-8d34-0da83f02b5db/attachment.json","path":"data/trend_analysis.json","size":4761,"sha256":"441b089dd41bb630f2e198c235828dbe81792cec10a960fdf55f5b2a333a0b3e","contentType":"application/json; charset=utf-8"},{"id":"121da9d2-ff67-5b9a-a274-1f259eb1e5ae","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/121da9d2-ff67-5b9a-a274-1f259eb1e5ae/attachment.json","path":"data/trend_raw.json","size":63316,"sha256":"d7e0382f6756f7e5e6caaa8a4dbc52807b7aec435dca25793020c0bac9f2c188","contentType":"application/json; charset=utf-8"},{"id":"781cffee-0342-5428-ae71-8f5d400360a3","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/781cffee-0342-5428-ae71-8f5d400360a3/attachment.json","path":"data/trend_results.json","size":715,"sha256":"52049ed27e6baadc7a797d97066918d31fb22aa21900339679fab081ce0e4198","contentType":"application/json; charset=utf-8"},{"id":"5261c599-e1d8-5075-9487-8184da0c8248","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/5261c599-e1d8-5075-9487-8184da0c8248/attachment","path":"data/watchlist","size":8841,"sha256":"876d04b76ca0ce433aeb251fa3df3f0a0c59eb7a57738b57dc968028665f166e","contentType":"text/plain; charset=utf-8"},{"id":"b42a0930-16dc-5046-84e3-effad2320879","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/b42a0930-16dc-5046-84e3-effad2320879/attachment.py","path":"scripts/decision_engine.py","size":11696,"sha256":"16cb777de3ad443477f4f264b6b4f6942bfd4af5ef2e8abfbe1da7abb102b183","contentType":"text/x-python; charset=utf-8"},{"id":"5acd01cc-bd0a-5ce3-b7fa-389092a56b99","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/5acd01cc-bd0a-5ce3-b7fa-389092a56b99/attachment.sh","path":"scripts/hunt.sh","size":1513,"sha256":"976e1c96fcfea9ce275180276057131e43e360ea79bac0dc4816b74fe8f6adbe","contentType":"application/x-sh; charset=utf-8"},{"id":"c87b66a4-8d45-526f-ae13-1e7e0dc07983","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/c87b66a4-8d45-526f-ae13-1e7e0dc07983/attachment.py","path":"scripts/scan_markets.py","size":9115,"sha256":"ea774a02d599cb6d49d907d051f673c0a7e39565d0a04be14059545a37ae54bd","contentType":"text/x-python; charset=utf-8"},{"id":"48b8cc34-dfb3-567f-9c1d-b36eb4b3eca2","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/48b8cc34-dfb3-567f-9c1d-b36eb4b3eca2/attachment.py","path":"scripts/trade.py","size":7752,"sha256":"b8dba6ed4c495e4f45cdb3a2009fe199f9c35bdc85678775b238b023d3fbd2c7","contentType":"text/x-python; charset=utf-8"},{"id":"c4d14cfe-e2c0-5621-8af5-d1e36e6d32b4","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/c4d14cfe-e2c0-5621-8af5-d1e36e6d32b4/attachment.py","path":"scripts/trend_analysis.py","size":8849,"sha256":"31eb39f647f97496733da427e7066410928de357ea1d49f1e099beef5bbbd350","contentType":"text/x-python; charset=utf-8"},{"id":"355bce9b-688d-5fe4-a3a9-8195dd73024e","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/355bce9b-688d-5fe4-a3a9-8195dd73024e/attachment.py","path":"scripts/trend_data.py","size":3800,"sha256":"b290f4619cfe440799172d70269ad9aedc9662660f432cfd2d628ff46b3a7217","contentType":"text/x-python; charset=utf-8"}],"bundle_sha256":"3af889c9d9f42226d8e25631a244fef7e5d61913fce98fe3362e45d74212cf67","attachment_count":15,"text_attachments":12,"attachment_storage":"skillopedia-attachments-v1","binary_attachments":3,"excluded_attachments":[]},"cluster_size":1,"skill_md_path":"skills/crypto-hunt/SKILL.md","import_metadata":{"date":"2026-06-05","author":"@skillopedia","version":"v1","category":"finance-legal-compliance","category_label":"Finance"},"exact_dupes_collapsed_into_this":0},"version":"v1","category":"finance-legal-compliance","import_tag":"clean-skills-v1"}},"renderedAt":1782980604562}

🔍 加密日盘猎杀 Skill v6.0 版本 : 6.0 | 日期 : 2026-05-03 | 风格 : 稳健 + 风投双层 v6核心:Polymarket市场概率 + Binance广场新闻 = 综合判断方向。YES和NO都可以买。 --- 核心逻辑 不是预测市场,是验证市场。市场说80%会发生,新闻也支持 → 买YES。新闻不支持 → 不交易。 --- 两层分类 | 层级 | YES价格区间 | 含义 | 仓位上限 | |------|-----------|------|---------| | 稳健层 | 80-96¢ | 市场认为大概率发生,新闻确认就买 | $4/笔 | | 风投层 | 60-80¢ | 市场认为中概率,需要新闻+趋势都支持 | $2.5/笔 | NO交易 : 当YES价格在4-40¢时,NO价格在60-96¢区间。新闻支持NO方向就买NO。 总风险上限 : $8 | Bankroll : $26-28 --- 决策流程 --- 硬性规则 | 规则 | 说明 | |------|------| | UP/DOWN盘禁止 | 50/50赌博,无edge | | T<3h禁止 | 流动性太差,结算太近 | | YES 96¢禁止 | 2% fee后负EV | | YES<4¢禁止 | 纯赌博 | | 单笔≤$4 | 仓位控制 | | 总风险≤$8 |…