This workflow corresponds to n8n.io template #4742 — we link there as the canonical source.
This workflow follows the Agent → Execute Workflow Trigger recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"id": "xAa5vBxhQzEWWFJM",
"meta": {
"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\u2705 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\u2705 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\u2705 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 Chat Model",
"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": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "7a941f53-2294-4926-957d-ee82d01e4c11",
"name": "Simple Memory",
"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 Agent",
"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### \ud83d\udd27 Connected Tools (Always Executed)\n\n#### \ud83d\udcc8 `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#### \ud83d\udcca `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#### \ud83e\uddfe `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#### \ud83d\udd70\ufe0f `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### \ud83e\udde0 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### \ud83d\udce4 Output Format (Telegram HTML)\n\nExample:\n\n```\n\ud83d\udcca BTCUSDT Market Overview\n\n\ud83d\udcb0 Price: $63,220 \n\ud83d\udcc8 24h Change: +2.3% | Volume: 45,210 BTC \n\n\ud83d\udcc9 Order Book \n\u2022 Top Bid: $63,190 \n\u2022 Top Ask: $63,230 \n\n\ud83d\udd70\ufe0f Latest Candles \n\u2022 15m: O: $63,000 | C: $63,220 | Vol: 320 BTC \n\u2022 1h : O: $62,700 | C: $63,300 | Vol: 980 BTC \n\u2022 4h : O: $61,800 | C: $63,500 | Vol: 2,410 BTC \n\u2022 1d : O: $59,200 | C: $63,220 | Vol: 7,850 BTC\n```\n\n---\n\n### \u2705 Input Expectations\n\n* Input is in natural language, e.g.:\n\n * \"What\u2019s 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 > \u201cPlease provide the token symbol (e.g., BTCUSDT).\u201d\n\n"
},
"promptType": "define"
},
"typeVersion": 1.9
},
{
"id": "f8d29f2d-5359-4dba-a99f-caaee2e44d91",
"name": "Sticky Note",
"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": "Sticky Note8",
"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": "Sticky Note2",
"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": "Sticky Note1",
"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": "Sticky Note3",
"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": "Sticky Note4",
"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": "Sticky Note5",
"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": "Sticky Note6",
"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\u2019s most recent candle.**"
},
"typeVersion": 1
},
{
"id": "9937f721-ab8e-4ef1-9809-9b146c98de1a",
"name": "Sticky Note7",
"type": "n8n-nodes-base.stickyNote",
"position": [
1240,
-1420
],
"parameters": {
"width": 1220,
"height": 2480,
"content": "# \ud83d\udcc8 Binance SM Price-24hrStats-OrderBook-Kline Tool \u2013 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## \ud83c\udfaf 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## \ud83e\udde9 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## \ud83d\udee0\ufe0f Workflow Architecture\n\n| Node | Function |\n| ------------------------------------- | -------------------------------------------------------- |\n| \u2705 `When Executed by Another Workflow` | Triggers this tool from Financial Analyst Agent |\n| \ud83e\udd16 `Binance SM Price... Agent` | Receives prompt, extracts symbol, calls all market tools |\n| \ud83d\udca1 `OpenAI Chat Model (gpt-4o-mini)` | Converts raw API output into clean Telegram summary |\n| \ud83e\udde0 `Simple Memory` | Tracks session context (`sessionId`, last-used symbol) |\n\n---\n\n## \ud83d\udce5 Expected Input\n\nThis tool is **not user-facing** \u2014 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## \ud83e\uddfe Telegram Output Example\n\n```\n\ud83d\udcca BTCUSDT Market Overview\n\n\ud83d\udcb0 Price: $63,220 \n\ud83d\udcc8 24h Change: +2.3% | Volume: 45,210 BTC \n\n\ud83d\udcc9 Order Book \n\u2022 Top Bid: $63,190 \n\u2022 Top Ask: $63,230 \n\n\ud83d\udd70\ufe0f Latest Candles \n\u2022 15m: O: $63,000 | C: $63,220 | Vol: 320 BTC \n\u2022 1h : O: $62,700 | C: $63,300 | Vol: 980 BTC \n\u2022 4h : O: $61,800 | C: $63,500 | Vol: 2,410 BTC \n\u2022 1d : O: $59,200 | C: $63,220 | Vol: 7,850 BTC\n```\n\n---\n\n## \u2705 Use Case Scenarios\n\n| Scenario | Result |\n| --------------------------------------- | ------------------------------------------------ |\n| Trader asks for \u201ccurrent BTC data\u201d | Returns full snapshot across all structure tools |\n| Analyst needs \u201ccandles for SOL\u201d | 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## \ud83d\ude80 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## \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.\nThis automation system \u2014 including prompt flow, logic architecture, and tool structure \u2014 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,
"settings": {
"executionOrder": "v1"
},
"versionId": "3c34c007-ae59-4ea9-a073-4d5ba14ba3b8",
"connections": {
"getKlines": {
"ai_tool": [
[
{
"node": "Binance SM Price-24hrStats-OrderBook-Kline Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"get24hrStats": {
"ai_tool": [
[
{
"node": "Binance SM Price-24hrStats-OrderBook-Kline Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"getOrderBook": {
"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
}
]
]
},
"getCurrentPrice": {
"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
}
]
]
},
"When Executed by Another Workflow": {
"main": [
[
{
"node": "Binance SM Price-24hrStats-OrderBook-Kline Agent",
"type": "main",
"index": 0
}
]
]
}
}
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
openAiApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
A powerful sub-agent that collects real-time market structure data from Binance for any trading pair — including price, volume, order book depth, and candlestick snapshots across multiple timeframes (15m, 1h, 4h, 1d).
Source: https://n8n.io/workflows/4742/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
Agent Access Control Template. Uses memoryBufferWindow, lmChatOpenAi, telegramTrigger, airtable. Event-driven trigger; 36 nodes.
This workflow allows granular control over the access to tools connected to AI Agents (including Multi-Agent setups) using Role Based Access Control.
Automated Research Report Generation with OpenAI, Wikipedia, Google Search, and Gmail/Telegram. Uses lmChatOpenAi, memoryBufferWindow, toolHttpRequest, agent. Event-driven trigger; 26 nodes.
This workflow automates the process of generating professional research reports for researchers, students, and professionals. It eliminates manual research and report formatting by aggregating data, g
OpenSea Marketplace Agent Tool. Uses lmChatOpenAi, memoryBufferWindow, agent, executeWorkflowTrigger. Event-driven trigger; 17 nodes.