Agent quantitatif AI pour le marché au comptant Binance
Ceci est unFinance, AIworkflow d'automatisation du domainecontenant 21 nœuds.Utilise principalement des nœuds comme Set, Code, Telegram, Agent, HttpRequestTool, combinant la technologie d'intelligence artificielle pour une automatisation intelligente. Agent quantitatif AI pour le marché spot de Binance | GPT-4o + Telegram (interface principale)
- •Token Bot Telegram
- •Peut nécessiter les informations d'identification d'authentification de l'API cible
- •Clé API OpenAI
Nœuds utilisés (21)
Catégorie
{
"id": "82r122lbmQPWishF",
"meta": {
"instanceId": "a5283507e1917a33cc3ae615b2e7d5ad2c1e50955e6f831272ddd5ab816f3fb6",
"templateCredsSetupCompleted": true
},
"name": "Binance Spot Market Quant AI Agent",
"tags": [],
"nodes": [
{
"id": "6c6238ec-ba3d-4c59-a612-c3b4e9ae8b73",
"name": "OpenAI Modèle de Chat",
"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": "Agent IA Quantitatif pour le Marché Spot Binance",
"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 Déclencheur",
"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": "Authentification Utilisateur (Remplacer l'ID Telegram)",
"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": "Ajoute \"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": "Divise si le message dépasse 4000 caractères",
"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": "Requête d'Analyse de l'Actualité et du Sentiment",
"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": "Outil d'Analyste Financier - Marché Spot Binance",
"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": "Mémoire Simple",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
-160,
620
],
"parameters": {},
"typeVersion": 1.3
},
{
"id": "7ded5880-cf83-483c-84b9-dfce5e11d616",
"name": "Note Adhésive",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1060,
-100
],
"parameters": {
"color": 4,
"height": 460,
"content": "## Trigger Incoming Telegram Command\nNode: Telegram Trigger\n**Listens for new Telegram messages** from users.\nTriggers the full agent process and passes raw user input downstream."
},
"typeVersion": 1
},
{
"id": "dfb57705-77b8-4c88-a6b0-aa8128b08400",
"name": "Note Adhésive1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-740,
-100
],
"parameters": {
"color": 2,
"height": 460,
"content": "## Validate User Access\nNode: User **Authentication\nChecks incoming Telegram ID** against the approved user list."
},
"typeVersion": 1
},
{
"id": "37372f5a-db8c-4335-81a4-de437aff4782",
"name": "Note Adhésive2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-460,
-100
],
"parameters": {
"color": 5,
"height": 460,
"content": "## Generate Session Metadata\nNode: Add S**essionId\nCreates a sessionId using the Telegram chat_id**.\nThis is passed into all downstream tools for memory and workflow routing."
},
"typeVersion": 1
},
{
"id": "952adc52-49a1-49c8-8bd5-d31c8277af83",
"name": "Note Adhésive3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-180,
-220
],
"parameters": {
"color": 7,
"width": 480,
"height": 580,
"content": "## Main AI Agent: Report Generator\nNode: Binance Spot Market Quant AI Agent\nThis is the **core orchestrator**. It uses OpenAI to reason over:\n\n**Multi-timeframe indicator outputs**\n\n**Order book + price data**\n\n**Sentiment and news**\n\nIt calls both tools in parallel:\n\n**Binance Financial Market Analyst Tool**\n\n**Binance News & Sentiment Analyst Tool**\n\nThen it synthesizes a final trading report."
},
"typeVersion": 1
},
{
"id": "a6475e05-c83a-4dce-acd1-19294077912f",
"name": "Note Adhésive4",
"type": "n8n-nodes-base.stickyNote",
"position": [
400,
-100
],
"parameters": {
"color": 5,
"width": 260,
"height": 460,
"content": "## Handle Telegram Message Limits\nNode: Code (split logic)\nChecks if the **GPT output exceeds 4000 characters**.\nIf so, it splits the message into safe chunks and passes them on sequentially."
},
"typeVersion": 1
},
{
"id": "413aff1b-43a3-4f81-b82d-eab2f18aed61",
"name": "Note Adhésive5",
"type": "n8n-nodes-base.stickyNote",
"position": [
840,
-100
],
"parameters": {
"color": 4,
"height": 460,
"content": "## Send Final Report to Telegram\nNode: Telegram sendMessage\nSends **formatted HTML report (or split chunks)** directly to the authenticated user via Telegram bot."
},
"typeVersion": 1
},
{
"id": "8b7687eb-9c5f-4745-8700-cc337a1a2505",
"name": "Note Adhésive6",
"type": "n8n-nodes-base.stickyNote",
"position": [
-520,
520
],
"parameters": {
"height": 540,
"content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## GPT Model for Reasoning\nNode: OpenAI Chat Model\nModel: **gpt-4o-mini**\nUsed to:\n\nInterpret signal values\n\nGenerate structured HTML\n\n**Recommend spot and leverage trades**\n\n"
},
"typeVersion": 1
},
{
"id": "fc0fa082-96d7-4dda-8273-0aa44f6b1f97",
"name": "Note Adhésive7",
"type": "n8n-nodes-base.stickyNote",
"position": [
40,
520
],
"parameters": {
"color": 6,
"height": 660,
"content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## Binance News & Sentiment Analyst Tool\nNode: ToolWebhook\nSends the symbol to:\n\nPOST https://treasurium.app.n8n.cloud/webhook/newsanalyst\nReturns:\n\n**📈 Sentiment (Bullish / Neutral / Bearish)**\n\n**📰 3–5 crypto headlines**\n\n**🧠 Summary paragraph (1–3 lines)**"
},
"typeVersion": 1
},
{
"id": "becbf326-b8d3-482e-b9c5-7a1bed58b112",
"name": "Note Adhésive8",
"type": "n8n-nodes-base.stickyNote",
"position": [
300,
520
],
"parameters": {
"color": 6,
"height": 660,
"content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## Binance Financial Market Analyst Tool\nNode: ToolWorkflow\nCalls all connected indicator agents:\n\n**15m, 1h, 4h, 1d**\n\nPrice/Orderbook/Klines agent\n\n**Each indicator (RSI, MACD, BBANDS, SMA, EMA, ADX)** is returned per timeframe, plus order book depth and candle snapshots."
},
"typeVersion": 1
},
{
"id": "46cb7225-7ba9-4270-988e-74e4a30403fc",
"name": "Note Adhésive9",
"type": "n8n-nodes-base.stickyNote",
"position": [
-240,
520
],
"parameters": {
"color": 3,
"height": 540,
"content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## Short-Term Memory Module\nNode: **Simple Memory\nStores the sessionId**, symbol, and other state data.\nUseful for:\n\nMulti-turn Telegram interactions\n\nTracking indicator agreement across timeframes\n\n"
},
"typeVersion": 1
},
{
"id": "238ff914-0c43-4cdf-9506-61e67306300f",
"name": "Note Adhésive10",
"type": "n8n-nodes-base.stickyNote",
"position": [
1400,
-1340
],
"parameters": {
"width": 1780,
"height": 2540,
"content": "# 🧠 Binance Spot Market Quant AI Agent – Full System Documentation\n\nA professional-grade AI automation system for **spot market trading insights** on Binance. It analyzes **multi-timeframe technical indicators**, **live price/order data**, and **crypto sentiment**, then delivers fully formatted **Telegram-style trading reports**.\n\n---\n\n## 🧩 Included Workflows\n\n> You must install and activate **all of the following workflows** for the system to function correctly:\n\n| ✅ Workflow Name | 📌 Function Description |\n| -------------------------------------------------- | -------------------------------------------------------------------------------- |\n| Binance Spot Market Quant AI Agent | Final AI orchestrator. Parses user prompt and generates Telegram-ready reports. |\n| Binance SM Financial Analyst Tool | Calls indicator tools and price/order data tools. Synthesizes structured inputs. |\n| Binance SM News and Sentiment Analyst Webhook Tool | Analyzes crypto sentiment, gives summary and headlines via POST webhook. |\n| Binance SM Price/24hrStats/OrderBook/Kline Tool | Pulls price, order book, 24h stats, and OHLCV klines for 15m–1d. |\n| Binance SM 15min Indicators Tool | Calculates 15m RSI, MACD, BBANDS, ADX, SMA/EMA from Binance kline data. |\n| Binance SM 1hour Indicators Tool | Same as above but for 1h timeframe. |\n| Binance SM 4hour Indicators Tool | Same as above but for 4h timeframe. |\n| Binance SM 1day Indicators Tool | Same as above but for 1d timeframe. |\n| Binance SM Indicators Webhook Tool | Technical backend. Handles all webhook logic for each timeframe tool. |\n\n---\n\n## ⚙️ Installation Instructions\n\n### Step 1: Import Workflows\n\n* Open your **n8n Editor UI**\n* Import each workflow JSON file one by one\n* Activate them or ensure they're called via `Execute Workflow`\n\n### Step 2: Set Credentials\n\n* **OpenAI API Credential**: Add your OpenAI key for GPT-4o or GPT-4.1\n* **Binance Price Data**: No auth needed (public endpoint)\n\n### Step 3: Configure Webhook Endpoints\n\n* Deploy **Binance SM Indicators Webhook Tool**\n* Ensure the following routes are reachable:\n\n * `/webhook/15m`\n * `/webhook/1h`\n * `/webhook/4h`\n * `/webhook/1d`\n\n### Step 4: Telegram Integration\n\n* Add your Telegram Bot to n8n with correct API token\n* Update the **Telegram ID check node** with your own ID\n* Messages from your ID will trigger the agent\n\n### Step 5: Final Agent Execution\n\n* Trigger `Binance Spot Market Quant AI Agent` manually or from Telegram\n* The agent:\n\n * Calls all connected tools with symbol and sessionId\n * Waits for full indicator + sentiment response\n * Returns a formatted multi-part trading report\n\n---\n\n## 🖥️ System Workflow Overview\n\n```\n[Telegram Trigger]\n→ [Session Memory + ID Check]\n→ [Quant Agent]\n→ [Financial Analyst Tool + Sentiment Tool]\n→ [All Indicators (15m, 1h, 4h, 1d)]\n→ [Price/Kline/OrderBook Tool]\n→ [News and Sentiment Webhook]\n→ [Signal Reasoning + Report Formatting]\n→ [Final Telegram HTML Message]\n```\n\n---\n\n## 📬 Telegram Output Style\n\n```html\n<b>BTCUSDT Market Report</b>\n\n<b>Spot Strategy</b>\n• Action: Buy\n• Entry: $63,800 | SL: $61,200 | TP: $66,500\n• Reason:\n - MACD Crossover (1h)\n - RSI Rebound from Oversold (15m)\n - Sentiment: Bullish\n\n<b>Leverage Strategy</b>\n• Position: Long 3x\n• Entry: $63,800\n• SL/TP zones same as above\n\n<b>News Sentiment:</b> Slightly Bullish\n• \"Bitcoin rallies as ETF inflows surge\" – CoinDesk\n• \"Whales accumulate BTC at key support\" – NewsBTC\n```\n\n---\n\n## 🚀 Support & Licensing\n\n🔗 **Don Jayamaha – LinkedIn**\n[linkedin.com/in/donjayamahajr](http://linkedin.com/in/donjayamahajr)\n\n© 2025 Treasurium Capital Limited Company. All rights reserved.\nThis system architecture, prompts, and workflow structure are proprietary and protected by **U.S. copyright law**. Reuse or resale prohibited without license.\n"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "bb69da16-db3d-4804-ad9d-a3d971f8fa36",
"connections": {
"78c6847a-8449-45dd-8aa6-1ce69e3d4e67": {
"ai_memory": [
[
{
"node": "b8b90061-9d5e-4e48-a0b0-bb6bdb193771",
"type": "ai_memory",
"index": 0
}
]
]
},
"ef715512-2d57-447e-969d-c173a823775b": {
"main": [
[
{
"node": "b8b90061-9d5e-4e48-a0b0-bb6bdb193771",
"type": "main",
"index": 0
}
]
]
},
"13965042-ad03-4108-88b3-250955bdbd28": {
"main": [
[
{
"node": "3f98e10f-fe7e-4c87-9e4f-4b6d8bfb805b",
"type": "main",
"index": 0
}
]
]
},
"6c6238ec-ba3d-4c59-a612-c3b4e9ae8b73": {
"ai_languageModel": [
[
{
"node": "b8b90061-9d5e-4e48-a0b0-bb6bdb193771",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"27c27a35-fe83-4c4b-b9b1-90f2e1de8602": {
"ai_tool": [
[
{
"node": "b8b90061-9d5e-4e48-a0b0-bb6bdb193771",
"type": "ai_tool",
"index": 0
}
]
]
},
"b8b90061-9d5e-4e48-a0b0-bb6bdb193771": {
"main": [
[
{
"node": "70c70549-1c58-478d-a39f-5bccc7b76b04",
"type": "main",
"index": 0
}
]
]
},
"85e0b819-f722-43ae-93b7-5317ff877804": {
"ai_tool": [
[
{
"node": "b8b90061-9d5e-4e48-a0b0-bb6bdb193771",
"type": "ai_tool",
"index": 0
}
]
]
},
"3f98e10f-fe7e-4c87-9e4f-4b6d8bfb805b": {
"main": [
[
{
"node": "ef715512-2d57-447e-969d-c173a823775b",
"type": "main",
"index": 0
}
]
]
},
"70c70549-1c58-478d-a39f-5bccc7b76b04": {
"main": [
[
{
"node": "876e3ec9-3453-4db9-928a-6163c1c6702b",
"type": "main",
"index": 0
}
]
]
}
}
}Comment utiliser ce workflow ?
Copiez le code de configuration JSON ci-dessus, créez un nouveau workflow dans votre instance n8n et sélectionnez "Importer depuis le JSON", collez la configuration et modifiez les paramètres d'authentification selon vos besoins.
Dans quelles scénarios ce workflow est-il adapté ?
Avancé - Finance, Intelligence Artificielle
Est-ce payant ?
Ce workflow est entièrement gratuit et peut être utilisé directement. Veuillez noter que les services tiers utilisés dans le workflow (comme l'API OpenAI) peuvent nécessiter un paiement de votre part.
Workflows recommandés
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.
Partager ce workflow