opennews-mcp-news-aggregation
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseOpenNews MCP News Aggregation
OpenNews MCP 新闻聚合
Skill by ara.so — MCP Skills collection.
OpenNews MCP is a Model Context Protocol server providing real-time access to 84+ crypto and financial news sources across 6 categories (News, Listing, OnChain, Meme, Market, Prediction). Every article includes AI-powered impact scores (0-100), trading signals (long/short/neutral), and bilingual summaries.
由ara.so开发的Skill — 属于MCP Skills合集。
OpenNews MCP是一个Model Context Protocol服务器,提供对84+加密货币和金融新闻数据源的实时访问,涵盖6大类别(新闻、上线公告、链上、迷因、市场、预测)。每篇文章都包含AI生成的影响评分(0-100)、交易信号(做多/做空/中性)以及双语摘要。
Installation
安装
Prerequisites
前置条件
- Get your API token from https://6551.io/mcp
- Set the token as an environment variable:
bash
export OPENNEWS_TOKEN="your-token-here"- 从https://6551.io/mcp获取你的API token
- 将token设置为环境变量:
bash
export OPENNEWS_TOKEN="your-token-here"Claude Desktop
Claude Desktop
Add to :
claude_desktop_config.jsonjson
{
"mcpServers": {
"opennews": {
"command": "uv",
"args": [
"--directory",
"/path/to/opennews-mcp",
"run",
"opennews-mcp"
],
"env": {
"OPENNEWS_TOKEN": "your-token-here"
}
}
}
}添加到:
claude_desktop_config.jsonjson
{
"mcpServers": {
"opennews": {
"command": "uv",
"args": [
"--directory",
"/path/to/opennews-mcp",
"run",
"opennews-mcp"
],
"env": {
"OPENNEWS_TOKEN": "your-token-here"
}
}
}
}Using claude mcp add
claude mcp add使用claude mcp add
claude mcp addbash
claude mcp add opennews \
-e OPENNEWS_TOKEN=your-token-here \
-- uv --directory /path/to/opennews-mcp run opennews-mcpbash
claude mcp add opennews \
-e OPENNEWS_TOKEN=your-token-here \
-- uv --directory /path/to/opennews-mcp run opennews-mcpOpenClaw
OpenClaw
bash
export OPENNEWS_TOKEN="your-token-here"
cp -r openclaw-skill/opennews ~/.openclaw/skills/bash
export OPENNEWS_TOKEN="your-token-here"
cp -r openclaw-skill/opennews ~/.openclaw/skills/Configuration
配置
The server supports both environment variables and a file in the project root. Environment variables take precedence.
config.json服务器同时支持环境变量和项目根目录下的文件,环境变量优先级更高。
config.jsonEnvironment Variables
环境变量
| Variable | Required | Default | Description |
|---|---|---|---|
| Yes | - | API Bearer Token from 6551.io |
| No | | REST API base URL |
| No | | WebSocket URL |
| No | | Max results per request |
| 变量 | 是否必填 | 默认值 | 描述 |
|---|---|---|---|
| 是 | - | 来自6551.io的API Bearer Token |
| 否 | | REST API基础URL |
| 否 | | WebSocket URL |
| 否 | | 每次请求的最大结果数 |
config.json
config.json
json
{
"api_base_url": "https://ai.6551.io",
"wss_url": "wss://ai.6551.io/open/news_wss",
"api_token": "your-token-here",
"max_rows": 100
}json
{
"api_base_url": "https://ai.6551.io",
"wss_url": "wss://ai.6551.io/open/news_wss",
"api_token": "your-token-here",
"max_rows": 100
}Data Sources Overview
数据源概述
The platform aggregates 84+ sources across 6 engine types:
- news (53 sources): Bloomberg, Reuters, Financial Times, CNBC, CoinDesk, Cointelegraph, The Block, Twitter/X, Telegram, and more
- listing (9 sources): Binance, Coinbase, OKX, Bybit, Upbit, Robinhood, Hyperliquid listings
- onchain (3 sources): Hyperliquid whale trades, large positions, KOL trades
- meme (1 source): Twitter meme coin sentiment
- market (6 sources): Price changes, funding rates, liquidations, OI changes
- prediction (12 sources): AI correlation, smart money, whale positions, insider patterns
平台整合了84+数据源,分为6种引擎类型:
- news(53个数据源):Bloomberg、Reuters、Financial Times、CNBC、CoinDesk、Cointelegraph、The Block、Twitter/X、Telegram等
- listing(9个数据源):Binance、Coinbase、OKX、Bybit、Upbit、Robinhood、Hyperliquid上线公告
- onchain(3个数据源):Hyperliquid大额交易、大额持仓、KOL交易
- meme(1个数据源):Twitter迷因币情绪
- market(6个数据源):价格变动、资金费率、清算情况、持仓量变化
- prediction(12个数据源):AI相关性分析、聪明资金动向、大额持仓、内幕模式
Available Tools
可用工具
Discovery Tools
发现类工具
get_news_sources
get_news_sourcesget_news_sources
get_news_sourcesRetrieves the complete engine tree with all categories and sources.
python
undefined获取包含所有类别和数据源的完整引擎树。
python
undefinedReturns hierarchical structure of all 6 engine types and their sources
返回所有6种引擎类型及其数据源的层级结构
Each source includes metadata like description and type
每个数据源包含描述和类型等元数据
**Response structure:**
```json
{
"news": {
"Bloomberg": {"description": "Bloomberg — top-tier financial news"},
"CoinDesk": {"description": "CoinDesk — leading crypto media"}
},
"listing": {
"Binance": {"description": "Binance new token listings"}
},
"onchain": {
"Hyperliquid Whale Trade": {"description": "Hyperliquid whale trade alerts"}
}
}
**响应结构:**
```json
{
"news": {
"Bloomberg": {"description": "Bloomberg — top-tier financial news"},
"CoinDesk": {"description": "CoinDesk — leading crypto media"}
},
"listing": {
"Binance": {"description": "Binance new token listings"}
},
"onchain": {
"Hyperliquid Whale Trade": {"description": "Hyperliquid whale trade alerts"}
}
}list_news_types
list_news_typeslist_news_types
list_news_typesReturns a flat list of all available source codes for filtering.
python
undefined返回所有可用数据源编码的扁平列表,用于过滤。
python
undefinedReturns array of all source codes across all engine types
返回所有引擎类型下的数据源编码数组
Use these codes in other tool filters
在其他工具的过滤条件中使用这些编码
**Response:**
```json
["Bloomberg", "Reuters", "CoinDesk", "Binance", "Hyperliquid Whale Trade", ...]
**响应:**
```json
["Bloomberg", "Reuters", "CoinDesk", "Binance", "Hyperliquid Whale Trade", ...]Search Tools
搜索类工具
get_latest_news
get_latest_newsget_latest_news
get_latest_newsFetch the most recent articles across all sources.
Parameters:
- (optional, default: 20): Number of articles to return
limit
python
undefined获取所有数据源中的最新文章。
参数:
- (可选,默认值:20):返回的文章数量
limit
python
undefinedGet latest 50 articles
获取最新50篇文章
{"limit": 50}
undefined{"limit": 50}
undefinedsearch_news
search_newssearch_news
search_newsFull-text keyword search across all sources.
Parameters:
- (required): Search query string
keywords - (optional, default: 20): Number of results
limit
python
undefined在所有数据源中进行全文关键词搜索。
参数:
- (必填):搜索查询字符串
keywords - (可选,默认值:20):结果数量
limit
python
undefinedSearch for SEC-related news
搜索与SEC相关的新闻
{"keywords": "SEC regulation", "limit": 30}
undefined{"keywords": "SEC regulation", "limit": 30}
undefinedsearch_news_by_coin
search_news_by_coinsearch_news_by_coin
search_news_by_coinFilter articles by specific cryptocurrencies.
Parameters:
- (required): Array of coin symbols (e.g.,
coins)["BTC", "ETH"] - (optional, default: 20): Number of results
limit
python
undefined按特定加密货币筛选文章。
参数:
- (必填):加密货币符号数组(例如:
coins)["BTC", "ETH"] - (可选,默认值:20):结果数量
limit
python
undefinedGet Bitcoin and Ethereum news
获取比特币和以太坊相关新闻
{"coins": ["BTC", "ETH"], "limit": 40}
undefined{"coins": ["BTC", "ETH"], "limit": 40}
undefinedget_news_by_source
get_news_by_sourceget_news_by_source
get_news_by_sourceFilter by specific source within an engine type.
Parameters:
- (required): Engine category (
engine_type,news,listing,onchain,meme,market)prediction - (required): Specific source code (e.g.,
news_type,Bloomberg)Binance - (optional, default: 20): Number of results
limit
python
undefined按引擎类型下的特定数据源筛选。
参数:
- (必填):引擎类别(
engine_type,news,listing,onchain,meme,market)prediction - (必填):特定数据源编码(例如:
news_type,Bloomberg)Binance - (可选,默认值:20):结果数量
limit
python
undefinedGet Bloomberg news only
仅获取Bloomberg新闻
{"engine_type": "news", "news_type": "Bloomberg", "limit": 25}
{"engine_type": "news", "news_type": "Bloomberg", "limit": 25}
Get Binance listings
获取Binance上线公告
{"engine_type": "listing", "news_type": "Binance", "limit": 10}
undefined{"engine_type": "listing", "news_type": "Binance", "limit": 10}
undefinedget_news_by_engine
get_news_by_engineget_news_by_engine
get_news_by_engineFilter articles by engine category.
Parameters:
- (required): Engine category
engine_type - (optional, default: 20): Number of results
limit
python
undefined按引擎类别筛选文章。
参数:
- (必填):引擎类别
engine_type - (可选,默认值:20):结果数量
limit
python
undefinedGet all on-chain events
获取所有链上事件
{"engine_type": "onchain", "limit": 30}
{"engine_type": "onchain", "limit": 30}
Get all prediction signals
获取所有预测信号
{"engine_type": "prediction", "limit": 50}
undefined{"engine_type": "prediction", "limit": 50}
undefinedsearch_news_advanced
search_news_advancedsearch_news_advanced
search_news_advancedMulti-filter search combining coins, keywords, and engine types.
Parameters:
- (optional): Array of coin symbols
coins - (optional): Search query
keywords - (optional): Array of engine categories
engine_types - (optional, default: 20): Number of results
limit
python
undefined结合加密货币、关键词和引擎类型的多条件搜索。
参数:
- (可选):加密货币符号数组
coins - (可选):搜索查询
keywords - (可选):引擎类别数组
engine_types - (可选,默认值:20):结果数量
limit
python
undefinedBitcoin news from Bloomberg and CoinDesk mentioning "ETF"
来自Bloomberg和CoinDesk的、提及"ETF"的比特币新闻
{
"coins": ["BTC"],
"keywords": "ETF",
"engine_types": ["news"],
"limit": 30
}
{
"coins": ["BTC"],
"keywords": "ETF",
"engine_types": ["news"],
"limit": 30
}
Whale activity for SOL and ETH
SOL和ETH的大额交易活动
{
"coins": ["SOL", "ETH"],
"engine_types": ["onchain"],
"limit": 20
}
undefined{
"coins": ["SOL", "ETH"],
"engine_types": ["onchain"],
"limit": 20
}
undefinedAI-Powered Tools
AI驱动工具
get_high_score_news
get_high_score_newsget_high_score_news
get_high_score_newsRetrieve articles with high AI impact scores.
Parameters:
- (optional, default: 80): Minimum impact score (0-100)
min_score - (optional, default: 20): Number of results
limit
python
undefined获取AI影响评分较高的文章。
参数:
- (可选,默认值:80):最低影响评分(0-100)
min_score - (可选,默认值:20):结果数量
limit
python
undefinedGet articles with score >= 90
获取评分≥90的文章
{"min_score": 90, "limit": 15}
{"min_score": 90, "limit": 15}
Get articles with score >= 70
获取评分≥70的文章
{"min_score": 70, "limit": 30}
undefined{"min_score": 70, "limit": 30}
undefinedget_news_by_signal
get_news_by_signalget_news_by_signal
get_news_by_signalFilter by AI-generated trading signals.
Parameters:
- (required): Trading signal type (
signal,long,short)neutral - (optional, default: 20): Number of results
limit
python
undefined按AI生成的交易信号筛选。
参数:
- (必填):交易信号类型(
signal,long,short)neutral - (可选,默认值:20):结果数量
limit
python
undefinedGet bullish signals
获取看涨信号
{"signal": "long", "limit": 25}
{"signal": "long", "limit": 25}
Get bearish signals
获取看跌信号
{"signal": "short", "limit": 25}
{"signal": "short", "limit": 25}
Get neutral signals
获取中性信号
{"signal": "neutral", "limit": 20}
undefined{"signal": "neutral", "limit": 20}
undefinedReal-Time Tools
实时工具
subscribe_latest_news
subscribe_latest_newssubscribe_latest_news
subscribe_latest_newsSubscribe to WebSocket live feed with optional filters.
Parameters:
- (optional): Object mapping engine types to source codes
engine_types- Key: Engine type (,
news,listing, etc.)onchain - Value: Array of source codes (empty array = all sources in that engine)
- Key: Engine type (
- (optional): Array of coin symbols
coins - (optional, boolean): Only articles tagged with coins
has_coin
python
undefined订阅WebSocket实时推送,支持可选过滤条件。
参数:
- (可选):引擎类型与数据源编码的映射对象
engine_types- 键:引擎类型(,
news,listing等)onchain - 值:数据源编码数组(空数组=该引擎下所有数据源)
- 键:引擎类型(
- (可选):加密货币符号数组
coins - (可选,布尔值):仅返回标记有加密货币的文章
has_coin
python
undefinedSubscribe to Bloomberg and CoinDesk for BTC and ETH
订阅Bloomberg和CoinDesk的BTC和ETH相关新闻
{
"engine_types": {
"news": ["Bloomberg", "CoinDesk"]
},
"coins": ["BTC", "ETH"],
"has_coin": True
}
{
"engine_types": {
"news": ["Bloomberg", "CoinDesk"]
},
"coins": ["BTC", "ETH"],
"has_coin": True
}
Subscribe to all listing announcements
订阅所有上线公告
{
"engine_types": {
"listing": []
}
}
{
"engine_types": {
"listing": []
}
}
Subscribe to whale on-chain activity
订阅链上大额交易活动
{
"engine_types": {
"onchain": []
}
}
**WebSocket message format (incoming):**
```json
{
"jsonrpc": "2.0",
"method": "news.update",
"params": {
"id": "article-id",
"title": "Article title",
"content": "Full article text",
"engine_type": "news",
"news_type": "Bloomberg",
"coins": ["BTC"],
"ai_score": 85,
"ai_signal": "long",
"summary_en": "English summary",
"summary_zh": "中文摘要",
"published_at": "2026-05-16T12:00:00Z"
}
}{
"engine_types": {
"onchain": []
}
}
**WebSocket消息格式(传入):**
```json
{
"jsonrpc": "2.0",
"method": "news.update",
"params": {
"id": "article-id",
"title": "Article title",
"content": "Full article text",
"engine_type": "news",
"news_type": "Bloomberg",
"coins": ["BTC"],
"ai_score": 85,
"ai_signal": "long",
"summary_en": "English summary",
"summary_zh": "中文摘要",
"published_at": "2026-05-16T12:00:00Z"
}
}Response Data Structure
响应数据结构
All news articles follow this structure:
json
{
"id": "unique-article-id",
"title": "Article headline",
"content": "Full article text content",
"engine_type": "news",
"news_type": "Bloomberg",
"coins": ["BTC", "ETH"],
"ai_score": 85,
"ai_signal": "long",
"summary_en": "English AI-generated summary",
"summary_zh": "中文AI生成摘要",
"published_at": "2026-05-16T10:30:00Z",
"url": "https://original-source.com/article",
"metadata": {
"author": "Jane Doe",
"tags": ["regulation", "ETF"]
}
}Key fields:
- (0-100): AI impact score, higher = more market-moving
ai_score - : Trading direction (
ai_signal,long,short)neutral - : Array of related cryptocurrency symbols
coins - : Category (news, listing, onchain, meme, market, prediction)
engine_type - : Specific source code
news_type
所有新闻文章均遵循以下结构:
json
{
"id": "unique-article-id",
"title": "Article headline",
"content": "Full article text content",
"engine_type": "news",
"news_type": "Bloomberg",
"coins": ["BTC", "ETH"],
"ai_score": 85,
"ai_signal": "long",
"summary_en": "English AI-generated summary",
"summary_zh": "中文AI生成摘要",
"published_at": "2026-05-16T10:30:00Z",
"url": "https://original-source.com/article",
"metadata": {
"author": "Jane Doe",
"tags": ["regulation", "ETF"]
}
}核心字段:
- (0-100):AI影响评分,分数越高对市场影响越大
ai_score - :交易方向(
ai_signal,long,short)neutral - :相关加密货币符号数组
coins - :类别(news, listing, onchain, meme, market, prediction)
engine_type - :特定数据源编码
news_type
Common Usage Patterns
常见使用模式
Pattern 1: Monitor High-Impact News
模式1:监控高影响新闻
python
undefinedpython
undefinedGet latest high-impact news (score >= 80)
获取最新高影响新闻(评分≥80)
result = get_high_score_news(min_score=80, limit=10)
result = get_high_score_news(min_score=80, limit=10)
Filter for bullish signals only
仅筛选看涨信号
bullish = get_news_by_signal(signal="long", limit=15)
bullish = get_news_by_signal(signal="long", limit=15)
Combine: high-impact bullish Bitcoin news
组合筛选:高影响看涨比特币新闻
advanced = search_news_advanced(
coins=["BTC"],
engine_types=["news", "prediction"],
limit=20
)
advanced = search_news_advanced(
coins=["BTC"],
engine_types=["news", "prediction"],
limit=20
)
Then filter results where ai_score >= 80 and ai_signal == "long"
之后筛选出ai_score≥80且ai_signal=="long"的结果
undefinedundefinedPattern 2: Track Specific Assets
模式2:追踪特定资产
python
undefinedpython
undefinedGet all Solana-related news
获取所有Solana相关新闻
sol_news = search_news_by_coin(coins=["SOL"], limit=30)
sol_news = search_news_by_coin(coins=["SOL"], limit=30)
Get Solana on-chain whale activity
获取Solana链上大额交易活动
sol_onchain = search_news_advanced(
coins=["SOL"],
engine_types=["onchain"],
limit=15
)
sol_onchain = search_news_advanced(
coins=["SOL"],
engine_types=["onchain"],
limit=15
)
Get Solana listings across all exchanges
获取所有交易所的Solana上线公告
sol_listings = search_news_advanced(
coins=["SOL"],
engine_types=["listing"],
limit=10
)
undefinedsol_listings = search_news_advanced(
coins=["SOL"],
engine_types=["listing"],
limit=10
)
undefinedPattern 3: Source-Specific Monitoring
模式3:特定数据源监控
python
undefinedpython
undefinedGet all Bloomberg articles
获取所有Bloomberg文章
bloomberg = get_news_by_source(
engine_type="news",
news_type="Bloomberg",
limit=25
)
bloomberg = get_news_by_source(
engine_type="news",
news_type="Bloomberg",
limit=25
)
Get Binance listing announcements
获取Binance上线公告
binance_listings = get_news_by_source(
engine_type="listing",
news_type="Binance",
limit=10
)
binance_listings = get_news_by_source(
engine_type="listing",
news_type="Binance",
limit=10
)
Get Hyperliquid whale trades
获取Hyperliquid大额交易
whale_trades = get_news_by_source(
engine_type="onchain",
news_type="Hyperliquid Whale Trade",
limit=20
)
undefinedwhale_trades = get_news_by_source(
engine_type="onchain",
news_type="Hyperliquid Whale Trade",
limit=20
)
undefinedPattern 4: Real-Time Alerts
模式4:实时警报
python
undefinedpython
undefinedSubscribe to critical sources for BTC and ETH
订阅BTC和ETH的关键数据源
subscribe_latest_news(
engine_types={
"news": ["Bloomberg", "Reuters", "Financial Times"],
"listing": ["Binance", "Coinbase"],
"onchain": [] # All on-chain sources
},
coins=["BTC", "ETH"],
has_coin=True
)
subscribe_latest_news(
engine_types={
"news": ["Bloomberg", "Reuters", "Financial Times"],
"listing": ["Binance", "Coinbase"],
"onchain": [] # 所有链上数据源
},
coins=["BTC", "ETH"],
has_coin=True
)
Subscribe to all prediction signals
订阅所有预测信号
subscribe_latest_news(
engine_types={
"prediction": []
}
)
undefinedsubscribe_latest_news(
engine_types={
"prediction": []
}
)
undefinedPattern 5: Thematic Research
模式5:主题研究
python
undefinedpython
undefinedResearch regulation topics
研究监管相关话题
regulation_news = search_news(
keywords="SEC regulation compliance",
limit=40
)
regulation_news = search_news(
keywords="SEC regulation compliance",
limit=40
)
ETF-related news with high impact
高影响ETF相关新闻
etf_news = search_news(keywords="ETF", limit=30)
etf_news = search_news(keywords="ETF", limit=30)
Filter for ai_score >= 75
筛选出ai_score≥75的结果
Institutional adoption signals
机构采用信号
institutional = search_news(
keywords="institutional adoption grayscale blackrock",
limit=25
)
undefinedinstitutional = search_news(
keywords="institutional adoption grayscale blackrock",
limit=25
)
undefinedWebSocket Direct Usage
WebSocket直接使用
For applications needing direct WebSocket access:
python
import json
import websockets
import asyncio
import os
async def subscribe_news():
token = os.getenv("OPENNEWS_TOKEN")
url = f"wss://ai.6551.io/open/news_wss?token={token}"
async with websockets.connect(url) as ws:
# Subscribe to specific filters
subscribe_msg = {
"jsonrpc": "2.0",
"id": 1,
"method": "news.subscribe",
"params": {
"engineTypes": {
"news": ["Bloomberg", "CoinDesk"],
"listing": []
},
"coins": ["BTC", "ETH"],
"hasCoin": True
}
}
await ws.send(json.dumps(subscribe_msg))
# Receive confirmation
response = await ws.recv()
print(f"Subscription confirmed: {response}")
# Listen for updates
async for message in ws:
data = json.loads(message)
if data.get("method") == "news.update":
article = data["params"]
print(f"New article: {article['title']}")
print(f"AI Score: {article['ai_score']}")
print(f"Signal: {article['ai_signal']}")对于需要直接访问WebSocket的应用:
python
import json
import websockets
import asyncio
import os
async def subscribe_news():
token = os.getenv("OPENNEWS_TOKEN")
url = f"wss://ai.6551.io/open/news_wss?token={token}"
async with websockets.connect(url) as ws:
# 订阅特定筛选条件
subscribe_msg = {
"jsonrpc": "2.0",
"id": 1,
"method": "news.subscribe",
"params": {
"engineTypes": {
"news": ["Bloomberg", "CoinDesk"],
"listing": []
},
"coins": ["BTC", "ETH"],
"hasCoin": True
}
}
await ws.send(json.dumps(subscribe_msg))
# 接收确认信息
response = await ws.recv()
print(f"Subscription confirmed: {response}")
# 监听更新
async for message in ws:
data = json.loads(message)
if data.get("method") == "news.update":
article = data["params"]
print(f"New article: {article['title']}")
print(f"AI Score: {article['ai_score']}")
print(f"Signal: {article['ai_signal']}")Troubleshooting
故障排除
Authentication Errors
认证错误
Problem: or
401 UnauthorizedInvalid tokenSolution:
- Verify token is correct from https://6551.io/mcp
- Check environment variable is set:
echo $OPENNEWS_TOKEN - Ensure token has no extra spaces or quotes
- For Claude Desktop, restart the app after config changes
问题: 或
401 UnauthorizedInvalid token解决方案:
- 验证来自https://6551.io/mcp的token是否正确
- 检查环境变量是否设置:
echo $OPENNEWS_TOKEN - 确保token没有多余空格或引号
- 对于Claude Desktop,修改配置后重启应用
No Results Returned
无结果返回
Problem: Empty results or
[]Solution:
- Check if filters are too restrictive (e.g., coin doesn't have recent news)
- Increase parameter
limit - Verify and
engine_typecodes withnews_typelist_news_types - Try broader search (e.g., use first)
get_latest_news
问题: 返回空结果或
[]解决方案:
- 检查筛选条件是否过于严格(例如:该加密货币近期无新闻)
- 增大参数
limit - 使用验证
list_news_types和engine_type编码是否正确news_type - 尝试更宽泛的搜索(例如:先使用)
get_latest_news
WebSocket Connection Issues
WebSocket连接问题
Problem: Connection fails or disconnects
Solution:
- Verify token is included in URL query parameter
- Check network allows WebSocket connections (corporate firewalls)
- Implement reconnection logic with exponential backoff
- Validate subscription message format matches JSON-RPC 2.0
问题: 连接失败或断开
解决方案:
- 验证URL查询参数中是否包含token
- 检查网络是否允许WebSocket连接(企业防火墙可能限制)
- 实现带指数退避的重连逻辑
- 验证订阅消息格式符合JSON-RPC 2.0规范
Rate Limiting
速率限制
Problem:
429 Too Many RequestsSolution:
- Reduce request frequency
- Use WebSocket subscriptions instead of polling
- Implement request queuing with delays
- Contact support for higher rate limits if needed
问题:
429 Too Many Requests解决方案:
- 降低请求频率
- 使用WebSocket订阅替代轮询
- 实现带延迟的请求排队机制
- 如有需要,联系支持团队获取更高的速率限制
Unexpected Data Format
意外数据格式
Problem: Missing fields or unexpected values
Solution:
- Not all articles have array (check
coinsfilter)has_coin - and
ai_scoreare always present but may be nullai_signal - object is optional and varies by source
metadata - Always validate fields exist before accessing
问题: 字段缺失或值不符合预期
解决方案:
- 并非所有文章都有数组(可使用
coins筛选)has_coin - 和
ai_score始终存在但可能为nullai_signal - 对象是可选的,且因数据源而异
metadata - 访问字段前始终先验证其是否存在
Example Integration Workflows
示例集成工作流
Daily Digest Builder
每日摘要生成器
python
undefinedpython
undefinedGet top 10 highest impact articles from past 24 hours
获取过去24小时内评分最高的10篇高影响文章
high_impact = get_high_score_news(min_score=85, limit=10)
high_impact = get_high_score_news(min_score=85, limit=10)
Group by signal
按信号分组
bullish = [a for a in high_impact if a['ai_signal'] == 'long']
bearish = [a for a in high_impact if a['ai_signal'] == 'short']
bullish = [a for a in high_impact if a['ai_signal'] == 'long']
bearish = [a for a in high_impact if a['ai_signal'] == 'short']
Format digest
格式化摘要
print("📈 Bullish Signals:")
for article in bullish:
print(f" • {article['title']} (Score: {article['ai_score']})")
print("\n📉 Bearish Signals:")
for article in bearish:
print(f" • {article['title']} (Score: {article['ai_score']})")
undefinedprint("📈 看涨信号:")
for article in bullish:
print(f" • {article['title']} (评分:{article['ai_score']})")
print("\n📉 看跌信号:")
for article in bearish:
print(f" • {article['title']} (评分:{article['ai_score']})")
undefinedExchange Listing Tracker
交易所上线公告追踪器
python
undefinedpython
undefinedGet all recent listings
获取所有近期上线公告
listings = get_news_by_engine(engine_type="listing", limit=50)
listings = get_news_by_engine(engine_type="listing", limit=50)
Group by exchange
按交易所分组
by_exchange = {}
for article in listings:
exchange = article['news_type']
if exchange not in by_exchange:
by_exchange[exchange] = []
by_exchange[exchange].append(article)
by_exchange = {}
for article in listings:
exchange = article['news_type']
if exchange not in by_exchange:
by_exchange[exchange] = []
by_exchange[exchange].append(article)
Display
展示结果
for exchange, articles in by_exchange.items():
print(f"\n{exchange} ({len(articles)} listings):")
for a in articles:
coins = ', '.join(a.get('coins', []))
print(f" • {coins}: {a['title']}")
undefinedfor exchange, articles in by_exchange.items():
print(f"\n{exchange}({len(articles)}条上线公告):")
for a in articles:
coins = ', '.join(a.get('coins', []))
print(f" • {coins}:{a['title']}")
undefinedSmart Money Tracker
聪明资金追踪器
python
undefinedpython
undefinedCombine prediction signals with on-chain data
结合预测信号和链上数据
predictions = get_news_by_engine(engine_type="prediction", limit=30)
onchain = get_news_by_engine(engine_type="onchain", limit=30)
predictions = get_news_by_engine(engine_type="prediction", limit=30)
onchain = get_news_by_engine(engine_type="onchain", limit=30)
Filter for high-confidence smart money signals
筛选高置信度聪明资金信号
smart_money = [
p for p in predictions
if p['news_type'] == 'SMART_MONEY_TRADE' and p['ai_score'] >= 80
]
smart_money = [
p for p in predictions
if p['news_type'] == 'SMART_MONEY_TRADE' and p['ai_score'] >= 80
]
Cross-reference with whale activity
交叉引用大额交易活动
whale_coins = set()
for article in onchain:
whale_coins.update(article.get('coins', []))
whale_coins = set()
for article in onchain:
whale_coins.update(article.get('coins', []))
Find overlap
寻找重叠项
for signal in smart_money:
signal_coins = signal.get('coins', [])
overlap = set(signal_coins) & whale_coins
if overlap:
print(f"⚡ Smart money + whale activity: {', '.join(overlap)}")
print(f" {signal['summary_en']}")
undefinedfor signal in smart_money:
signal_coins = signal.get('coins', [])
overlap = set(signal_coins) & whale_coins
if overlap:
print(f"⚡ 聪明资金+大额交易活动:{', '.join(overlap)}")
print(f" {signal['summary_en']}")
undefined