Crypto Sniper Oracle — Quantitative Market Intelligence + Reporting
⚠️ SCOPE & CAPABILITIES
Core Function: Fetch public market data and generate quantitative analysis.
What it does:
- - ✅ Fetches public ticker data from Binance API
- ✅ Fetches public order book data from Binance API
- ✅ Calculates Order Book Imbalance (OBI)
- ✅ Calculates VWAP divergence
- ✅ Scores liquidity quality (spread in bps)
- ✅ Generates formatted analysis reports
- ✅ [OPTIONAL] Sends reports via Telegram
- ✅ [OPTIONAL] Scheduled cron jobs for automated reports
What it does NOT do:
- - ❌ Place orders or execute trades
- ❌ Transfer funds
- ❌ Access private exchange data
- ❌ Read agent memory (beyond its own logs)
- ❌ Intercept or block other skills
🔧 Configuration Options
Mode 1: Analysis Only (Default)
No Telegram, manual invocation:
CODEBLOCK0
Use case: Manual analysis on demand.
Mode 2: Telegram Reports (Optional)
Enable Telegram alerts and reports:
Required environment variables:
CODEBLOCK1
Configuration:
CODEBLOCK2
Use case: Automated reports sent to Telegram.
Mode 3: Cron Jobs + Telegram (Automated)
Scheduled market reports:
Example cron jobs:
CODEBLOCK3
Use case: Fully automated market monitoring.
📊 Report Templates
1. Daily Market Report
Trigger: Cron (9am daily) or manual command
Content:
📊 CRYPTO MARKET DAILY REPORT
{date} | Powered by Wesley
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 MARKET OVERVIEW (10 pairs analyzed)
🟢 BULLISH SETUPS (OBI > +0.15)
• BTCUSDT: OBI +0.18, Spread 2.1 bps
Price vs VWAP: +0.5% (above average)
Signal: Strong buying pressure
• ETHUSDT: OBI +0.12, Spread 3.5 bps
Price vs VWAP: +0.3%
Signal: Moderate bullish
🔴 BEARISH SETUPS (OBI < -0.15)
• SOLUSDT: OBI -0.16, Spread 8.2 bps
Price vs VWAP: -0.8%
Signal: Selling pressure
💰 LIQUIDITY QUALITY
Excellent (< 5 bps): 5 pairs
Good (5-10 bps): 3 pairs
Poor (> 30 bps): 2 pairs
📈 TOP MOVERS (24h)
+12.3% SOLUSDT (volatility: HIGH)
+8.1% ETHUSDT (volatility: MODERATE)
-5.2% BNBUSDT (volatility: MODERATE)
🎯 TRADING OPPORTUNITIES
→ BTC: Bullish setup confirmed (OBI +0.18)
→ ETH: Moderate strength, watch for breakout
→ SOL: Avoid - selling pressure + poor liquidity
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Generated: 2026-02-27 09:00:00 UTC
Next report: 2026-02-28 09:00:00 UTC
2. Anomaly Alert
Trigger: OBI spike, spread explosion, or volume surge
Content:
🚨 MARKET ANOMALY DETECTED
Time: 15:23:45 UTC
Asset: BTCUSDT
📊 Anomaly Type: OBI SPIKE
• Previous OBI: +0.05
• Current OBI: +0.22
• Change: +340% in 15 minutes
💰 Liquidity: EXCELLENT (2.3 bps)
📈 Price vs VWAP: +0.6%
💡 Implication:
Strong buying pressure surge detected.
Potential upward price movement imminent.
🎯 Suggested Action:
Consider LONG entry if other signals align.
Monitor closely for next 30 minutes.
[View Full Analysis]
3. Hourly Summary
Trigger: Cron (every hour)
Content:
⚡ HOURLY MARKET CHECK
{timestamp}
🔍 Scanned: 10 pairs
🟢 Bullish: 3
🔴 Bearish: 2
⚪ Neutral: 5
📊 Notable Changes:
• BTC OBI: +0.05 → +0.12 (↑)
• ETH Spread: 3.2 → 5.8 bps (↑)
⚠️ Alerts: None
Next check: {next_hour}
🔐 File Access (Expanded)
READ:
- -
/workspace/skills/crypto-sniper-oracle/crypto_oracle.py (data fetcher) - INLINECODE1 (report generator)
- INLINECODE2 (report templates)
WRITE:
- -
/workspace/.oracle_cache.json (45s cache) - INLINECODE4 (analysis reports)
- INLINECODE5 (audit trail)
- INLINECODE6 (archived reports)
- INLINECODE7 (alert history)
🌐 Network Access (Expanded)
Always allowed:
- - ✅
https://api.binance.com/api/v3/* (public market data)
Conditionally allowed (if Telegram enabled):
- - ✅
https://api.telegram.org/bot{token}/* (send messages only)
Never allowed:
- - ❌ Binance private endpoints
- ❌ Order placement endpoints
- ❌ Withdrawal endpoints
📋 Cron Job Specifications
Daily Report
CODEBLOCK7
Hourly Check
CODEBLOCK8
Price Alerts
CODEBLOCK9
🛠️ How It Works
LAYER 1 — Data Acquisition (Unchanged)
Same as v3.2.1 - uses crypto_oracle.py to fetch data.
LAYER 2 — Report Generation (NEW)
CODEBLOCK10
LAYER 3 — Telegram Delivery (NEW)
CODEBLOCK11
🔒 Security & Privacy
Data Collection:
- - Public market data only
- No authentication for Binance API
- No personal data
Data Processing:
- - All calculations local
- Cache temporary (45s TTL)
- Reports stored locally
Telegram (Optional):
- - User must explicitly enable
- User provides bot token + chat ID
- Only sends TO user's Telegram
- No data sent to third parties
- Can be disabled anytime
Transparency:
- - All Telegram sends logged
- All reports archived
- Full audit trail in TRADING_LOGS.md
📚 Installation & Setup
Basic Setup (No Telegram):
CODEBLOCK12
Telegram Setup (Optional):
Step 1: Create Telegram Bot
CODEBLOCK13
Step 2: Get Chat ID
CODEBLOCK14
Step 3: Configure
CODEBLOCK15
Step 4: Test
CODEBLOCK16
Expected: "✅ Test message sent to Telegram"
Cron Setup (Optional):
CODEBLOCK17
📊 Usage Examples
Example 1: Manual Analysis
CODEBLOCK18
Output: JSON data (same as v3.2.1)
Example 2: Generate Report (No Telegram)
CODEBLOCK19
Output:
- - Report saved to INLINECODE11
- No Telegram send
Example 3: Generate + Send Telegram
CODEBLOCK20
Output:
- - Report saved locally
- Report sent to Telegram
- Logged in TRADING_LOGS.md
Example 4: Alert Check
CODEBLOCK21
If anomaly detected:
CODEBLOCK22
If no anomaly:
✅ No alerts - market normal
🎯 Transparency Statement
What This Skill Does:
Without Telegram:
- - Fetches public data
- Calculates metrics
- Generates reports
- Saves locally
With Telegram (User Opt-In):
- - All of above PLUS
- Sends reports to user's Telegram
- User must provide bot token + chat ID
- User can disable anytime
What This Skill Does NOT Do:
- - Does NOT read agent memory
- Does NOT intercept other skills
- Does NOT trade or place orders
- Does NOT access private data
- Does NOT send data to third parties (except user's own Telegram if enabled)
Network Behavior:
Default:
- - Binance public API only
With Telegram Enabled:
- - Binance public API
- Telegram API (send messages only, to user's bot)
📄 License
MIT License - See LICENSE
Version: 3.3.0
Security Level: L1 (Default) / L2 (With Telegram)
Author: Georges Andronescu (Wesley Armando)
Repository: https://github.com/georges91560/crypto-sniper-oracle
END OF SKILL
Crypto Sniper Oracle — 量化市场情报与报告
⚠️ 范围与能力
核心功能: 获取公开市场数据并生成量化分析。
功能范围:
- - ✅ 从币安API获取公开行情数据
- ✅ 从币安API获取公开订单簿数据
- ✅ 计算订单簿失衡度(OBI)
- ✅ 计算VWAP背离
- ✅ 评估流动性质量(以基点计算的价差)
- ✅ 生成格式化分析报告
- ✅ [可选] 通过Telegram发送报告
- ✅ [可选] 定时任务实现自动化报告
不涉及的功能:
- - ❌ 下单或执行交易
- ❌ 转账资金
- ❌ 访问交易所私有数据
- ❌ 读取智能体记忆(自身日志除外)
- ❌ 拦截或阻止其他技能
🔧 配置选项
模式1:仅分析(默认)
无Telegram,手动调用:
bash
仅获取数据并分析
python3 crypto_oracle.py --symbol BTCUSDT
使用场景: 按需手动分析。
模式2:Telegram报告(可选)
启用Telegram提醒和报告:
所需环境变量:
bash
export TELEGRAMBOTTOKEN=yourbottoken_here
export TELEGRAMCHATID=yourchatid_here
配置:
json
{
skills: {
crypto-sniper-oracle: {
enabled: true,
config: {
telegram_enabled: true
}
}
}
}
使用场景: 自动发送报告至Telegram。
模式3:定时任务 + Telegram(自动化)
定时市场报告:
示例定时任务:
bash
每日UTC时间9点报告
0 9
* /workspace/skills/crypto-sniper-oracle/reporter.py --mode daily
每小时异常检查
0
/workspace/skills/crypto-sniper-oracle/reporter.py --mode hourly
每15分钟价格提醒
/15 * /workspace/skills/crypto-sniper-oracle/reporter.py --mode alerts
使用场景: 全自动市场监控。
📊 报告模板
1. 每日市场报告
触发条件: 定时任务(每日UTC 9点)或手动命令
内容:
markdown
📊 加密货币市场日报
{date} | Powered by Wesley
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 市场概览(分析10个交易对)
🟢 看涨信号(OBI > +0.15)
• BTCUSDT: OBI +0.18,价差 2.1 基点
价格 vs VWAP: +0.5%(高于均值)
信号:强劲买盘压力
• ETHUSDT: OBI +0.12,价差 3.5 基点
价格 vs VWAP: +0.3%
信号:温和看涨
🔴 看跌信号(OBI < -0.15)
• SOLUSDT: OBI -0.16,价差 8.2 基点
价格 vs VWAP: -0.8%
信号:卖盘压力
💰 流动性质量
优秀(< 5 基点):5个交易对
良好(5-10 基点):3个交易对
较差(> 30 基点):2个交易对
📈 24小时涨跌榜
+12.3% SOLUSDT(波动率:高)
+8.1% ETHUSDT(波动率:中)
-5.2% BNBUSDT(波动率:中)
🎯 交易机会
→ BTC:看涨信号确认(OBI +0.18)
→ ETH:中等强度,关注突破
→ SOL:避免——卖盘压力 + 流动性差
━━━━━━━━━━━━━━━━━━━━━━━━━━━━
生成时间:2026-02-27 09:00:00 UTC
下次报告:2026-02-28 09:00:00 UTC
2. 异常提醒
触发条件: OBI激增、价差爆炸或成交量飙升
内容:
markdown
🚨 检测到市场异常
时间:15:23:45 UTC
资产:BTCUSDT
📊 异常类型:OBI激增
• 前值OBI:+0.05
• 当前OBI:+0.22
• 变化:15分钟内增长340%
💰 流动性:优秀(2.3 基点)
📈 价格 vs VWAP:+0.6%
💡 含义:
检测到强劲买盘压力激增。
价格可能即将上行。
🎯 建议操作:
如其他信号一致,考虑做多。
密切关注接下来30分钟。
[查看完整分析]
3. 每小时总结
触发条件: 定时任务(每小时)
内容:
markdown
⚡ 每小时市场检查
{timestamp}
🔍 扫描:10个交易对
🟢 看涨:3
🔴 看跌:2
⚪ 中性:5
📊 显著变化:
• BTC OBI:+0.05 → +0.12(↑)
• ETH 价差:3.2 → 5.8 基点(↑)
⚠️ 提醒:无
下次检查:{next_hour}
🔐 文件访问(扩展)
读取:
- - /workspace/skills/crypto-sniper-oracle/crypto_oracle.py(数据获取器)
- /workspace/skills/crypto-sniper-oracle/reporter.py(报告生成器)
- /workspace/skills/crypto-sniper-oracle/templates/*.md(报告模板)
写入:
- - /workspace/.oraclecache.json(45秒缓存)
- /workspace/MARKETANALYSIS.md(分析报告)
- /workspace/TRADINGLOGS.md(审计追踪)
- /workspace/reports/daily{date}.md(归档报告)
- /workspace/reports/alerts_{date}.log(提醒历史)
🌐 网络访问(扩展)
始终允许:
- - ✅ https://api.binance.com/api/v3/*(公开市场数据)
条件允许(如启用Telegram):
- - ✅ https://api.telegram.org/bot{token}/*(仅发送消息)
始终禁止:
📋 定时任务规范
每日报告
bash
计划:每日UTC 9点
0 9
* /workspace/skills/crypto-sniper-oracle/reporter.py --mode daily --symbols BTCUSDT,ETHUSDT,SOLUSDT,BNBUSDT,ADAUSDT
功能:
- 1. 获取所有交易对数据
- 计算每个交易对的OBI、VWAP、价差
- 汇总生成每日报告
- 通过Telegram发送(如启用)
- 归档至 /workspace/reports/daily_{date}.md
每小时检查
bash
计划:每小时
0
/workspace/skills/crypto-sniper-oracle/reporter.py --mode hourly --symbols BTCUSDT,ETHUSDT
功能:
- 1. 快速扫描关键交易对
- 与前一小时对比
- 检测显著变化
- 如检测到异常则提醒
价格提醒
bash
计划:每15分钟
/15 * /workspace/skills/crypto-sniper-oracle/reporter.py --mode alerts --symbols BTCUSDT
功能:
- 1. 检查OBI激增(变化>50%)
- 检查价差爆炸(增长>100%)
- 检查成交量飙升(超过均值200%)
- 如检测到则立即发送Telegram提醒
🛠️ 工作原理
第一层——数据获取(不变)
与v3.2.1相同——使用crypto_oracle.py获取数据。
第二层——报告生成(新增)
流程 生成报告(模式, 交易对):
1. 获取所有交易对数据
对于每个交易对 in 交易对:
数据[交易对] = 调用预言机(交易对)
2. 汇总指标
计算:
- 看涨数量(OBI > 0.15)
- 看跌数量(OBI < -0.15)
-