binance_ai_report
Analyze cryptocurrency investments by generating AI-powered reports from Binance data to inform trading decisions.
Instructions
获取币安对加密货币的AI分析报告,此工具对分析加密货币非常有用,推荐使用
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | No | 加密货币币种,格式: BTC 或 ETH | BTC |
Implementation Reference
- mcp_aktools/__init__.py:465-506 (handler)The handler function for the 'binance_ai_report' tool, decorated with @mcp.tool for registration and schema definition via Pydantic Field. It fetches an AI analysis report from the Binance API for a given cryptocurrency symbol.@mcp.tool( title="获取加密货币分析报告", description="获取币安对加密货币的AI分析报告,此工具对分析加密货币非常有用,推荐使用", ) def binance_ai_report( symbol: str = Field("BTC", description="加密货币币种,格式: BTC 或 ETH"), ): res = requests.post( f"{BINANCE_BASE_URL}/bapi/bigdata/v3/friendly/bigdata/search/ai-report/report", json={ 'lang': 'zh-CN', 'token': symbol, 'symbol': f'{symbol}USDT', 'product': 'web-spot', 'timestamp': int(time.time() * 1000), 'translateToken': None, }, headers={ 'User-Agent': USER_AGENT, 'Referer': f'https://www.binance.com/zh-CN/trade/{symbol}_USDT?type=spot', 'lang': 'zh-CN', }, timeout=20, ) try: resp = res.json() or {} except Exception: try: resp = json.loads(res.text.strip()) or {} except Exception: return res.text data = resp.get('data') or {} report = data.get('report') or {} translated = report.get('translated') or report.get('original') or {} modules = translated.get('modules') or [] txts = [] for module in modules: if tit := module.get('overview'): txts.append(tit) for point in module.get('points', []): txts.append(point.get('content', '')) return '\n'.join(txts)