{
  "name": "Binance spot market quant AI agent | GPT-4o + Telegram  (Main interface)",
  "nodes": [
    {
      "id": "6c6238ec-ba3d-4c59-a612-c3b4e9ae8b73",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -440,
        620
      ]
    },
    {
      "id": "b8b90061-9d5e-4e48-a0b0-bb6bdb193771",
      "name": "Binance Spot Market Quant AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -80,
        160
      ]
    },
    {
      "id": "13965042-ad03-4108-88b3-250955bdbd28",
      "name": "Telegram Trigger",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -1000,
        160
      ]
    },
    {
      "id": "3f98e10f-fe7e-4c87-9e4f-4b6d8bfb805b",
      "name": "User Authentication (Replace Telegram ID)",
      "type": "n8n-nodes-base.code",
      "position": [
        -680,
        160
      ]
    },
    {
      "id": "ef715512-2d57-447e-969d-c173a823775b",
      "name": "Adds \"SessionId\"",
      "type": "n8n-nodes-base.set",
      "position": [
        -400,
        160
      ]
    },
    {
      "id": "876e3ec9-3453-4db9-928a-6163c1c6702b",
      "name": "Telegram",
      "type": "n8n-nodes-base.telegram",
      "position": [
        900,
        160
      ]
    },
    {
      "id": "70c70549-1c58-478d-a39f-5bccc7b76b04",
      "name": "Splits message is more than 4000 characters",
      "type": "n8n-nodes-base.code",
      "position": [
        480,
        160
      ]
    },
    {
      "id": "85e0b819-f722-43ae-93b7-5317ff877804",
      "name": "News and Sentiment Analysis Request",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        120,
        600
      ]
    },
    {
      "id": "27c27a35-fe83-4c4b-b9b1-90f2e1de8602",
      "name": "Binance SM Financial Analyst Tool",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        380,
        580
      ]
    },
    {
      "id": "78c6847a-8449-45dd-8aa6-1ce69e3d4e67",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        -160,
        620
      ]
    },
    {
      "id": "7ded5880-cf83-483c-84b9-dfce5e11d616",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1060,
        -100
      ],
      "parameters": {
        "width": null,
        "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."
      }
    },
    {
      "id": "dfb57705-77b8-4c88-a6b0-aa8128b08400",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -740,
        -100
      ],
      "parameters": {
        "width": null,
        "height": 460,
        "content": "## Validate User Access\nNode: User **Authentication\nChecks incoming Telegram ID** against the approved user list."
      }
    },
    {
      "id": "37372f5a-db8c-4335-81a4-de437aff4782",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -460,
        -100
      ],
      "parameters": {
        "width": null,
        "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."
      }
    },
    {
      "id": "952adc52-49a1-49c8-8bd5-d31c8277af83",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -180,
        -220
      ],
      "parameters": {
        "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 + pri"
      }
    },
    {
      "id": "a6475e05-c83a-4dce-acd1-19294077912f",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        400,
        -100
      ],
      "parameters": {
        "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."
      }
    },
    {
      "id": "413aff1b-43a3-4f81-b82d-eab2f18aed61",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        840,
        -100
      ],
      "parameters": {
        "width": null,
        "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."
      }
    },
    {
      "id": "8b7687eb-9c5f-4745-8700-cc337a1a2505",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -520,
        520
      ],
      "parameters": {
        "width": null,
        "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"
      }
    },
    {
      "id": "fc0fa082-96d7-4dda-8273-0aa44f6b1f97",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        40,
        520
      ],
      "parameters": {
        "width": null,
        "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"
      }
    },
    {
      "id": "becbf326-b8d3-482e-b9c5-7a1bed58b112",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        300,
        520
      ],
      "parameters": {
        "width": null,
        "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, BB"
      }
    },
    {
      "id": "46cb7225-7ba9-4270-988e-74e4a30403fc",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -240,
        520
      ],
      "parameters": {
        "width": null,
        "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 a"
      }
    },
    {
      "id": "238ff914-0c43-4cdf-9506-61e67306300f",
      "name": "Sticky Note10",
      "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 i"
      }
    }
  ],
  "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
          }
        ]
      ]
    }
  }
}