{
  "id": "1P0wZUbdzeVsfStr",
  "name": "Upbit AI Agent v1.02",
  "tags": [],
  "nodes": [
    {
      "id": "65f5a5f3-53ae-4ec5-ba47-f97678991d8a",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -1264,
        736
      ],
      "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": "041e4483-e29f-4ba6-b733-7eac06085aaf",
      "name": "Telegram Trigger",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -1008,
        240
      ],
      "parameters": {
        "updates": [
          "message"
        ],
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "4f3f7bdb-8e94-46be-8e57-2c2931d1b99b",
      "name": "User Authentication (Replace Telegram ID)",
      "type": "n8n-nodes-base.code",
      "position": [
        -688,
        240
      ],
      "parameters": {
        "jsCode": "if ($input.first().json.message.from.id !== <<Replace>>) { // 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": "469fd8a2-b369-493c-87e6-30ad1ecac215",
      "name": "Adds \"SessionId\"",
      "type": "n8n-nodes-base.set",
      "position": [
        -416,
        240
      ],
      "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": "1c8b1d16-6133-4346-8b57-7de7c7728d2c",
      "name": "Telegram",
      "type": "n8n-nodes-base.telegram",
      "position": [
        896,
        240
      ],
      "parameters": {
        "text": "={{ $json.message }}",
        "chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "e802f5c0-2645-479b-bed4-501dedbb416f",
      "name": "Splits message is more than 4000 characters",
      "type": "n8n-nodes-base.code",
      "position": [
        464,
        240
      ],
      "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": "801570b2-0b43-4e18-ac6e-6de6fd469417",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1072,
        -32
      ],
      "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": "9966b776-c71d-4fe3-ba2b-b67197b0d460",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -752,
        -32
      ],
      "parameters": {
        "color": 2,
        "height": 460,
        "content": "## Validate User Access\nNode: User **Authentication\nChecks incoming Telegram ID** against the approved user list."
      },
      "typeVersion": 1
    },
    {
      "id": "31accad8-885b-4670-bd23-2039e154ad30",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -464,
        -32
      ],
      "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": "f526d222-bb30-4201-a090-72d71961f679",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -192,
        -208
      ],
      "parameters": {
        "color": 7,
        "width": 480,
        "height": 644,
        "content": "### \ud83d\udcdd Main Agent Note (sticky, copy-paste)\n\n**Node: Upbit Data Agent**\nCore orchestrator that uses OpenAI only to **format and present** raw Upbit market data.\n\n**Direct HTTP access to Upbit REST** to fetch in parallel:\n\n* **Market list** (`/v1/market/all`)\n* **Tickers (price + 24h stats)** (`/v1/ticker`)\n* **Order book & supported levels** (`/v1/orderbook`, `/v1/orderbook/supported_levels`)\n* **Best bid/ask** (from first `orderbook_units`)\n* **Dynamic candles** (`/v1/candles/{seconds|minutes/{unit}|days|weeks|months|years}`) with auto path from `tf`\n* **Recent trades** (`/v1/trades/ticks`)\n\nOutputs **clean, structured text** (no HTML). If any call fails or a field is unavailable, show `N/A`.\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "8cf34baa-e329-42b5-99a1-dc7526edabaa",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        384,
        -32
      ],
      "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": "ce8ee7ff-5b58-4413-80da-28b191c786f7",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        832,
        -32
      ],
      "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": "6686c779-cdb7-4413-936f-5527190342e6",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1344,
        640
      ],
      "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": "6390def9-a6a1-4aae-a9b6-204075756b3f",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -480,
        512
      ],
      "parameters": {
        "color": 6,
        "height": 980,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n### **Order Book Depth**\n\n**Endpoint:** `GET /v1/orderbook`\n**What it does:** Returns **order book** with bids/asks and total sizes.\n\n**Params:**\n\n* `markets` (STRING, required) \u2014 market code, e.g., `KRW-BTC`.\n\n**Returns:** `orderbook_units` array with `ask_price`, `bid_price`, `ask_size`, `bid_size` (top ~15 levels by default).\n\n**n8n query mapping:**\n\n```txt\nmarkets = $fromAI('parameters0_Value', 'KRW-BTC', 'string')\n```\n\n**Notes:**\n* Upbit does not support arbitrary `limit` \u2014 it returns a fixed number of levels (usually 15).\n* Market codes use hyphen format (e.g., `KRW-BTC`)."
      },
      "typeVersion": 1
    },
    {
      "id": "41691a52-2ca2-4cd9-aba0-97139f8f6e67",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        128,
        512
      ],
      "parameters": {
        "color": 6,
        "height": 932,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n### **Best Bid/Ask (Orderbook Snapshot)**\n\n**Endpoint:** `GET /v1/orderbook`\n**What it does:** Returns the **best bid/ask** and order book depth for the given market.\n\n**Params:**\n* `markets` (STRING, required) \u2014 market code (e.g., `KRW-BTC`, `USDT-ETH`).\n\n**Returns:** Array with objects:\n* `orderbook_units`: [{ \"ask_price\", \"bid_price\", \"ask_size\", \"bid_size\" }, ...]\n* Top unit = **best bid/ask**.\n\n**n8n query mapping:**\n\n```txt\nmarkets = $fromAI('parameters0_Value', 'KRW-BTC', 'string')\n```\n\n**Notes:**\n* Use the first element of `orderbook_units` for **best bid/ask**.\n* You can expand to show more levels if needed."
      },
      "typeVersion": 1
    },
    {
      "id": "28671723-092c-49c7-8038-cb10677b41b7",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1072,
        640
      ],
      "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": "907b0af3-b626-46da-90dd-6d58f219bfa9",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        -992,
        736
      ],
      "parameters": {},
      "typeVersion": 1.3
    },
    {
      "id": "6c479a7a-ff73-4b8d-9f8a-079a60f80af7",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -784,
        512
      ],
      "parameters": {
        "color": 6,
        "height": 1124,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n### **24h Stats**\n\n**Endpoint:** `GET /v1/ticker`\n**What it does:** Real-time price and 24-hour rolling stats for one or more markets: **open/high/low/last**, **24h change**, **base/quote volume**, etc.\n\n**Params:**\n\n* `markets` (STRING, required) \u2014 one or more market codes, comma-separated. Examples: `KRW-BTC`, `USDT-BTC`, `KRW-BTC,KRW-ETH`.\n\n**Returns (key fields):** `trade_price` (last), `opening_price`, `high_price`, `low_price`, `signed_change_rate`, `signed_change_price`, `acc_trade_volume_24h`, `acc_trade_price_24h`, `prev_closing_price`, `timestamp`, etc.\n\n**n8n query mapping:**\n\n```txt\nmarkets = $fromAI('parameters0_Value', 'KRW-BTC', 'string')\n```\n\n**Notes:**\n* Market codes are uppercase with a hyphen (e.g., `KRW-BTC`).\n* Multiple markets are supported via comma separation."
      },
      "typeVersion": 1
    },
    {
      "id": "90ec97ef-7eb9-4071-a9c2-ef8f8440f313",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -192,
        512
      ],
      "parameters": {
        "color": 6,
        "height": 980,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n### **Price (Latest)**\n\n**Endpoint:** `GET /v1/ticker`\n**What it does:** Returns the **latest trade price** (and more stats) for a market.\n\n**Params:**\n* `markets` (STRING, required) \u2014 market code (e.g., `KRW-BTC`, `USDT-ETH`).\n\n**Returns:** Array with objects including `trade_price` (last price), `opening_price`, `high_price`, `low_price`, `prev_closing_price`, `acc_trade_volume`, `acc_trade_price`, `change`, `signed_change_rate`, etc.\n\n**n8n query mapping:**\n\n```txt\nmarkets = $fromAI('parameters0_Value', 'KRW-BTC', 'string')\n```\n\n**Notes:**\n* Always use **hyphenated format** (e.g., `KRW-BTC`).\n* Returns **more than just price** \u2014 can also be used instead of 24h stats."
      },
      "typeVersion": 1
    },
    {
      "id": "9bd5a13c-3346-40c0-a8b1-9a34632c43cf",
      "name": "Sticky Note12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        464,
        512
      ],
      "parameters": {
        "color": 6,
        "height": 1332,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n### **Dynamic Klines (All Timeframes in One Node)**\n\n**Endpoint (dynamic):** `GET /v1/candles/{seconds|minutes/{unit}|days|weeks|months|years}`\n**What it does:** Returns OHLCV candles for the requested Upbit market using **one node**. The path segment is chosen automatically from your `tf` (timeframe) input.\n\n**Accepted `tf` examples:**\n- `1s`, `30s` \u2192 **seconds**\n- `1m`, `3m`, `5m`, `10m`, `15m`, `30m`, `60m`, `240m` \u2192 **minutes/{unit}**\n- `1h`, `2h`, `4h` \u2192 mapped to **minutes/60**, **minutes/120**, **minutes/240**\n- `1d` \u2192 **days**\n- `1w` \u2192 **weeks**\n- `1M` \u2192 **months**\n- `1y` \u2192 **years**\n\n**Params:**\n* `market` (STRING, required) \u2014 e.g., `KRW-BTC`, `USDT-ETH`\n* `tf` (STRING, required) \u2014 timeframe token as above (default `15m`)\n* `limit` (INT, optional, default 100, max 200) \u2014 number of candles\n* `to` (STRING, optional) \u2014 ISO8601 end time (exclusive), e.g. `2025-09-15T09:00:00Z`\n\n**Notes:**\n* Upbit hours are done via minutes (e.g., `1h` \u2192 `minutes/60`).\n* Seconds endpoint exists but is limited in historical depth.\n* Response is an array of candles with fields like `opening_price`, `high_price`, `low_price`, `trade_price` (close), `candle_acc_trade_volume`, `timestamp`.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "7b656884-eeb9-433c-90e0-dd8bd19fc19d",
      "name": "Sticky Note13",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        800,
        512
      ],
      "parameters": {
        "color": 6,
        "height": 948,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n### **Average Price (VWAP)**\n\n**Endpoint:** `GET /v1/trades/ticks`\n**What it does:** Retrieves recent trades and can be used to calculate a rolling **average price (VWAP)** for a market.\n\n**Params:**\n* `market` (STRING, required) \u2014 e.g., `KRW-BTC`\n* `count` (INT, optional) \u2014 number of trades to fetch (default 30, max 200)\n\n**Returns:** Array of trades (`trade_price`, `trade_volume`, `timestamp`, etc.).\n\n**n8n mapping:**\n```txt\nmarket = $fromAI('parameters0_Value', 'KRW-BTC', 'string')\ncount  = $fromAI('parameters1_Value', 30, 'number')\n```\n\n**Notes:** Upbit doesn\u2019t provide a direct avgPrice endpoint. Instead, VWAP or mean trade price is derived from the latest trades."
      },
      "typeVersion": 1
    },
    {
      "id": "f4717caf-540e-4ced-90d9-825d200a0154",
      "name": "Sticky Note14",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1136,
        512
      ],
      "parameters": {
        "color": 6,
        "height": 868,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n### **Recent Trades**\n\n**Endpoint:** `GET /v1/trades/ticks`\n**What it does:** Fetches the **most recent trades** for a market.\n\n**Params:**\n\n* `market` (STRING, required) \u2014 Upbit market ID (e.g., `KRW-BTC`, `USDT-ETH`).\n* `count` (INT, optional, default 30, max 200) \u2014 number of trades to fetch.\n\n**Returns:** array of trade objects `{trade_price, trade_volume, ask_bid, timestamp, sequential_id, ...}`\n\n**n8n query mapping:**\n\n```txt\nmarket = $fromAI('parameters0_Value', 'KRW-BTC', 'string')\ncount  = $fromAI('parameters1_Value', 30, 'number')\n```"
      },
      "typeVersion": 1
    },
    {
      "id": "9adcbbd2-1f62-4779-b1bd-0c3792042110",
      "name": "Calculator",
      "type": "@n8n/n8n-nodes-langchain.toolCalculator",
      "position": [
        1520,
        592
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "c5fc3093-d51e-430e-bd5b-59a79d07c835",
      "name": "Think",
      "type": "@n8n/n8n-nodes-langchain.toolThink",
      "position": [
        1808,
        592
      ],
      "parameters": {
        "description": "### \ud83c\udff7 Tool: **Think**\n\n**Purpose:**\n\n* Lightweight **reasoning helper**.\n* Lets the AI Agent process intermediate logic, format outputs, or decide how to combine multiple API results before sending the final report.\n* Does not fetch data itself.\n\n**Use cases:**\n\n* Clean/reshape JSON from Binance endpoints\n* Extract only the needed fields (e.g., `lastPrice`, `volume`)\n* Help prepare data for Telegram message formatting\n\n**n8n setup notes:**\n\n* No API call, just an **AI Tool** node.\n* Connect upstream API results \u2192 Think \u2192 Report Agent."
      },
      "typeVersion": 1.1
    },
    {
      "id": "883e49b1-ec6b-4865-9595-7d6890022d6d",
      "name": "Sticky Note15",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1440,
        512
      ],
      "parameters": {
        "color": 6,
        "height": 836,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n### **Calculator**\n\n**Purpose:**\n\n* Perform **math operations** inside the workflow.\n* Supports add/subtract/multiply/divide, percentages, rounding, etc.\n\n**Use cases:**\n\n* Calculate spreads (ask \u2013 bid)\n* Compute % changes from open vs. last price\n* Normalize volumes or confidence scores\n\n**n8n setup notes:**\n\n* Node: `Calculator` (n8n built-in)\n* Input fields can come from Binance API JSON\n* Output can be chained into Think \u2192 Final Report\n"
      },
      "typeVersion": 1
    },
    {
      "id": "aad0c76e-5a27-41c7-847e-8fa03d078db4",
      "name": "Sticky Note16",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1728,
        512
      ],
      "parameters": {
        "color": 6,
        "height": 932,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n### **Think**\n\n**Purpose:**\n\n* Lightweight **reasoning helper**.\n* Lets the AI Agent process intermediate logic, format outputs, or decide how to combine multiple API results before sending the final report.\n* Does not fetch data itself.\n\n**Use cases:**\n\n* Clean/reshape JSON from Binance endpoints\n* Extract only the needed fields (e.g., `lastPrice`, `volume`)\n* Help prepare data for Telegram message formatting\n\n**n8n setup notes:**\n\n* No API call, just an **AI Tool** node.\n* Connect upstream API results \u2192 Think \u2192 Report Agent."
      },
      "typeVersion": 1
    },
    {
      "id": "3c3cad01-5bfd-475a-9ab1-ae790be6bd4d",
      "name": "Upbit  AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -96,
        240
      ],
      "parameters": {
        "text": "={{ $json.message }}",
        "options": {
          "systemMessage": "You are the **Upbit Spot Market Data Agent**.\n\nYou have **HTTP GET access** to the official Upbit REST API and must **fetch and present market data only** for requested Upbit Spot markets. You do **not** analyze, predict, or recommend.\n\n#### API base\n\n* `https://api.upbit.com`\n\n#### Request/format rules\n\n* All requests are **HTTP GET** returning **JSON**.\n* Query strings for params (e.g., `?markets=KRW-BTC`).\n* Market codes are uppercase with a hyphen (e.g., `KRW-BTC`, `USDT-ETH`).\n* If anything fails or is missing, show `N/A`.\n\n#### Available endpoints\n\n1. **Market list** \u2013 `GET /v1/market/all`\n2. **Tickers (price + 24h stats)** \u2013 `GET /v1/ticker?markets=KRW-BTC[,\u2026]`\n3. **Tickers by quote** \u2013 `GET /v1/tickers?quote_currencies=KRW|BTC|USDT`\n4. **Order book** \u2013 `GET /v1/orderbook?markets=KRW-BTC`\n5. **Supported levels** \u2013 `GET /v1/orderbook/supported_levels?markets=KRW-BTC`\n6. **Recent trades** \u2013 `GET /v1/trades/ticks?market=KRW-BTC&count=100`\n7. **Candles (dynamic)** \u2013 `GET /v1/candles/{seconds | minutes/{unit} | days | weeks | months | years}`\n\n#### Dynamic candles (single tool, auto-select path)\n\n* Input `tf` decides the path:\n\n  * `1s, 30s` \u2192 `seconds`\n  * `1m,3m,5m,10m,15m,30m,60m,240m` \u2192 `minutes/{unit}`\n  * `1h,2h,4h` \u2192 map to `minutes/60`, `minutes/120`, `minutes/240`\n  * `1d` \u2192 `days`, `1w` \u2192 `weeks`, `1M` \u2192 `months`, `1y` \u2192 `years`\n* Common params: `market` (e.g., `KRW-BTC`), `count`/`limit` (default 100, max 200), optional `to` ISO8601.\n\n#### Utility tools\n\n* **Calculator**: spreads, % changes, lightweight math.\n* **Think**: reshape/clean JSON, select fields, prepare text.\n\n#### Output style\n\nReturn **clean, structured text** (no HTML). Example:\n\n```\nKRW-BTC \u2014 Upbit Spot Data\n\nPrice\n\u2022 Last: 95,800,000 KRW\n\u2022 Change (24h): +2.3%\n\n24h Stats\n\u2022 Open: 93,500,000 \u2022 High: 96,200,000 \u2022 Low: 92,800,000 \u2022 Volume: 12,345 BTC\n\nOrder Book (Top 5)\n\u2022 Bids: [95,790,000 x 0.50], [95,780,000 x 1.20], \u2026\n\u2022 Asks: [95,810,000 x 0.80], [95,820,000 x 1.50], \u2026\n\nKlines (15m, latest 5)\n\u2022 O/H/L/C: 95,700,000 / 95,820,000 / 95,600,000 / 95,800,000\n```\n\n#### Rules\n\n* Always call the correct Upbit endpoint for the user\u2019s request.\n* Never fabricate values (formatting/math only).\n* No strategies, advice, or sentiment.\n* Prefer concise, human-readable values over raw JSON.\n\n"
        },
        "promptType": "define"
      },
      "typeVersion": 1.8
    },
    {
      "id": "052801e0-4631-4466-bd04-84ea68320d28",
      "name": "24h Stats",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        -704,
        592
      ],
      "parameters": {
        "url": "https://api.upbit.com/v1/ticker",
        "options": {},
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "markets",
              "value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('parameters0_Value', `KRW-BTC`, 'string') }}"
            }
          ]
        },
        "toolDescription": "### \ud83c\udff7 Tool: **24h Stats**\n\n**Endpoint:** `GET /v1/ticker`\n**What it does:** Real-time price and 24-hour rolling stats for one or more markets: **open/high/low/last**, **24h change**, **base/quote volume**, etc.\n\n**Params:**\n\n* `markets` (STRING, required) \u2014 one or more market codes, comma-separated. Examples: `KRW-BTC`, `USDT-BTC`, `KRW-BTC,KRW-ETH`.\n\n**Returns (key fields):** `trade_price` (last), `opening_price`, `high_price`, `low_price`, `signed_change_rate`, `signed_change_price`, `acc_trade_volume_24h`, `acc_trade_price_24h`, `prev_closing_price`, `timestamp`, etc.\n\n**n8n query mapping:**\n\n```txt\nmarkets = $fromAI('parameters0_Value', 'KRW-BTC', 'string')\n```\n\n**Notes:**\n* Market codes are uppercase with a hyphen (e.g., `KRW-BTC`).\n* Multiple markets are supported via comma separation."
      },
      "typeVersion": 4.2
    },
    {
      "id": "54bdf0b7-4d92-4a86-a5fe-99f7fd283a09",
      "name": "Order Book Depth",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        -400,
        592
      ],
      "parameters": {
        "url": "https://api.upbit.com/v1/orderbook",
        "options": {},
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "markets",
              "value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('parameters0_Value', `KRW-BTC`, 'string') }}"
            }
          ]
        },
        "toolDescription": "### \ud83c\udff7 Tool: **Order Book Depth**\n\n**Endpoint:** `GET /v1/orderbook`\n**What it does:** Returns **order book** with bids/asks and total sizes.\n\n**Params:**\n\n* `markets` (STRING, required) \u2014 market code, e.g., `KRW-BTC`.\n\n**Returns:** `orderbook_units` array with `ask_price`, `bid_price`, `ask_size`, `bid_size` (top ~15 levels by default).\n\n**n8n query mapping:**\n\n```txt\nmarkets = $fromAI('parameters0_Value', 'KRW-BTC', 'string')\n```\n\n**Notes:**\n* Upbit does not support arbitrary `limit` \u2014 it returns a fixed number of levels (usually 15).\n* Market codes use hyphen format (e.g., `KRW-BTC`)."
      },
      "typeVersion": 4.2
    },
    {
      "id": "cbcbba24-d5a8-4229-a043-d0bced05ae06",
      "name": "Price (Latest)",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        -112,
        592
      ],
      "parameters": {
        "url": "https://api.upbit.com/v1/ticker",
        "options": {},
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "markets",
              "value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('parameters0_Value', `KRW-BTC`, 'string') }}"
            }
          ]
        },
        "toolDescription": "### \ud83c\udff7 Tool: **Price (Latest)**\n\n**Endpoint:** `GET /v1/ticker`\n**What it does:** Returns the **latest trade price** (and more stats) for a market.\n\n**Params:**\n* `markets` (STRING, required) \u2014 market code (e.g., `KRW-BTC`, `USDT-ETH`).\n\n**Returns:** Array with objects including `trade_price` (last price), `opening_price`, `high_price`, `low_price`, `prev_closing_price`, `acc_trade_volume`, `acc_trade_price`, `change`, `signed_change_rate`, etc.\n\n**n8n query mapping:**\n\n```txt\nmarkets = $fromAI('parameters0_Value', 'KRW-BTC', 'string')\n```\n\n**Notes:**\n* Always use **hyphenated format** (e.g., `KRW-BTC`).\n* Returns **more than just price** \u2014 can also be used instead of 24h stats."
      },
      "typeVersion": 4.2
    },
    {
      "id": "79da9179-4725-470a-a729-d064d41d074f",
      "name": "Best Bid/Ask",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        208,
        592
      ],
      "parameters": {
        "url": "https://api.upbit.com/v1/orderbook",
        "options": {},
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "markets",
              "value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('parameters0_Value', `KRW-BTC`, 'string') }}"
            }
          ]
        },
        "toolDescription": "### \ud83c\udff7 Tool: **Best Bid/Ask (Orderbook Snapshot)**\n\n**Endpoint:** `GET /v1/orderbook`\n**What it does:** Returns the **best bid/ask** and order book depth for the given market.\n\n**Params:**\n* `markets` (STRING, required) \u2014 market code (e.g., `KRW-BTC`, `USDT-ETH`).\n\n**Returns:** Array with objects:\n* `orderbook_units`: [{ \"ask_price\", \"bid_price\", \"ask_size\", \"bid_size\" }, ...]\n* Top unit = **best bid/ask**.\n\n**n8n query mapping:**\n\n```txt\nmarkets = $fromAI('parameters0_Value', 'KRW-BTC', 'string')\n```\n\n**Notes:**\n* Use the first element of `orderbook_units` for **best bid/ask**.\n* You can expand to show more levels if needed."
      },
      "typeVersion": 4.2
    },
    {
      "id": "9d926768-3fee-450f-8b92-bc51d1c0c309",
      "name": "Average Price (VWAP)",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        880,
        592
      ],
      "parameters": {
        "url": "https://api.upbit.com/v1/trades/ticks",
        "options": {},
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "market",
              "value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('parameters0_Value', `KRW-BTC`, 'string') }}"
            },
            {
              "name": "count",
              "value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('parameters1_Value', `30`, 'number') }}"
            }
          ]
        },
        "toolDescription": "### \ud83c\udff7 Tool: **Average Price (VWAP)**\n\n**Endpoint:** `GET /v1/trades/ticks`\n**What it does:** Retrieves recent trades and can be used to calculate a rolling **average price (VWAP)** for a market.\n\n**Params:**\n* `market` (STRING, required) \u2014 e.g., `KRW-BTC`\n* `count` (INT, optional) \u2014 number of trades to fetch (default 30, max 200)\n\n**Returns:** Array of trades (`trade_price`, `trade_volume`, `timestamp`, etc.).\n\n**n8n mapping:**\n```txt\nmarket = $fromAI('parameters0_Value', 'KRW-BTC', 'string')\ncount  = $fromAI('parameters1_Value', 30, 'number')\n```\n\n**Notes:** Upbit doesn\u2019t provide a direct avgPrice endpoint. Instead, VWAP or mean trade price is derived from the latest trades."
      },
      "typeVersion": 4.2
    },
    {
      "id": "7edfe1df-567c-4a7a-8d09-d87f1cd9031f",
      "name": "Recent Trades",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        1216,
        592
      ],
      "parameters": {
        "url": "https://api.upbit.com/v1/trades/ticks",
        "options": {},
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "market",
              "value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('parameters0_Value', `KRW-BTC`, 'string') }}"
            },
            {
              "name": "count",
              "value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('parameters1_Value', `30`, 'number') }}"
            }
          ]
        },
        "toolDescription": "### \ud83c\udff7 Tool: **Recent Trades**\n\n**Endpoint:** `GET /v1/trades/ticks`\n**What it does:** Fetches the **most recent trades** for a market.\n\n**Params:**\n\n* `market` (STRING, required) \u2014 Upbit market ID (e.g., `KRW-BTC`, `USDT-ETH`).\n* `count` (INT, optional, default 30, max 200) \u2014 number of trades to fetch.\n\n**Returns:** array of trade objects `{trade_price, trade_volume, ask_bid, timestamp, sequential_id, ...}`\n\n**n8n query mapping:**\n\n```txt\nmarket = $fromAI('parameters0_Value', 'KRW-BTC', 'string')\ncount  = $fromAI('parameters1_Value', 30, 'number')\n```"
      },
      "typeVersion": 4.2
    },
    {
      "id": "2f16acde-faa2-4869-8b75-a5e5d5f003c4",
      "name": "Upbit Klines (Dynamic)",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        544,
        592
      ],
      "parameters": {
        "url": "={{ (function(){\n  const base = 'https://api.upbit.com/v1/candles/';\n  const tf = $fromAI('tf', '15m', 'string');\n  const m = (tf || '').trim();\n\n  // seconds (e.g., 1s, 30s)\n  if (/^\\d+s$/i.test(m)) {\n    return base + 'seconds';\n  }\n\n  // minutes direct (e.g., 1m, 3m, 5m, 10m, 15m, 30m, 60m, 240m)\n  const minMatch = m.match(/^(\\d+)m$/i);\n  if (minMatch) {\n    const unit = minMatch[1];\n    return base + 'minutes/' + unit;\n  }\n\n  // hours mapped to minutes\n  const hourMap = { '1':'60', '2':'120', '4':'240' };\n  const hrMatch = m.match(/^(\\d+)h$/i);\n  if (hrMatch && hourMap[hrMatch[1]]) {\n    return base + 'minutes/' + hourMap[hrMatch[1]];\n  }\n\n  // days, weeks, months, years\n  if (/^\\d+d$/i.test(m)) return base + 'days';\n  if (/^\\d+w$/i.test(m)) return base + 'weeks';\n  if (/^\\d+M$/i.test(m)) return base + 'months';\n  if (/^\\d+y$/i.test(m)) return base + 'years';\n\n  // fallback: 15m\n  return base + 'minutes/15';\n})() }}",
        "options": {},
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "market",
              "value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('market', `KRW-BTC`, 'string') }}"
            },
            {
              "name": "count",
              "value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('limit', `100`, 'number') }}"
            },
            {
              "name": "to",
              "value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('to', ``, 'string') }}"
            }
          ]
        },
        "toolDescription": "### \ud83c\udff7 Tool: **Dynamic Klines (All Timeframes in One Node)**\n\n**Endpoint (dynamic):** `GET /v1/candles/{seconds|minutes/{unit}|days|weeks|months|years}`\n**What it does:** Returns OHLCV candles for the requested Upbit market using **one node**. The path segment is chosen automatically from your `tf` (timeframe) input.\n\n**Accepted `tf` examples:**\n- `1s`, `30s` \u2192 **seconds**\n- `1m`, `3m`, `5m`, `10m`, `15m`, `30m`, `60m`, `240m` \u2192 **minutes/{unit}**\n- `1h`, `2h`, `4h` \u2192 mapped to **minutes/60**, **minutes/120**, **minutes/240**\n- `1d` \u2192 **days**\n- `1w` \u2192 **weeks**\n- `1M` \u2192 **months**\n- `1y` \u2192 **years**\n\n**Params:**\n* `market` (STRING, required) \u2014 e.g., `KRW-BTC`, `USDT-ETH`\n* `tf` (STRING, required) \u2014 timeframe token as above (default `15m`)\n* `limit` (INT, optional, default 100, max 200) \u2014 number of candles\n* `to` (STRING, optional) \u2014 ISO8601 end time (exclusive), e.g. `2025-09-15T09:00:00Z`\n\n**Notes:**\n* Upbit hours are done via minutes (e.g., `1h` \u2192 `minutes/60`).\n* Seconds endpoint exists but is limited in historical depth.\n* Response is an array of candles with fields like `opening_price`, `high_price`, `low_price`, `trade_price` (close), `candle_acc_trade_volume`, `timestamp`.\n"
      },
      "typeVersion": 4.2
    },
    {
      "id": "28fa8e05-0d29-4776-adea-459515f1ea00",
      "name": "Sticky Note17",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2112,
        -1248
      ],
      "parameters": {
        "width": 1440,
        "height": 4256,
        "content": "# \ud83e\udde0 Upbit Spot Market Data AI Agent \u2013 Full System Documentation\n\nA production-ready AI automation that fetches and presents **Upbit spot market data** (no analysis or advice). It retrieves **tickers, order books, recent trades, and multi-timeframe candles** via Upbit\u2019s public REST API and formats clean, Telegram-friendly text outputs.\n\n---\n\n## \ud83e\udde9 Included Workflows\n\n> Install/activate all of the following for the system to work end-to-end:\n\n| \u2705 Workflow Name              | \ud83d\udccc Function Description                                                |\n| ---------------------------- | ---------------------------------------------------------------------- |\n| Upbit Spot Market Data Agent | Core orchestrator. Parses user asks, calls data tools, formats output. |\n| Upbit Price/Ticker Tool      | Fetches single-market ticker (last, change, acc volumes).              |\n| Upbit Order Book Tool        | Fetches order book with adjustable `count` (top-N levels).             |\n| Upbit Recent Trades Tool     | Fetches recent trade prints (price, size, side, time).                 |\n| Upbit Candles Tool (Unified) | Fetches candles across seconds/minutes/days/weeks/months/years.        |\n| Think (JSON Shaper)          | Optional: normalizes API JSON to simplified fields for output.         |\n| Calculator                   | Optional: spread, midpoint, percentage change calculations.            |\n\n---\n\n## \ud83d\udd27 Installation Instructions\n\n### 1) Import Workflows\n\n* Open **n8n Editor UI**\n* Import each JSON workflow file\n* Ensure the **Upbit Spot Market Data Agent** can call the data tools (use *Execute Workflow* or direct connections)\n\n### 2) Credentials\n\n* Upbit public market endpoints require **no auth**\n* (If you later add private endpoints, configure API Key/Secret separately)\n\n### 3) Environment / Params (Recommended)\n\n* `DEFAULT_MARKET`: `KRW-BTC` (Upbit standard format: `QUOTE-BASE`, e.g., `KRW-BTC`, `USDT-BTC`)\n* `DEFAULT_CANDLE_UNIT`: `15` (for minutes candles)\n* `DEFAULT_CANDLE_KIND`: `minutes` (one of: `seconds|minutes|days|weeks|months|years`)\n* `DEFAULT_LIMIT`: `20` (typical count for lists and candles)\n\n### 4) Telegram (Optional)\n\n* If triggering from Telegram, add your bot credentials and chat ID check node\n* The agent can accept plain text like: `upbit KRW-BTC 15m` or `upbit KRW-BTC candles 1h`\n\n---\n\n## \ud83c\udf10 Upbit REST \u2013 Public Market Endpoints (Used)\n\n**Base URL:** `https://api.upbit.com/v1`\n\n* **Tickers (single or multiple)**\n  `GET /ticker?markets=KRW-BTC`\n  Returns last trade price, 24h change, accumulated volumes, etc.\n\n* **Orderbook**\n  `GET /orderbook?markets=KRW-BTC`\n  Use `orderbook_units` array. Top-of-book is index 0. (If you need only top-1, read first unit.)\n\n* **Recent Trades**\n  `GET /trades/ticks?market=KRW-BTC&count=100`\n  Returns recent trades with price, volume, side (ask/bid), and timestamp.\n\n* **Candles (Unified)**\n  Same path pattern, AI chooses the correct noun by timeframe:\n\n  * `GET /candles/seconds/{unit}?market=KRW-BTC&count=20`\n  * `GET /candles/minutes/{unit}?market=KRW-BTC&count=20`\n  * `GET /candles/days?market=KRW-BTC&count=20`\n  * `GET /candles/weeks?market=KRW-BTC&count=20`\n  * `GET /candles/months?market=KRW-BTC&count=20`\n  * `GET /candles/years?market=KRW-BTC&count=20`\n\n**How the agent chooses candle route from user input:**\n\n* If user says `1s, 5s` \u2192 **seconds** (`/candles/seconds/{unit}`)\n* `1m, 3m, 5m, 15m, 30m, 60m, 240m` \u2192 **minutes** (`/candles/minutes/{unit}` where `unit` is the number of minutes)\n* `1d` \u2192 **days** (`/candles/days`)\n* `1w` \u2192 **weeks** (`/candles/weeks`)\n* `1M` (months) \u2192 **months** (`/candles/months`)\n* `1y` \u2192 **years** (`/candles/years`)\n\n> Notes\n>\n> * Upbit markets are **`QUOTE-BASE`** (dash separated, uppercase), e.g., `KRW-BTC`, `USDT-BTC`.\n> * `count` default is often 1\u2013200 depending on endpoint. We recommend `20\u2013100`.\n> * For minute candles, provide `unit` (1, 3, 5, 10, 15, 30, 60, 240). For seconds, typical units include 1, 5, 10, 15, 30.\n> * Historical ranges can be paged using `to=` timestamp (KST in ISO8601), if needed.\n\n---\n\n## \u25b6\ufe0f How the Agent Works (Flow)\n\n```\n[Trigger: text/telegram/webhook]\n\u2192 Parse: market, data type(s), timeframe, limit\n\u2192 Parallel HTTP calls:\n   - /ticker\n   - /orderbook\n   - /trades/ticks\n   - /candles/<kind> (AI selects: seconds/minutes/days/weeks/months/years)\n\u2192 Think: normalize + validate fields (fallback N/A)\n\u2192 Calculator: optional midpoint/spread/%change\n\u2192 Format: clean, human-readable text (no HTML required)\n\u2192 Return to caller (Telegram or UI)\n```\n\n---\n\n## \ud83d\udce8 Output Style (Text)\n\n```\nKRW-BTC \u2014 Upbit Spot Data\n\nPrice\n\u2022 Last: 88,750,000\n\u2022 24h Change: +2.1%\n\n24h Stats (Ticker)\n\u2022 Acc Vol (Base): 1,234 BTC\n\u2022 Acc Vol (Quote): 109,000,000,000 KRW\n\nOrder Book (Top 5)\n\u2022 Bids: [88,740,000 x 0.50], [88,730,000 x 1.20], \u2026\n\u2022 Asks: [88,760,000 x 0.80], [88,770,000 x 1.50], \u2026\n\nCandles (15m, latest 20)\n\u2022 O/H/L/C: 88,100,000 / 88,820,000 / 87,950,000 / 88,750,000\n\nRecent Trades (latest 5)\n\u2022 88,760,000 x 0.015 (bid) at 09:33:12\n\u2022 88,755,000 x 0.002 (ask) at 09:33:10\n```\n\n> If any field is missing or a request fails, show **`N/A`** and continue.\n\n---\n\n## \ud83e\udde0 System Message (Agent Behavior)\n\n* You are the **Upbit Spot Market Data Agent**.\n* You have HTTP GET access to Upbit\u2019s public REST API.\n* Your job is to **fetch and present data only**. No analysis, no predictions, no recommendations.\n* Always call the correct endpoint for the requested data type and timeframe.\n* Respect Upbit market format `QUOTE-BASE` (e.g., `KRW-BTC`).\n* Present **clean text**, grouped by Price / 24h Stats / Order Book / Candles / Trades.\n* On error or missing data, return `N/A` and proceed.\n\n---\n\n## \ud83e\uddee Think & Calculator Usage (Optional)\n\n* **Think:** flatten / rename fields (e.g., `trade_price \u2192 last`, `acc_trade_price_24h \u2192 quoteVol`, etc.)\n* **Calculator:**\n\n  * `midpoint = (bestBid + bestAsk) / 2`\n  * `spread = bestAsk - bestBid`\n  * `%change = ((last - open) / open) * 100`\n\n---\n\n## \ud83d\udd0e Troubleshooting\n\n* **Empty order book or trades:** Verify market code (must be `QUOTE-BASE`).\n* **Wrong candles route:** Ensure the agent maps user timeframe to the correct noun (`seconds|minutes|days|weeks|months|years`) and, for minutes/seconds, that `unit` is valid.\n* **Rate limits:** Space calls or reduce `count`. Consider caching the last response for the same market/timeframe during a session.\n\n---\n\n## \ud83e\uddfe Example User Prompts\n\n* `upbit KRW-BTC`\n  \u2192 Returns ticker, order book (top 5), recent trades (20), candles (15m x 20)\n\n* `upbit USDT-BTC 1h 50`\n  \u2192 Chooses minutes candles with `unit=60`, `count=50`, plus the other datasets\n\n* `upbit KRW-ETH trades 100`\n  \u2192 Only recent trades (count=100)\n\n* `upbit KRW-XRP orderbook 20`\n  \u2192 Only order book (top 20 levels)\n\n---\n\n## \ud83d\ude80 Support & Licensing\n\n**Author:** Don Jayamaha\n**Company:** Treasurium Capital Limited Company\n[linkedin.com/in/donjayamahajr](http://linkedin.com/in/donjayamahajr)\n\n\u00a9 2025 Treasurium Capital Limited Company. All rights reserved.\nSystem architecture, prompts, and workflow design are proprietary. Reuse/resale prohibited without license.\n"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "99f3c302-0f14-4e73-a185-0aebffb3dcb3",
  "connections": {
    "Think": {
      "ai_tool": [
        [
          {
            "node": "Upbit  AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "24h Stats": {
      "ai_tool": [
        [
          {
            "node": "Upbit  AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Calculator": {
      "ai_tool": [
        [
          {
            "node": "Upbit  AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Best Bid/Ask": {
      "ai_tool": [
        [
          {
            "node": "Upbit  AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Recent Trades": {
      "ai_tool": [
        [
          {
            "node": "Upbit  AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "Upbit  AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Price (Latest)": {
      "ai_tool": [
        [
          {
            "node": "Upbit  AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Upbit  AI Agent": {
      "main": [
        [
          {
            "node": "Splits message is more than 4000 characters",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Adds \"SessionId\"": {
      "main": [
        [
          {
            "node": "Upbit  AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Order Book Depth": {
      "ai_tool": [
        [
          {
            "node": "Upbit  AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "User Authentication (Replace Telegram ID)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Upbit  AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Average Price (VWAP)": {
      "ai_tool": [
        [
          {
            "node": "Upbit  AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Upbit Klines (Dynamic)": {
      "ai_tool": [
        [
          {
            "node": "Upbit  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
          }
        ]
      ]
    }
  }
}