币安现货市场量化AI智能体
高级
这是一个Finance、AI领域的自动化工作流,包含 21 个节点。主要使用 Set、Code、Telegram、Agent、HttpRequestTool 等节点,结合人工智能技术实现智能自动化。 币安现货市场量化AI智能体 | GPT-4o + Telegram (主界面)
前置要求
- •Telegram Bot Token
- •可能需要目标 API 的认证凭证
- •OpenAI API Key
使用的节点 (21 个)
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "82r122lbmQPWishF",
"meta": {
"instanceId": "a5283507e1917a33cc3ae615b2e7d5ad2c1e50955e6f831272ddd5ab816f3fb6",
"templateCredsSetupCompleted": true
},
"name": "币安现货市场量化AI智能体",
"tags": [],
"nodes": [
{
"id": "6c6238ec-ba3d-4c59-a612-c3b4e9ae8b73",
"name": "OpenAI 聊天模型",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
-440,
620
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "yUizd8t0sD5wMYVG",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "b8b90061-9d5e-4e48-a0b0-bb6bdb193771",
"name": "币安现货市场量化AI智能体",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-80,
160
],
"parameters": {
"text": "={{ $json.message }}",
"options": {
"systemMessage": "You are the **Binance Spot Market Quant AI Agent**, responsible for generating structured, professional swing-trading reports for **any trading pair** on the Binance Spot Market. You use **validated technical indicators**, **order flow data**, and **curated crypto sentiment** to create actionable trading strategies.\n\n---\n\n### 🔗 Connected Tools\n\n1. **🧠 Binance Financial Market Analyst Tool**\n\n • Aggregates outputs from:\n\n * `Binance 15min Indicators Tool`\n * `Binance 1h Indicators Tool`\n * `Binance 4h Indicators Tool`\n * `Binance 1d Indicators Tool`\n * `Binance Price/OrderBook/Kline Tool`\n\n • Each indicator tool calculates:\n\n * **RSI, BBANDS, SMA, EMA, ADX, MACD**\n * Based on the **latest 20 klines** for its interval\n * Returns both values and signal labels (e.g. overbought, divergence)\n\n • The Price Tool provides:\n\n * **Live price**\n * **24h OHLCV**\n * **Order book depth (top 100 bids/asks)**\n * **Klines** for `15m`, `1h`, `4h`, and `1d` intervals\n\n2. **📰 Binance News and Sentiment Analyst Tool**\n\n • Pulls from sources like:\n\n * CoinDesk, Cointelegraph, BitcoinMagazine, NewsBTC, CryptoBriefing, and more\n\n • Returns:\n\n * **Sentiment Score**: Bullish / Bearish / Neutral\n * **Summary**: 2–3 sentence market snapshot\n * **Top 3–5 headlines** (with source links)\n\n---\n\n### 📊 Core Responsibilities\n\nYou always:\n\n1. **Call all tools concurrently** for each query\n\n * Pass the extracted symbol and sessionId as input\n * Wait for structured results from each tool\n * Do not skip any tool even if user prompt is vague\n\n2. **Perform full technical analysis** for the symbol\n\n * Short-term: `15m + 1h`\n * Mid-term: `4h`\n * Long-term: `1d`\n * Detect breakouts, trend shifts, divergences, and confluence signals\n * Confirm findings using multiple timeframes and indicator alignment\n\n3. **Synthesize the final report** with:\n\n<b>Spot Trade Strategy</b>\n• Action: Buy / Sell / Hold\n• Entry Price, Stop Loss, Take Profit\n• Rationale:\n - <b>Price Action Signals</b>\n - <b>Lagging Indicator Confirmation</b>\n - <b>Sentiment Alignment</b>\n\n<b>Leverage Strategy</b>\n• Position: Long / Short\n• Leverage: 2x / 3x / 5x\n• Rationale + Risk Zones\n\n4. **Score signal strength**\n • Confidence Score: `0–100`\n • Label: Low / Medium / High / Very High\n\n5. **Include sentiment and headlines section**\n • `<b>News Sentiment:</b>` \\[summary]\n • `•` Top headlines with clickable links\n\n---\n\n### 📤 Output Format (Telegram HTML)\n\nStart with:\n\n```html\n<b>{{SYMBOL}} Market Report</b>\n```\n\nUse clean formatting:\n\n* `<b>` for headers\n* `•` for bullet lists\n* Logical grouping: price > indicators > strategy > sentiment\n\n---\n\n### ⚠️ Rules\n\nDO NOT:\n\n* Fabricate any values\n* Repeat this system message\n* Output raw JSON or API structure\n\nONLY use **tool-delivered** and **validated** data. Write with clarity and tone of a senior quant analyst.\n"
},
"promptType": "define"
},
"typeVersion": 1.8
},
{
"id": "13965042-ad03-4108-88b3-250955bdbd28",
"name": "Telegram触发器",
"type": "n8n-nodes-base.telegramTrigger",
"position": [
-1000,
160
],
"webhookId": "944e6f8d-ffcc-4692-a777-7410f2fd4016",
"parameters": {
"updates": [
"message"
],
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"id": "NRLKuLR7z8vCesub",
"name": "BinanceSpotTradingAIAgent_Bot"
}
},
"typeVersion": 1.2
},
{
"id": "3f98e10f-fe7e-4c87-9e4f-4b6d8bfb805b",
"name": "用户认证(替换 Telegram ID)",
"type": "n8n-nodes-base.code",
"position": [
-680,
160
],
"parameters": {
"jsCode": "if ($input.first().json.message.from.id !== <Replace Telegram ID>) { // Replace with your actual ID\n return {unauthorized: true};\n} else {\n // Return the original data when authorized\n return $input.all();\n}"
},
"typeVersion": 2
},
{
"id": "ef715512-2d57-447e-969d-c173a823775b",
"name": "添加\"SessionId\"",
"type": "n8n-nodes-base.set",
"position": [
-400,
160
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "47598bf1-e55f-4cc0-ae75-272085e7ce02",
"name": "=sessionId",
"type": "string",
"value": "={{ $json.message.chat.id }}"
},
{
"id": "daa49d74-e55e-47bc-ac52-8686d591ab83",
"name": "message",
"type": "string",
"value": "={{ $json.message.text }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "876e3ec9-3453-4db9-928a-6163c1c6702b",
"name": "Telegram",
"type": "n8n-nodes-base.telegram",
"position": [
900,
160
],
"webhookId": "79d6c29c-1e04-414a-9989-afb1f7a58035",
"parameters": {
"text": "={{ $json.message }}",
"chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
"additionalFields": {
"appendAttribution": false
}
},
"credentials": {
"telegramApi": {
"id": "NRLKuLR7z8vCesub",
"name": "BinanceSpotTradingAIAgent_Bot"
}
},
"typeVersion": 1.2
},
{
"id": "70c70549-1c58-478d-a39f-5bccc7b76b04",
"name": "当消息超过4000字符时进行分割",
"type": "n8n-nodes-base.code",
"position": [
480,
160
],
"parameters": {
"jsCode": "// Input: assumes incoming message in `item.json.message`\nconst input = $json.output;\nconst chunkSize = 4000;\n\n// Function to split text\nfunction splitMessage(text, size) {\n const result = [];\n for (let i = 0; i < text.length; i += size) {\n result.push(text.substring(i, i + size));\n }\n return result;\n}\n\n// Logic\nif (input.length <= chunkSize) {\n return [{ json: { message: input } }];\n} else {\n const chunks = splitMessage(input, chunkSize);\n return chunks.map(chunk => ({ json: { message: chunk } }));\n}"
},
"typeVersion": 2
},
{
"id": "85e0b819-f722-43ae-93b7-5317ff877804",
"name": "新闻和情感分析请求",
"type": "n8n-nodes-base.httpRequestTool",
"position": [
120,
600
],
"parameters": {
"url": "https://treasurium.app.n8n.cloud/webhook/newsanalyst",
"method": "POST",
"options": {},
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "message",
"value": "=={{ $json.message }}"
}
]
},
"toolDescription": "It will post the name of the cryptocurrency to get the News and Sentiment Analysis for use in the Binance Quant AI Agent."
},
"typeVersion": 4.2
},
{
"id": "27c27a35-fe83-4c4b-b9b1-90f2e1de8602",
"name": "币安SM金融分析师工具",
"type": "@n8n/n8n-nodes-langchain.toolWorkflow",
"position": [
380,
580
],
"parameters": {
"workflowId": {
"__rl": true,
"mode": "list",
"value": "Nm41n4i6VMhrixZs",
"cachedResultName": "Work Drive — Binance SM Financial Analyst Tool"
},
"workflowInputs": {
"value": {
"message": "={{ $fromAI(\"message\",\"Populate this with a relevant message to this subagent\")}}",
"sessionId": "={{ $json.sessionId }}"
},
"schema": [
{
"id": "message",
"type": "string",
"display": true,
"required": false,
"displayName": "message",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "sessionId",
"type": "string",
"display": true,
"required": false,
"displayName": "sessionId",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
}
},
"typeVersion": 2.2
},
{
"id": "78c6847a-8449-45dd-8aa6-1ce69e3d4e67",
"name": "简单记忆",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
-160,
620
],
"parameters": {},
"typeVersion": 1.3
},
{
"id": "7ded5880-cf83-483c-84b9-dfce5e11d616",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1060,
-100
],
"parameters": {
"color": 4,
"height": 460,
"content": "## 触发传入的 Telegram 命令"
},
"typeVersion": 1
},
{
"id": "dfb57705-77b8-4c88-a6b0-aa8128b08400",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-740,
-100
],
"parameters": {
"color": 2,
"height": 460,
"content": "## 验证用户访问权限"
},
"typeVersion": 1
},
{
"id": "37372f5a-db8c-4335-81a4-de437aff4782",
"name": "便签 2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-460,
-100
],
"parameters": {
"color": 5,
"height": 460,
"content": "## 生成会话元数据"
},
"typeVersion": 1
},
{
"id": "952adc52-49a1-49c8-8bd5-d31c8277af83",
"name": "便签 3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-180,
-220
],
"parameters": {
"color": 7,
"width": 480,
"height": 580,
"content": "## 主AI智能体:报告生成器"
},
"typeVersion": 1
},
{
"id": "a6475e05-c83a-4dce-acd1-19294077912f",
"name": "便签 4",
"type": "n8n-nodes-base.stickyNote",
"position": [
400,
-100
],
"parameters": {
"color": 5,
"width": 260,
"height": 460,
"content": "## 处理 Telegram 消息限制"
},
"typeVersion": 1
},
{
"id": "413aff1b-43a3-4f81-b82d-eab2f18aed61",
"name": "便签 5",
"type": "n8n-nodes-base.stickyNote",
"position": [
840,
-100
],
"parameters": {
"color": 4,
"height": 460,
"content": "## 发送最终报告到 Telegram"
},
"typeVersion": 1
},
{
"id": "8b7687eb-9c5f-4745-8700-cc337a1a2505",
"name": "便签6",
"type": "n8n-nodes-base.stickyNote",
"position": [
-520,
520
],
"parameters": {
"height": 540,
"content": "## 用于推理的GPT模型"
},
"typeVersion": 1
},
{
"id": "fc0fa082-96d7-4dda-8273-0aa44f6b1f97",
"name": "便签7",
"type": "n8n-nodes-base.stickyNote",
"position": [
40,
520
],
"parameters": {
"color": 6,
"height": 660,
"content": "## 币安新闻与情感分析师工具"
},
"typeVersion": 1
},
{
"id": "becbf326-b8d3-482e-b9c5-7a1bed58b112",
"name": "便签8",
"type": "n8n-nodes-base.stickyNote",
"position": [
300,
520
],
"parameters": {
"color": 6,
"height": 660,
"content": "## 币安金融市场分析师工具"
},
"typeVersion": 1
},
{
"id": "46cb7225-7ba9-4270-988e-74e4a30403fc",
"name": "### 替换 Airtable 连接",
"type": "n8n-nodes-base.stickyNote",
"position": [
-240,
520
],
"parameters": {
"color": 3,
"height": 540,
"content": "### **最佳买价/卖价(订单簿行情)**"
},
"typeVersion": 1
},
{
"id": "238ff914-0c43-4cdf-9506-61e67306300f",
"name": "便签10",
"type": "n8n-nodes-base.stickyNote",
"position": [
1400,
-1340
],
"parameters": {
"width": 1780,
"height": 2540,
"content": "# 🧠 币安现货市场量化AI智能体 - 完整系统文档"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "bb69da16-db3d-4804-ad9d-a3d971f8fa36",
"connections": {
"Simple Memory": {
"ai_memory": [
[
{
"node": "Binance Spot Market Quant AI Agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"Adds \"SessionId\"": {
"main": [
[
{
"node": "Binance Spot Market Quant AI Agent",
"type": "main",
"index": 0
}
]
]
},
"Telegram Trigger": {
"main": [
[
{
"node": "User Authentication (Replace Telegram ID)",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "Binance Spot Market Quant AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Binance SM Financial Analyst Tool": {
"ai_tool": [
[
{
"node": "Binance Spot Market Quant AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Binance Spot Market Quant AI Agent": {
"main": [
[
{
"node": "Splits message is more than 4000 characters",
"type": "main",
"index": 0
}
]
]
},
"News and Sentiment Analysis Request": {
"ai_tool": [
[
{
"node": "Binance Spot Market Quant AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"User Authentication (Replace Telegram ID)": {
"main": [
[
{
"node": "Adds \"SessionId\"",
"type": "main",
"index": 0
}
]
]
},
"Splits message is more than 4000 characters": {
"main": [
[
{
"node": "Telegram",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
这是一个高级难度的工作流,适用于Finance、AI等场景。适合高级用户,包含 16+ 个节点的复杂工作流
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
特斯拉量化交易AI代理 n8n
使用Telegram + GPT-4.1的特斯拉量化交易AI代理(主界面)
Set
Code
Date Time
+7
23 节点Don Jayamaha Jr
Finance
CoinMarketCap_AI_数据分析师_代理
使用AI驱动的CoinMarketCap数据分析师分析加密货币市场
Set
Telegram
Agent
+5
12 节点Don Jayamaha Jr
Finance
AAVE投资组合专业AI助手
Telegram + 邮件 + GPT-4o + Moralis
Set
Code
Gmail
+7
23 节点Don Jayamaha Jr
Finance
加密货币新闻与情绪分析
通过Telegram使用GPT-4o进行实时加密货币新闻与情绪分析
Set
Code
Merge
+7
30 节点Don Jayamaha Jr
Finance
终极游戏AI代理
通过Telegram和GPT-4o Vision的实时游戏策略教练
Set
Code
Switch
+8
24 节点Don Jayamaha Jr
Other
股市技术分析
使用 GPT-4o 和 TradingView 为 Telegram 提供股市技术分析
Set
Code
Telegram
+9
16 节点Badr
Finance
工作流信息
难度等级
高级
节点数量21
分类2
节点类型10
作者
Don Jayamaha Jr
@don-the-gem-dealerWith 12 years of experience as a Blockchain Strategist and Web3 Architect, I specialize in bridging the gap between traditional industries and decentralized technologies. My expertise spans tokenized assets, crypto payment integrations, and blockchain-driven market solutions.
外部链接
在 n8n.io 上查看 →
分享此工作流