バイナンス価格-24時間統計- orderbook-ローソク足ツール

上級

これはFinance, AI分野の自動化ワークフローで、17個のノードを含みます。主にAgent, LmChatOpenAi, ExecuteWorkflowTrigger, ToolHttpRequest, MemoryBufferWindowなどのノードを使用、AI技術を活用したスマート自動化を実現。 バイナンス価格-24時間統計- order-book-ローソク図ツール

前提条件
  • OpenAI API Key
  • ターゲットAPIの認証情報が必要な場合あり

カテゴリー

ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
  "id": "xAa5vBxhQzEWWFJM",
  "meta": {
    "instanceId": "a5283507e1917a33cc3ae615b2e7d5ad2c1e50955e6f831272ddd5ab816f3fb6",
    "templateCredsSetupCompleted": true
  },
  "name": "Binance SM Price-24hrStats-OrderBook-Kline Tool",
  "tags": [],
  "nodes": [
    {
      "id": "200b26ba-fd67-48a2-86fc-cc1f92548757",
      "name": "getCurrentPrice",
      "type": "@n8n/n8n-nodes-langchain.toolHttpRequest",
      "position": [
        80,
        160
      ],
      "parameters": {
        "url": "https://api.binance.com/api/v3/ticker/price",
        "sendQuery": true,
        "parametersQuery": {
          "values": [
            {
              "name": "symbol"
            }
          ]
        },
        "toolDescription": "Fetches the current price for a trading pair (e.g., BTCUSDT) from Binance Spot Market.\n\n✅ Expected Query Format (JSON):\n\njson\n{\n  \"symbol\": \"BTCUSDT\"\n}\nYou must provide a valid symbol (e.g., BTCUSDT, ETHUSDT, BNBUSDT) as a string."
      },
      "typeVersion": 1.1
    },
    {
      "id": "978a1d9f-b217-4455-b0b3-96b86d2fd809",
      "name": "get24hrStats",
      "type": "@n8n/n8n-nodes-langchain.toolHttpRequest",
      "position": [
        320,
        160
      ],
      "parameters": {
        "url": "https://api.binance.com/api/v3/ticker/24hr",
        "sendQuery": true,
        "parametersQuery": {
          "values": [
            {
              "name": "symbol"
            }
          ]
        },
        "toolDescription": "Fetches 24-hour price statistics including open, high, low, close, and volume for a trading pair (e.g., BTCUSDT) from Binance Spot Market.\\n\\n\\u2705 Expected Query Format (JSON):\\n{\\n  \\\"symbol\\\": \\\"BTCUSDT\\\"\\n}\\nReplace 'BTCUSDT' with the symbol you want to monitor."
      },
      "typeVersion": 1.1
    },
    {
      "id": "b6c4bb2d-6669-433a-a83b-f0c25c48e5ce",
      "name": "getOrderBook",
      "type": "@n8n/n8n-nodes-langchain.toolHttpRequest",
      "position": [
        560,
        160
      ],
      "parameters": {
        "url": "https://api.binance.com/api/v3/depth",
        "sendQuery": true,
        "parametersQuery": {
          "values": [
            {
              "name": "symbol"
            },
            {
              "name": "limit"
            }
          ]
        },
        "toolDescription": "Fetches the live order book (bids and asks) for a specific trading pair from Binance.\n\n✅ Expected Input Format (JSON):\n{\n  \"symbol\": \"BTCUSDT\",\n  \"limit\": 100\n}\n\nYou may adjust the `limit` between 1 and 5000 (default: 100). The response includes `bids` and `asks` as arrays of [price, quantity] levels."
      },
      "typeVersion": 1.1
    },
    {
      "id": "c5403bc9-349d-4205-9bd6-f0e48a33630e",
      "name": "getKlines",
      "type": "@n8n/n8n-nodes-langchain.toolHttpRequest",
      "position": [
        820,
        160
      ],
      "parameters": {
        "url": "https://api.binance.com/api/v3/klines",
        "sendQuery": true,
        "parametersQuery": {
          "values": [
            {
              "name": "symbol"
            },
            {
              "name": "interval"
            },
            {
              "name": "limit",
              "valueProvider": "modelOptional"
            }
          ]
        },
        "toolDescription": "Fetches candlestick (OHLCV) data for a trading pair and time interval from Binance. Supports optional time range filtering.\n\n✅ Expected Input Format (JSON):\n{\n  \"symbol\": \"BTCUSDT\",\n  \"interval\": \"15m\",\n  \"limit\": 100,\n  \"startTime\": 1690000000000,\n  \"endTime\": 1690100000000,\n  \"timeZone\": \"0\"\n}\n\nOnly `symbol` and `interval` are required. All other fields are optional.\n\nThe response is an array of arrays representing each candlestick:\n[\n  [ openTime, open, high, low, close, volume, closeTime, quoteVolume, numTrades, takerBase, takerQuote, ignore ]\n]"
      },
      "typeVersion": 1.1
    },
    {
      "id": "d4296211-d100-4b4d-9f39-31d5799c46cb",
      "name": "OpenAI チャットモデル",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -440,
        180
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini",
          "cachedResultName": "gpt-4.1-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "yUizd8t0sD5wMYVG",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "7a941f53-2294-4926-957d-ee82d01e4c11",
      "name": "シンプルメモリ",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        -200,
        180
      ],
      "parameters": {},
      "typeVersion": 1.3
    },
    {
      "id": "8f6328d3-2508-40e5-a01c-44e428384f16",
      "name": "When Executed by Another Workflow",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        -320,
        -180
      ],
      "parameters": {
        "workflowInputs": {
          "values": [
            {
              "name": "message"
            },
            {
              "name": "sessionId"
            }
          ]
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "c4400f35-e18f-4645-b92e-187ac73d40f6",
      "name": "Binance SM Price-24hrStats-OrderBook-Kline エージェント",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        80,
        -180
      ],
      "parameters": {
        "text": "={{ $json.message }}",
        "options": {
          "systemMessage": "You are the **Binance SM Price-24hrStats-OrderBook-Kline Agent**, responsible for gathering and summarizing real-time price and market structure data for any given trading pair. You always call **all four market data tools** and return **latest candles across all key intervals**.\n\n---\n\n### 🔧 Connected Tools (Always Executed)\n\n#### 📈 `getCurrentPrice`\n\n*Latest trade price*\n**Endpoint**: `/api/v3/ticker/price`\n**Input**:\n\n```json\n{ \"symbol\": \"BTCUSDT\" }\n```\n\n---\n\n#### 📊 `get24hrStats`\n\n*24-hour stats including OHLC and volume*\n**Endpoint**: `/api/v3/ticker/24hr`\n**Input**:\n\n```json\n{ \"symbol\": \"BTCUSDT\" }\n```\n\n---\n\n#### 🧾 `getOrderBook`\n\n*Live order book (top 100 bids/asks)*\n**Endpoint**: `/api/v3/depth`\n**Input**:\n\n```json\n{ \"symbol\": \"BTCUSDT\", \"limit\": 100 }\n```\n\n---\n\n#### 🕰️ `getKlines` (Multi-Interval)\n\n*Latest candle data for multiple timeframes*\n**Endpoint**: `/api/v3/klines`\n**Inputs** (run separately for each):\n\n```json\n{ \"symbol\": \"BTCUSDT\", \"interval\": \"15m\", \"limit\": 1 }\n{ \"symbol\": \"BTCUSDT\", \"interval\": \"1h\",  \"limit\": 1 }\n{ \"symbol\": \"BTCUSDT\", \"interval\": \"4h\",  \"limit\": 1 }\n{ \"symbol\": \"BTCUSDT\", \"interval\": \"1d\",  \"limit\": 1 }\n```\n\n---\n\n### 🧠 Behavior Instructions\n\n* Always extract the **symbol** from the user's prompt (e.g., \"ETHUSDT\", \"SOLUSDT\")\n* Trigger **all four tools** in parallel\n* For klines, call the endpoint 4 times (15m, 1h, 4h, 1d)\n* Merge all tool outputs into a **single response**\n* Format clearly for **Telegram** messaging\n\n---\n\n### 📤 Output Format (Telegram HTML)\n\nExample:\n\n```\n📊 BTCUSDT Market Overview\n\n💰 Price: $63,220  \n📈 24h Change: +2.3% | Volume: 45,210 BTC  \n\n📉 Order Book  \n• Top Bid: $63,190  \n• Top Ask: $63,230  \n\n🕰️ Latest Candles  \n• 15m: O: $63,000 | C: $63,220 | Vol: 320 BTC  \n• 1h : O: $62,700 | C: $63,300 | Vol: 980 BTC  \n• 4h : O: $61,800 | C: $63,500 | Vol: 2,410 BTC  \n• 1d : O: $59,200 | C: $63,220 | Vol: 7,850 BTC\n```\n\n---\n\n### ✅ Input Expectations\n\n* Input is in natural language, e.g.:\n\n  * \"What’s going on with BTC?\"\n  * \"Give me full SOL update\"\n  * \"Show 4h and 1d candles for ETH\"\n\n* If no symbol is found, ask:\n\n  > “Please provide the token symbol (e.g., BTCUSDT).”\n\n"
        },
        "promptType": "define"
      },
      "typeVersion": 1.9
    },
    {
      "id": "f8d29f2d-5359-4dba-a99f-caaee2e44d91",
      "name": "付箋",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -380,
        -480
      ],
      "parameters": {
        "color": 4,
        "height": 500,
        "content": "## Triggered by Parent Workflow\nNode: When Executed by Another Workflow\nThis agent only activates when another agent (e.g., **Financial Analyst)** passes:"
      },
      "typeVersion": 1
    },
    {
      "id": "2ffb4f3e-2cce-4e14-a1e4-c4cc0af8874b",
      "name": "付箋8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -40,
        -460
      ],
      "parameters": {
        "color": 5,
        "width": 500,
        "height": 460,
        "content": "## Main Reasoning Agent\nNode: Binance SM Price-24hrStats-OrderBook-Kline Agent\nThis is the AI interface that:\n\n**Accepts the prompt (symbol)**\n\nExtracts the **trading pair**\n\n**Automatically routes the query to all four** price tools\n\nCombines results and sends formatted response to parent agent\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "f722bc3b-983d-423a-bce2-a62d238873a7",
      "name": "付箋2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -500,
        120
      ],
      "parameters": {
        "width": 220,
        "height": 520,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## OpenAI Formatter\nNode: OpenAI Chat Model (**gpt-4.1-mini**)\nUsed to:\n\nParse raw JSON responses\n\n**Convert numeric results into clean text blocks**\n\n**Label important stats** (e.g., trend, spread, volatility)\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "60d3f253-2d1f-480c-ac32-8fc48c4cfab2",
      "name": "付箋1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -260,
        120
      ],
      "parameters": {
        "color": 3,
        "width": 220,
        "height": 520,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## Simple Memory\nStores the session and symbol context. **Ensures continuity across tool calls** and can be used for **summarization logic.**\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "dccc52f0-2f57-4bdb-a16b-79e84275bda6",
      "name": "付箋3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        20,
        120
      ],
      "parameters": {
        "color": 6,
        "width": 220,
        "height": 620,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n##  getCurrentPrice\nType: toolHttpRequest\nEndpoint:\nhttps://api.binance.com/api/v3/ticker/price\n\nInput:\n\njson\n{ \"symbol\": \"BTCUSDT\" }\n\n**Returns last trade price.**"
      },
      "typeVersion": 1
    },
    {
      "id": "dcae06d0-e8c6-4b72-87fd-1f730ef4829d",
      "name": "付箋4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        260,
        120
      ],
      "parameters": {
        "color": 6,
        "width": 220,
        "height": 680,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## get24hrStats\nType: toolHttpRequest\nEndpoint:\nhttps://api.binance.com/api/v3/ticker/24hr\n\nInput:\n\njson\n{ \"symbol\": \"BTCUSDT\" }\n\n**Returns 24h OHLC, % change, and volume.**\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "4606d831-1579-4a5f-874a-c8d139369ebe",
      "name": "付箋5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        500,
        120
      ],
      "parameters": {
        "color": 6,
        "width": 220,
        "height": 720,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## getOrderBook\nType: toolHttpRequest\nEndpoint:\nhttps://api.binance.com/api/v3/depth\n\nInput:\n\njson\n{\n  \"symbol\": \"BTCUSDT\",\n  \"limit\": 100\n}\n\n**Returns top 100 bids and asks.**"
      },
      "typeVersion": 1
    },
    {
      "id": "25239ca3-ca99-4095-9d64-5581d39244e0",
      "name": "付箋6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        760,
        120
      ],
      "parameters": {
        "color": 6,
        "width": 220,
        "height": 720,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## getKlines (Multi-Timeframe)\nType: toolHttpRequest\nEndpoint:\nhttps://api.binance.com/api/v3/klines\nInputs:\n\nExecuted 4 times, once for each timeframe:\n\njson\n{ \"symbol\": \"BTCUSDT\", \"interval\": \"15m\", \"limit\": 1 }\n{ \"symbol\": \"BTCUSDT\", \"interval\": \"1h\",  \"limit\": 1 }\n{ \"symbol\": \"BTCUSDT\", \"interval\": \"4h\",  \"limit\": 1 }\n{ \"symbol\": \"BTCUSDT\", \"interval\": \"1d\",  \"limit\": 1 }\n\n**Returns OHLCV for each interval’s most recent candle.**"
      },
      "typeVersion": 1
    },
    {
      "id": "9937f721-ab8e-4ef1-9809-9b146c98de1a",
      "name": "付箋7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1240,
        -1420
      ],
      "parameters": {
        "width": 1220,
        "height": 2480,
        "content": "# 📈 Binance SM Price-24hrStats-OrderBook-Kline Tool – Documentation\n\nA market structure sub-agent that collects **real-time price data**, **order book depth**, **24-hour statistics**, and **multi-timeframe candlestick data** for any Binance Spot trading pair.\n\n---\n\n## 🎯 Purpose\n\nThis tool provides the foundation of all market structure insights for a symbol by:\n\n* Fetching current price (`/ticker/price`)\n* Retrieving 24h stats like OHLC and volume (`/ticker/24hr`)\n* Capturing order book data (bids/asks, `/depth`)\n* Pulling latest candlesticks for: **15m, 1h, 4h, 1d** intervals (`/klines`)\n\n---\n\n## 🧩 Included API Endpoints\n\n| Tool Name         | Endpoint               | Description                                   |\n| ----------------- | ---------------------- | --------------------------------------------- |\n| `getCurrentPrice` | `/api/v3/ticker/price` | Latest trade price                            |\n| `get24hrStats`    | `/api/v3/ticker/24hr`  | OHLC + volume in past 24 hours                |\n| `getOrderBook`    | `/api/v3/depth`        | Top 100 bid/ask levels                        |\n| `getKlines`       | `/api/v3/klines`       | OHLCV candles for 15m, 1h, 4h, 1d (limit = 1) |\n\nAll tools are triggered **together**, and return unified results to the parent agent.\n\n---\n\n## 🛠️ Workflow Architecture\n\n| Node                                  | Function                                                 |\n| ------------------------------------- | -------------------------------------------------------- |\n| ✅ `When Executed by Another Workflow` | Triggers this tool from Financial Analyst Agent          |\n| 🤖 `Binance SM Price... Agent`        | Receives prompt, extracts symbol, calls all market tools |\n| 💡 `OpenAI Chat Model (gpt-4o-mini)`  | Converts raw API output into clean Telegram summary      |\n| 🧠 `Simple Memory`                    | Tracks session context (`sessionId`, last-used symbol)   |\n\n---\n\n## 📥 Expected Input\n\nThis tool is **not user-facing** — it is triggered by a parent workflow with input like:\n\n```json\n{\n  \"message\": \"BTCUSDT\",\n  \"sessionId\": \"539847013\"\n}\n```\n\n---\n\n## 🧾 Telegram Output Example\n\n```\n📊 BTCUSDT Market Overview\n\n💰 Price: $63,220  \n📈 24h Change: +2.3% | Volume: 45,210 BTC  \n\n📉 Order Book  \n• Top Bid: $63,190  \n• Top Ask: $63,230  \n\n🕰️ Latest Candles  \n• 15m: O: $63,000 | C: $63,220 | Vol: 320 BTC  \n• 1h : O: $62,700 | C: $63,300 | Vol: 980 BTC  \n• 4h : O: $61,800 | C: $63,500 | Vol: 2,410 BTC  \n• 1d : O: $59,200 | C: $63,220 | Vol: 7,850 BTC\n```\n\n---\n\n## ✅ Use Case Scenarios\n\n| Scenario                                | Result                                           |\n| --------------------------------------- | ------------------------------------------------ |\n| Trader asks for “current BTC data”      | Returns full snapshot across all structure tools |\n| Analyst needs “candles for SOL”         | Returns 15m, 1h, 4h, 1d OHLCV for SOLUSDT        |\n| Quant AI Agent triggers market analysis | Sends back clean Telegram-ready price structure  |\n\n---\n\n## 🚀 Installation Steps\n\n### 1. Import Workflow\n\n* Load this JSON into your n8n instance\n* Activate and rename for clarity if needed\n\n### 2. Credential Setup\n\n* No auth required for Binance public API\n* Ensure OpenAI API key is connected to `OpenAI Chat Model` node\n\n### 3. Trigger Configuration\n\n* This tool is **only executed via `Execute Workflow`** by:\n\n  * `Binance SM Financial Analyst Tool`\n  * `Binance Spot Market Quant AI Agent`\n\n---\n\n## 🔐 Licensing & Support\n\n🔗 **Don Jayamaha – LinkedIn**\n[http://linkedin.com/in/donjayamahajr](http://linkedin.com/in/donjayamahajr)\n\n© 2025 Treasurium Capital Limited Company. All rights reserved.\nThis automation system — including prompt flow, logic architecture, and tool structure — is proprietary to Treasurium Capital Limited Company. Redistribution, resale, or replication without license is prohibited under U.S. and international law.\n\n"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "3c34c007-ae59-4ea9-a073-4d5ba14ba3b8",
  "connections": {
    "c5403bc9-349d-4205-9bd6-f0e48a33630e": {
      "ai_tool": [
        [
          {
            "node": "Binance SM Price-24hrStats-OrderBook-Kline Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "978a1d9f-b217-4455-b0b3-96b86d2fd809": {
      "ai_tool": [
        [
          {
            "node": "Binance SM Price-24hrStats-OrderBook-Kline Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "b6c4bb2d-6669-433a-a83b-f0c25c48e5ce": {
      "ai_tool": [
        [
          {
            "node": "Binance SM Price-24hrStats-OrderBook-Kline Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "Binance SM Price-24hrStats-OrderBook-Kline Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "200b26ba-fd67-48a2-86fc-cc1f92548757": {
      "ai_tool": [
        [
          {
            "node": "Binance SM Price-24hrStats-OrderBook-Kline Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Binance SM Price-24hrStats-OrderBook-Kline Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "8f6328d3-2508-40e5-a01c-44e428384f16": {
      "main": [
        [
          {
            "node": "Binance SM Price-24hrStats-OrderBook-Kline Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
よくある質問

このワークフローの使い方は?

上記のJSON設定コードをコピーし、n8nインスタンスで新しいワークフローを作成して「JSONからインポート」を選択、設定を貼り付けて認証情報を必要に応じて変更してください。

このワークフローはどんな場面に適していますか?

上級 - 財務, 人工知能

有料ですか?

このワークフローは完全無料です。ただし、ワークフローで使用するサードパーティサービス(OpenAI APIなど)は別途料金が発生する場合があります。

ワークフロー情報
難易度
上級
ノード数17
カテゴリー2
ノードタイプ6
難易度説明

上級者向け、16ノード以上の複雑なワークフロー

作成者
Don Jayamaha Jr

Don Jayamaha Jr

@don-the-gem-dealer

With 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で表示

このワークフローを共有

カテゴリー

カテゴリー: 34