Binance Square Signal Agent
End-to-end trading signal pipeline built on the thesis that market makers seed narratives on Binance Square before / during accumulation. Square is the largest unblocked Chinese crypto info source — tracking narrative flow there is the sentiment equivalent of tracking on-chain fund flow.
First-Time Setup
The skill ships with two Node.js scripts that need puppeteer-core installed once. After ClawHub installs this skill to ~/.claude/skills/binance-square/, run:
CODEBLOCK0
Then verify Chrome/Chromium is installed (auto-detected on Win/Mac/Linux). Override with CHROME_PATH env var if needed.
Optional Configuration (env vars)
| Var | Purpose | Effect if missing |
|---|
| INLINECODE3 | Coinglass API or proxy base URL (e.g. https://your-proxy/api) | Step 2 (on-chain) is skipped, direction calls degrade |
| INLINECODE5 |
Telegram bot token from @BotFather |
scan:tg mode skips the push, returns the message text instead |
|
TG_CHAT_ID | Telegram chat ID (use @userinfobot) | Same as above |
|
CHROME_PATH | Override Chrome binary path | Auto-detected (Win/Mac/Linux + Edge fallback) |
Modes (dispatch on $ARGUMENTS)
| Input | Action |
|---|
| INLINECODE10 (default if no args) | Full pipeline: scrape feed + drill top 3 coins + direction judgment |
| INLINECODE11 |
Same as
scan plus Telegram DM push (requires TG env vars) |
|
coin:RAVE | Deep-drill a specific coin's hashtag page (~200 posts) |
|
read:URL | Read and summarize a single Binance Square article |
|
read:KEYWORD | Search Square for a keyword and summarize top results |
Pipeline: scan and scan:tg
Step 1 — Scrape
CODEBLOCK1
The scraper writes a square-YYYY-MM-DD-HHmm.json file in its own directory by default. Override with --out PATH. Read the JSON output. Key fields per coin in coinRanking:
- -
mentions, botPct, INLINECODE23 - INLINECODE24 (BULLISH / BEARISH / NEUTRAL),
sentiment.score, sentiment.bullish, INLINECODE27 - INLINECODE28 , INLINECODE29
INLINECODE30 contains the same breakdown for each drilled hashtag page (larger sample, bot-dense — this is where coordinated narrative pushes are visible).
Step 2 — On-chain confirmation (skip if COINGLASS_BASE not set)
For each non-baseline coin (not BTC/ETH/BNB/SOL/XRP/DOGE) with 2+ feed mentions:
CODEBLOCK2
Extract:
- - OI:
total.chg24h (24h OI change %) - Funding: average
rate across major exchanges (Binance / Bybit / OKX) - Liquidation:
long24h vs short24h USD per coin - Price 24h: from gainers (Step 3) or derive from OI deltas
The user must provide their own COINGLASS_BASE URL — either the official Coinglass API with their key, or their own proxy. Without this, direction judgment falls back to Square sentiment + price action only.
Step 3 — Gainers cross-reference
WebFetch https://www.binance.com/zh-CN/markets/coinInfo — extract 领涨榜 (top gainers) with 24h% change.
Step 4 — Direction judgment
Combine the four signal sources for each candidate coin:
CODEBLOCK3
Direction call: LONG ✅ / SHORT 🔻 / AVOID ⚠️ / WATCH 👀
- -
WATCH for OI divergence with unclear direction - INLINECODE39 for bot-dominated noise or event-driven moves (FUD / hack / legal)
Step 5 — Save full report
Write detailed markdown report to ~/.claude/skills/binance-square/reports/signal-YYYY-MM-DD-HHmm.md (create the reports/ dir if needed). Include:
- - Candidates table (coin, posts, bot%, sentiment, OI, funding, liq ratio, direction)
- Per-coin direction rationale
- Drill bot breakdown
- Gainers cross-ref
- Risk notes
Step 6 — Telegram push (only if scan:tg and TG env vars set)
Write condensed summary (<4000 chars) to a temp file:
CODEBLOCK4
If TG_BOT_TOKEN or TG_CHAT_ID env var is missing, skip this step and return the message text in the response instead.
Mode: coin:TICKER
Deep-drill a specific coin's topic page (~200 posts vs ~20 on main feed):
CODEBLOCK5
Then run Step 2 (on-chain) + Step 4 (direction) for just this coin. Report:
CODEBLOCK6
Mode: read:URL or read:KEYWORD
URL form (read:https://www.binance.com/...)
WebFetch the article. Extract: title, author, publish time, content, engagement, coin mentions, hashtags. Flag author if username matches Square-Creator-xxx → potential bot.
Keyword form (read:RAVE 爆仓)
WebSearch site:binance.com/square KEYWORD, then WebFetch top 3-5 results. For each, extract summary + sentiment + author type. Aggregate: overall sentiment, bot %, narrative theme.
Bot Detection (built into scraper)
Layer 1 (username pattern):
- - Display name matches
/^Square-Creator-[a-f0-9]+$/ → BOTSUSPECT (never customized profile) - Otherwise → tentatively LIKELYHUMAN
Layer 2 (behavioral, post-hoc):
- - Default username (
square-creator-* profile ID) + 3+ posts in batch + avg views < 200 → BOTSUSPECT - Any author with 5+ posts + avg views < 100 → BOTSUSPECT (catches custom-named bots)
Sentiment scoring only counts non-bot posts to avoid contamination.
The drill mode reveals bot rings — accounts that appear across multiple coin hashtags with high post counts and low engagement = signature of coordinated narrative promotion.
Output Contract
Return to main agent (concise — full detail lives in the saved report):
- 1. Top 3 actionable signals with direction (LONG/SHORT/AVOID) + one-sentence rationale each
- Path to full saved report
- If
scan:tg: confirmation of TG send with message_id, OR the message text + note that env vars weren't configured - Critical anomalies: new coin trending, extreme funding rate, bot farm coordination
Disclaimer
This tool finds patterns. It is not financial advice. Trading decisions and risk management are entirely the user's responsibility. Past pattern correlations do not predict future moves.
Binance Square 信号代理
基于以下论点构建的端到端交易信号管道:做市商在吸筹之前/期间会在 Binance Square 上埋下叙事。Square 是最大的未封锁中文加密货币信息来源——追踪那里的叙事流相当于追踪链上资金流。
首次设置
该技能附带两个 Node.js 脚本,需要一次性安装 puppeteer-core。在 ClawHub 将此技能安装到 ~/.claude/skills/binance-square/ 后,运行:
bash
cd ~/.claude/skills/binance-square && npm install
然后验证 Chrome/Chromium 是否已安装(在 Windows/Mac/Linux 上自动检测)。如有需要,可使用 CHROME_PATH 环境变量覆盖。
可选配置(环境变量)
| 变量 | 用途 | 缺失时的影响 |
|---|
| COINGLASSBASE | Coinglass API 或代理基础 URL(例如 https://your-proxy/api) | 跳过步骤 2(链上),方向判断降级 |
| TGBOT_TOKEN |
来自 @BotFather 的 Telegram 机器人令牌 | scan:tg 模式跳过推送,返回消息文本 |
| TG
CHATID | Telegram 聊天 ID(使用 @userinfobot) | 同上 |
| CHROME_PATH | 覆盖 Chrome 二进制路径 | 自动检测(Windows/Mac/Linux + Edge 回退) |
模式(通过 $ARGUMENTS 调度)
| 输入 | 操作 |
|---|
| scan(无参数时默认) | 完整管道:抓取信息流 + 深度分析前 3 个币种 + 方向判断 |
| scan:tg |
与 scan 相同,外加 Telegram 私信推送(需要 TG 环境变量) |
| coin:RAVE | 深度分析特定币种的话题标签页面(约 200 条帖子) |
| read:URL | 阅读并总结单篇 Binance Square 文章 |
| read:KEYWORD | 在 Square 上搜索关键词并总结前几个结果 |
管道:scan 和 scan:tg
步骤 1 — 抓取
bash
node ~/.claude/skills/binance-square/scrape-square.mjs --drill --top 3 --scrolls 25 --pages 10
抓取器默认在其自身目录中写入 square-YYYY-MM-DD-HHmm.json 文件。使用 --out PATH 覆盖。读取 JSON 输出。coinRanking 中每个币种的关键字段:
- - mentions、botPct、verifiedPosts
- sentiment.label(BULLISH / BEARISH / NEUTRAL)、sentiment.score、sentiment.bullish、sentiment.bearish
- views、likes
drillResults[COIN] 包含每个深度分析的话题标签页面的相同细分(样本量更大,机器人密集——这是协调性叙事推送可见的地方)。
步骤 2 — 链上确认(如果未设置 COINGLASS_BASE 则跳过)
对于每个在信息流中出现 2 次及以上的非基准币种(非 BTC/ETH/BNB/SOL/XRP/DOGE):
bash
curl -s $COINGLASS_BASE/coinglass?type=oi-exchanges&symbol=COIN
curl -s $COINGLASS_BASE/coinglass?type=funding-exchanges&symbol=COIN
curl -s $COINGLASS_BASE/coinglass?type=liquidation
提取:
- - OI:total.chg24h(24 小时 OI 变化百分比)
- 资金费率:主要交易所(币安 / Bybit / OKX)的平均 rate
- 爆仓:每个币种的 long24h 与 short24h(美元)
- 价格 24 小时:来自涨幅榜(步骤 3)或从 OI 变化推导
用户必须提供自己的 COINGLASS_BASE URL——可以是带有自己密钥的官方 Coinglass API,也可以是自己的代理。没有这个,方向判断将仅回退到 Square 情绪 + 价格走势。
步骤 3 — 涨幅榜交叉参考
WebFetch https://www.binance.com/zh-CN/markets/coinInfo — 提取领涨榜(前几大涨幅币种)及其 24 小时百分比变化。
步骤 4 — 方向判断
为每个候选币种组合四个信号来源:
信号权重(从强到弱):
1. 爆仓比率 → 最强(实际资金流向)
shortliq >> longliq → 做多(空头挤压进行中)
longliq >> shortliq → 做空(多头连环爆仓进行中)
2. 资金费率极端值 → 反向信号
rate < -0.10% → 偏向做多(空头过度拥挤)
rate > +0.10% → 偏向做空(多头过度拥挤)
3. OI + 价格 → 动量 / 背离
OI↑ 价格↑ → 动量延续
OI↑ 价格持平 → 预先建仓,观察突破方向
OI↑ 价格↓ → 空头建仓(可能挤压)
OI↓ 价格↓ → 多头爆仓连锁反应
4. Square 情绪 → 反向指标(带机器人质量过滤)
散户看空 + 资金费率为负 + OI 上升 → MM 在散户卖出时吸筹 → 做多
散户看多 + 机器人占比 > 40% → 机器人推动的拉盘 → 避开
散户看多且有机(低机器人占比)+ 价格上涨 → 趋势跟随做多
方向判断:做多 ✅ / 做空 🔻 / 避开 ⚠️ / 观察 👀
- - 观察 用于 OI 背离且方向不明确的情况
- 避开 用于机器人主导的噪音或事件驱动的波动(FUD / 黑客攻击 / 法律事件)
步骤 5 — 保存完整报告
将详细的 Markdown 报告写入 ~/.claude/skills/binance-square/reports/signal-YYYY-MM-DD-HHmm.md(如有需要,创建 reports/ 目录)。包括:
- - 候选币种表格(币种、帖子数、机器人占比、情绪、OI、资金费率、爆仓比率、方向)
- 每个币种的方向理由
- 深度分析机器人细分
- 涨幅榜交叉参考
- 风险提示
步骤 6 — Telegram 推送(仅当 scan:tg 且设置了 TG 环境变量时)
将精简摘要(<4000 字符)写入临时文件:
bash
cat > /tmp/tg-signal.txt <
广场信号 YYYY-MM-DD HH:MM
信息流(N 条帖子,X% 机器人)
COIN:N 次提及,看空/看多 | ...
深度分析机器人占比
#COIN:N 条帖子,X% 机器人,情绪 Y
方向判断
COIN:做多/做空/避开 [emoji]
OI +X% | 资金费率 X% | 爆仓 多M:空M | 广场 看空/看多
理由:[一句话]
涨幅榜 TOP1 +X% | TOP2 +X%
EOF
node ~/.claude/skills/binance-square/send-telegram.mjs --file /tmp/tg-signal.txt
如果缺少 TGBOTTOKEN 或 TGCHATID 环境变量,则跳过此步骤,并在响应中返回消息文本。
模式:coin:TICKER
深度分析特定币种的话题页面(约 200 条帖子,而主信息流约 20 条):
bash
node ~/.claude/skills/binance-square/scrape-square.mjs --coin TICKER --pages 10
然后仅针对该币种运行步骤 2(链上)+ 步骤 4(方向)。报告:
#TICKER 深度分析 — 已扫描 N 条帖子
机器人活动:X% 机器人(主要机器人作者:...)
情绪:看多 / 看空 / 中性(N 看多 / N 看空 / N 中性)
OI 24 小时:+X% | 资金费率:X% | 爆仓 多:空
价格 24 小时:+X%
方向:做多 / 做空 / 避开 — [原因]
前 3 条示例帖子:...
##