{
  "id": "INYtgCEbxdGBDivU",
  "name": "Binance SM 15min Indicators Tool",
  "tags": [],
  "nodes": [
    {
      "id": "b6621b6c-c014-4028-b274-9df8279a830f",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -280,
        140
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini",
          "cachedResultName": "gpt-4.1-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "694b7706-e7c4-4441-8e76-24fadacfed96",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        0,
        140
      ],
      "parameters": {},
      "typeVersion": 1.3
    },
    {
      "id": "03bb428a-e79c-4f0c-aa33-8db7d9b96418",
      "name": "When Executed by Another Workflow",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        -460,
        -180
      ],
      "parameters": {
        "workflowInputs": {
          "values": [
            {
              "name": "message"
            },
            {
              "name": "sessionId"
            }
          ]
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "9ee0b29e-18bc-4048-a318-8727fbdc9c06",
      "name": "Binance SM 15min Indicators Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -60,
        -180
      ],
      "parameters": {
        "text": "={{ $json.message }}",
        "options": {
          "systemMessage": "You are a short-term technical analysis agent that calculates **15-minute interval trading signals** for any Binance Spot Market trading pair. You are used by higher-level agents to assess intraday volatility, trend momentum, and entry/exit opportunities.\n\n---\n\n### \ud83d\udd10 Access Control\n\n* Expect to be triggered by another workflow.\n* Maintain `sessionId` context for user-specific response handling.\n\n---\n\n### \ud83d\udce5 Expected Input Format\n\n```json\n{\n  \"message\": \"BTCUSDT\",\n  \"sessionId\": \"123456789\"\n}\n```\n\n* `message`: Valid Binance symbol (e.g., BTCUSDT)\n* `sessionId`: Telegram user or workflow context\n\n---\n\n### \ud83d\udd27 Tools Used\n\nYou POST the trading pair to this endpoint:\n\n```\nhttps://treasurium.app.n8n.cloud/webhook/15m-indicators\n```\n\n**Payload format:**\n\n```json\n{\n  \"symbol\": \"BTCUSDT\"\n}\n```\n\n---\n\n### \ud83d\udcca Behavior\n\n* Request **15-minute kline data** with a limit sufficient for indicator calculations (typically `limit: 100`).\n* Calculate key indicators including:\n\n  * RSI\n  * MACD\n  * Bollinger Bands\n  * SMA/EMA\n  * ADX\n* Return results in Telegram-optimized format (e.g. Markdown with clear sections).\n\n---\n\n### \ud83e\udde0 Use Cases\n\n* Detect momentum shifts in short-term windows.\n* Generate alerts for potential scalping or breakout signals.\n* Contribute insights to larger multi-timeframe analysis workflows (e.g., Quant AI Agent, Financial Analyst Tool).\n\n"
        },
        "promptType": "define"
      },
      "typeVersion": 1.9
    },
    {
      "id": "2678122f-90fc-42ba-ae63-724006266c38",
      "name": "HTTP Request 15m Indicators Tool",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        260,
        120
      ],
      "parameters": {
        "url": "https://treasurium.app.n8n.cloud/webhook/15m-indicators",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "symbol",
              "value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('parameters0_Value', ``, 'string') }}"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "3427df64-fdcf-4b8a-a817-dc1385cdec50",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -540,
        -460
      ],
      "parameters": {
        "color": 4,
        "height": 500,
        "content": "## Workflow Trigger\nNode: When Executed by Another Workflow\nThis workflow does not start on its own \u2014 it is always triggered by:\n\n**Binance SM Financial Analyst Tool**\n\n**Binance Quant AI Agent**"
      },
      "typeVersion": 1
    },
    {
      "id": "54c97888-ae8a-4098-b6ec-c6ced7ac340a",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -160,
        -620
      ],
      "parameters": {
        "color": 5,
        "width": 500,
        "height": 620,
        "content": "## Agent Reasoning (GPT)\nNode: **Binance SM 15min Indicators Agent**\nUses GPT-4o-mini (gpt-4.1-mini) to:\n\n**Interpret raw indicator output**\n\nDetect signal patterns like:\n\n**Overbought RSI**\n\n**MACD crossovers**\n\n**Bollinger Band squeezes**\n\n**EMA/SMA relationships**\n\n**Strong/weak ADX readings**\n\n**Generate structured summaries**\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "fd29107f-4b0a-496e-a5d6-9054573fd917",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -340,
        80
      ],
      "parameters": {
        "width": 220,
        "height": 520,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## OpenAI Model\nNode: OpenAI Chat Model\nModel: **gpt-4.1-mini**\nProvides language interpretation of the numeric indicators.\n\nExample:\n\n**\u2022 RSI: 71 \u2192 Overbought  \n\u2022 MACD: Cross Up  \n\u2022 BB: Touching Upper Band  \n\u2022 ADX: 32 \u2192 Strong Uptrend**\n"
      },
      "typeVersion": 1
    },
    {
      "id": "06b488f6-5af2-4906-ab58-ff720ea4d1e2",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -80,
        80
      ],
      "parameters": {
        "color": 3,
        "width": 220,
        "height": 520,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## Memory System\nNode: Simple Memory\nStores **session context (sessionId, symbol, last query).**\nUsed for:\n\n**Persistent multi-turn interactions\n\nCross-agent symbol consistency**"
      },
      "typeVersion": 1
    },
    {
      "id": "4b2198d4-e337-48ce-b857-edd1a8dbe1a2",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        200,
        80
      ],
      "parameters": {
        "color": 6,
        "width": 220,
        "height": 960,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## Indicator Tool Request\nNode: HTTP Request 15m Indicators Tool\n\n**Makes a POST request to:**\n\nhttps://treasurium.app.n8n.cloud/webhook/15m-indicators\n\nPayload:\n\njson\n{ \"symbol\": \"BTCUSDT\" }\n\nThis **backend endpoint** is responsible for:\n\n**Fetching the last 100 15m candles\n\nCalculating:\n\nRSI (14)\n\nMACD (12/26/9)\n\nBollinger Bands (20/2)\n\nSMA + EMA (20)\n\nADX (14)**\n\nThe result is returned as cleaned JSON with **indicator values and signal tags.**"
      },
      "typeVersion": 1
    },
    {
      "id": "56983511-8084-4fc1-be59-cc223a062b1e",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        620,
        -1420
      ],
      "parameters": {
        "width": 1360,
        "height": 2860,
        "content": "# \ud83e\uddea Binance SM 15min Indicators Tool \u2013 Documentation\n\nA specialized short-term technical analysis module that calculates and interprets trading indicators using **15-minute candlestick data** for any Binance Spot Market symbol.\n\n---\n\n## \ud83c\udfaf Purpose\n\nThis workflow is used to:\n\n* Extract recent 15m kline data from Binance\n* Calculate core technical indicators: RSI, MACD, BBANDS, ADX, SMA/EMA\n* Interpret signals using GPT (e.g., \u201cOverbought RSI\u201d, \u201cMACD crossover up\u201d)\n* Return results formatted for Telegram or internal agent use\n\nIt is designed to help the Quant AI Agent and Financial Analyst Tool understand intraday volatility and momentum.\n\n---\n\n## \u2699\ufe0f Key Workflow Structure\n\n| Node Name                           | Role                                                             |\n| ----------------------------------- | ---------------------------------------------------------------- |\n| `When Executed by Another Workflow` | Trigger \u2014 activated by Financial Analyst or Quant AI Agent       |\n| `Binance SM 15min Indicators Agent` | Main agent that receives input and manages tool orchestration    |\n| `HTTP Request 15m Indicators Tool`  | Calls webhook that calculates indicators using raw kline data    |\n| `Simple Memory`                     | Tracks session context (Telegram ID, symbol)                     |\n| `OpenAI Chat Model`                 | Interprets raw numeric data into human-readable Telegram message |\n\n---\n\n## \ud83d\udce5 Expected Input Format\n\nThis tool receives structured inputs:\n\n```json\n{\n  \"message\": \"BTCUSDT\",\n  \"sessionId\": \"123456789\"\n}\n```\n\n* `message`: Must be a valid Binance trading pair (e.g., ETHUSDT)\n* `sessionId`: Used for maintaining conversational context\n\n---\n\n## \ud83d\udd27 Indicator Calculation Logic\n\nThe actual computation is done by the **15m Indicator Backend Tool** via HTTP POST:\n\n**Endpoint:**\n\n```\nhttps://treasurium.app.n8n.cloud/webhook/15m-indicators\n```\n\n**Payload:**\n\n```json\n{\n  \"symbol\": \"BTCUSDT\"\n}\n```\n\n**Backend calculates:**\n\n* RSI (14)\n* MACD (12,26,9)\n* Bollinger Bands (20, 2)\n* Simple Moving Average (SMA 20)\n* Exponential Moving Average (EMA 20)\n* ADX (14)\n\nThe response includes the latest values, directional bias, and status tags like `\"Overbought\"`, `\"Cross Up\"`, etc.\n\n---\n\n## \ud83e\udde0 GPT Analysis Layer\n\nThe raw values are sent to the **gpt-4.1-mini** model, which:\n\n* Translates them into structured insights\n* Highlights key signals like:\n\n  * RSI zones (Overbought/Oversold)\n  * BB squeeze or expansion\n  * MACD crossover points\n  * ADX trend strength\n\n**Sample Output:**\n\n```\n\ud83d\udcc9 15m Technical Overview for BTCUSDT\n\n\u2022 RSI: 72 \u2192 Overbought  \n\u2022 MACD: Cross Up (Bullish)  \n\u2022 BB: Expanding, Price near Upper Band  \n\u2022 EMA > SMA \u2192 Bullish Momentum  \n\u2022 ADX: 34 \u2192 Strong Trend\n```\n\n---\n\n## \ud83e\udde9 Use Case Scenarios\n\n| Scenario                              | Outcome                                                           |\n| ------------------------------------- | ----------------------------------------------------------------- |\n| User asks for \u201cshort-term DOGE trend\u201d | Tool returns 15m signals showing volatility or setup pattern      |\n| Part of daily report on BTC           | Confirms intraday strength or exhaustion with momentum indicators |\n| Used by Financial Analyst Tool        | Feeds into broader analysis (1h/4h/1d + price structure)          |\n\n---\n\n## \ud83d\udce6 Deployment Instructions\n\n1. **Import** this workflow into your n8n instance\n2. **Ensure webhook endpoint** (`/15m-indicators`) is active and reachable\n3. **Test trigger** using `Execute Workflow` from Quant AI or Financial Analyst tool\n4. **Connect OpenAI API key** to enable GPT interpretation\n5. Confirm all input symbols are valid Binance pairs\n\n---\n\n## \ud83d\udd10 Licensing & Support\n\n\ud83d\udd17 **Don Jayamaha \u2013 LinkedIn**\n[http://linkedin.com/in/donjayamahajr](http://linkedin.com/in/donjayamahajr)\n\n\u00a9 2025 Treasurium Capital Limited Company. All rights reserved.\nUnauthorized reuse, resale, or redistribution of this tool or its design is strictly prohibited. This system and its supporting architecture are protected under U.S. and international copyright law.\n\n"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "f7a27402-e9cd-4c5c-ad16-c3b8edf5a393",
  "connections": {
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "Binance SM 15min Indicators Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Binance SM 15min Indicators Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request 15m Indicators Tool": {
      "ai_tool": [
        [
          {
            "node": "Binance SM 15min Indicators Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "When Executed by Another Workflow": {
      "main": [
        [
          {
            "node": "Binance SM 15min Indicators Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}