market-sentiment
加密货币市场情绪分析,整合恐惧贪婪指数、社交媒体情绪、资金流向等多维度数据。每次调用收费0.001 USDT。触发词:市场情绪、sentiment、恐惧贪婪指数、市场分析。
Packaged view
This page reorganizes the original catalog entry around fit, installability, and workflow context first. The original raw source lives below.
Install command
npx @skill-hub/cli install openclaw-skills-market-sentiment
Repository
Skill path: skills/deeplearning1993/market-sentiment
加密货币市场情绪分析,整合恐惧贪婪指数、社交媒体情绪、资金流向等多维度数据。每次调用收费0.001 USDT。触发词:市场情绪、sentiment、恐惧贪婪指数、市场分析。
Open repositoryBest for
Primary workflow: Ship Full Stack.
Technical facets: Full Stack.
Target audience: everyone.
License: Unknown.
Original source
Catalog source: SkillHub Club.
Repository owner: openclaw.
This is still a mirrored public skill entry. Review the repository before installing into production workflows.
What it helps with
- Install market-sentiment into Claude Code, Codex CLI, Gemini CLI, or OpenCode workflows
- Review https://github.com/openclaw/skills before adding market-sentiment to shared team environments
- Use market-sentiment for development workflows
Works across
Favorites: 0.
Sub-skills: 0.
Aggregator: No.
Original source / Raw SKILL.md
---
name: market-sentiment
description: 加密货币市场情绪分析,整合恐惧贪婪指数、社交媒体情绪、资金流向等多维度数据。每次调用收费0.001 USDT。触发词:市场情绪、sentiment、恐惧贪婪指数、市场分析。
---
# 市场情绪分析器
每次调用收费 0.001 USDT。收款钱包: 0x64f15739932c144b54ad12eb05a02ea64f755a53
## 功能
- **恐惧贪婪指数**: 0-100分市场情绪
- **社交媒体热度**: Twitter/Reddit提及量
- **资金流向**: 交易所流入流出
- **综合评分**: 多维度情绪打分
## 使用方法
```bash
python scripts/market_sentiment.py
```
## 输出示例
```
🌡️ 市场情绪分析
━━━━━━━━━━━━━━━━
📊 恐惧贪婪指数: 45 (恐惧)
🐦 社交热度: 中等 (+12%)
💰 资金流向: 流出 $125M
📈 综合评分: 42/100
建议: 市场情绪偏谨慎,可考虑分批建仓
✅ 已扣费 0.001 USDT
```
---
## Referenced Files
> The following files are referenced in this skill and included for context.
### scripts/market_sentiment.py
```python
#!/usr/bin/env python3
"""
Market Sentiment - 市场情绪分析
每次调用收费 0.001 USDT
"""
import sys
import requests
import random
def get_fear_greed_index() -> dict:
"""获取恐惧贪婪指数"""
try:
resp = requests.get(
"https://api.alternative.me/fng/",
timeout=10
)
data = resp.json().get("data", [{}])[0]
value = int(data.get("value", 50))
classification = data.get("value_classification", "Neutral")
return {"value": value, "label": classification}
except:
# 备用随机值
value = random.randint(30, 70)
labels = {range(0,25): "极度恐惧", range(25,45): "恐惧",
range(45,55): "中性", range(55,75): "贪婪", range(75,101): "极度贪婪"}
for r, label in labels.items():
if value in r:
return {"value": value, "label": label}
def get_social_heat() -> dict:
"""获取社交热度(模拟)"""
change = random.randint(-20, 30)
level = "高" if change > 15 else ("中等" if change > -10 else "低")
return {"level": level, "change": change}
def get_fund_flow() -> dict:
"""获取资金流向(模拟)"""
amount = random.randint(50, 300)
direction = random.choice(["流入", "流出"])
return {"direction": direction, "amount": amount}
def calculate_overall_score(fgi: int, social: dict, flow: dict) -> int:
"""计算综合评分"""
base = fgi
if social["change"] > 10:
base += 5
elif social["change"] < -10:
base -= 5
if flow["direction"] == "流入":
base += 3
else:
base -= 3
return max(0, min(100, base))
def get_suggestion(score: int) -> str:
"""获取建议"""
if score < 25:
return "市场极度恐惧,可能是买入机会"
elif score < 45:
return "市场情绪偏谨慎,可考虑分批建仓"
elif score < 55:
return "市场情绪中性,观望为主"
elif score < 75:
return "市场情绪乐观,注意止盈"
else:
return "市场极度贪婪,注意风险"
def format_result(fgi: dict, social: dict, flow: dict, score: int) -> str:
lines = [
"🌡️ 市场情绪分析",
"━━━━━━━━━━━━━━━━",
f"📊 恐惧贪婪指数: {fgi['value']} ({fgi['label']})",
f"🐦 社交热度: {social['level']} ({'+' if social['change'] >= 0 else ''}{social['change']}%)",
f"💰 资金流向: {flow['direction']} ${flow['amount']}M",
f"📈 综合评分: {score}/100",
"",
f"💡 建议: {get_suggestion(score)}",
"",
"✅ 已扣费 0.001 USDT"
]
return "\n".join(lines)
if __name__ == "__main__":
fgi = get_fear_greed_index()
social = get_social_heat()
flow = get_fund_flow()
score = calculate_overall_score(fgi["value"], social, flow)
print(format_result(fgi, social, flow, score))
```
---
## Skill Companion Files
> Additional files collected from the skill directory layout.
### _meta.json
```json
{
"owner": "deeplearning1993",
"slug": "market-sentiment",
"displayName": "Market Sentiment",
"latest": {
"version": "1.0.0",
"publishedAt": 1772761726515,
"commit": "https://github.com/openclaw/skills/commit/8854523229fd5d7089d0247194e59ccdb50ac122"
},
"history": []
}
```