特斯拉量化技术指标Webhooks工具 n8n
高级
这是一个Finance, AI领域的自动化工作流,包含 61 个节点。主要使用 Code, Merge, Webhook, HttpRequest, RespondToWebhook 等节点,结合人工智能技术实现智能自动化。 特斯拉量化技术指标Webhooks工具
前置要求
- •HTTP Webhook 端点(n8n 会自动生成)
- •可能需要目标 API 的认证凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "AkcTR8C45GvFGjg3",
"meta": {
"instanceId": "a5283507e1917a33cc3ae615b2e7d5ad2c1e50955e6f831272ddd5ab816f3fb6"
},
"name": "特斯拉量化技术指标 Webhooks 工具 n8n",
"tags": [],
"nodes": [
{
"id": "666ae1df-f6af-42f4-a9b9-9f065dadebf5",
"name": "MACD 15分钟",
"type": "n8n-nodes-base.httpRequest",
"position": [
520,
-2100
],
"parameters": {
"url": "https://www.alphavantage.co/query?function=MACD&symbol=TSLA&interval=15min&time_period=14&series_type=close&entitlement=delayed",
"options": {},
"authentication": "genericCredentialType",
"genericAuthType": "httpQueryAuth"
},
"credentials": {
"httpQueryAuth": {
"id": "cDmyrlGDH8qhKXPx",
"name": "Alpha Vantage Premium"
}
},
"typeVersion": 4.2
},
{
"id": "09cdc5db-985b-4383-b207-5d3a4c4c7b43",
"name": "RSI 15分钟",
"type": "n8n-nodes-base.httpRequest",
"position": [
520,
-1920
],
"parameters": {
"url": "https://www.alphavantage.co/query?function=RSI&symbol=TSLA&interval=15min&time_period=14&series_type=close&entitlement=delayed",
"options": {},
"authentication": "genericCredentialType",
"genericAuthType": "httpQueryAuth"
},
"credentials": {
"httpQueryAuth": {
"id": "cDmyrlGDH8qhKXPx",
"name": "Alpha Vantage Premium"
}
},
"typeVersion": 4.2
},
{
"id": "1900f4ee-8531-49c4-b993-c3189742631d",
"name": "布林带 15分钟",
"type": "n8n-nodes-base.httpRequest",
"position": [
520,
-1760
],
"parameters": {
"url": "https://www.alphavantage.co/query?function=BBANDS&symbol=TSLA&interval=15min&time_period=20&series_type=close&entitlement=delayed",
"options": {},
"authentication": "genericCredentialType",
"genericAuthType": "httpQueryAuth"
},
"credentials": {
"httpQueryAuth": {
"id": "cDmyrlGDH8qhKXPx",
"name": "Alpha Vantage Premium"
}
},
"typeVersion": 4.2
},
{
"id": "779b3201-bf41-45b7-b397-c7ad8da104e6",
"name": "简单移动平均线 15分钟",
"type": "n8n-nodes-base.httpRequest",
"position": [
520,
-1560
],
"parameters": {
"url": "https://www.alphavantage.co/query?function=SMA&symbol=TSLA&interval=15min&time_period=20&series_type=close&entitlement=delayed",
"options": {},
"authentication": "genericCredentialType",
"genericAuthType": "httpQueryAuth"
},
"credentials": {
"httpQueryAuth": {
"id": "cDmyrlGDH8qhKXPx",
"name": "Alpha Vantage Premium"
}
},
"typeVersion": 4.2
},
{
"id": "2ddff936-5d16-4ca3-a6e9-d2be4d1552b1",
"name": "指数移动平均线 15分钟",
"type": "n8n-nodes-base.httpRequest",
"position": [
520,
-1380
],
"parameters": {
"url": "https://www.alphavantage.co/query?function=EMA&symbol=TSLA&interval=15min&time_period=12&series_type=close&entitlement=delayed",
"options": {},
"authentication": "genericCredentialType",
"genericAuthType": "httpQueryAuth"
},
"credentials": {
"httpQueryAuth": {
"id": "cDmyrlGDH8qhKXPx",
"name": "Alpha Vantage Premium"
}
},
"typeVersion": 4.2
},
{
"id": "487ee540-198d-4067-a55c-d38cf9f8b5f9",
"name": "ADX 15分钟",
"type": "n8n-nodes-base.httpRequest",
"position": [
520,
-1180
],
"parameters": {
"url": "https://www.alphavantage.co/query?function=ADX&symbol=TSLA&interval=15min&time_period=14&series_type=close&entitlement=delayed",
"options": {},
"authentication": "genericCredentialType",
"genericAuthType": "httpQueryAuth"
},
"credentials": {
"httpQueryAuth": {
"id": "cDmyrlGDH8qhKXPx",
"name": "Alpha Vantage Premium"
}
},
"typeVersion": 4.2
},
{
"id": "4b465062-273f-4e17-9af2-e3201c43912f",
"name": "15分钟数据 Webhook",
"type": "n8n-nodes-base.webhook",
"position": [
60,
-1660
],
"webhookId": "88e83c35-bba7-4ff8-a808-9626ae04b88c",
"parameters": {
"path": "88e83c35-bba7-4ff8-a808-9626ae04b88c",
"options": {},
"responseMode": "responseNode"
},
"typeVersion": 2
},
{
"id": "7bfdce8b-119f-4d4d-9957-336ce4c82fbb",
"name": "RSI 1小时",
"type": "n8n-nodes-base.httpRequest",
"position": [
-920,
-460
],
"parameters": {
"url": "https://www.alphavantage.co/query?function=RSI&symbol=TSLA&interval=60min&time_period=14&series_type=close&entitlement=delayed",
"options": {},
"authentication": "genericCredentialType",
"genericAuthType": "httpQueryAuth"
},
"credentials": {
"httpQueryAuth": {
"id": "cDmyrlGDH8qhKXPx",
"name": "Alpha Vantage Premium"
}
},
"typeVersion": 4.2
},
{
"id": "5d4dbcb7-cd3b-48a0-a621-ccb5ab4002bb",
"name": "MACD 1小时",
"type": "n8n-nodes-base.httpRequest",
"position": [
-920,
-660
],
"parameters": {
"url": "https://www.alphavantage.co/query?function=MACD&symbol=TSLA&interval=60min&time_period=14&series_type=close&entitlement=delayed",
"options": {},
"authentication": "genericCredentialType",
"genericAuthType": "httpQueryAuth"
},
"credentials": {
"httpQueryAuth": {
"id": "cDmyrlGDH8qhKXPx",
"name": "Alpha Vantage Premium"
}
},
"typeVersion": 4.2
},
{
"id": "e0c37a9d-e724-426f-a2a1-7ff938e480a2",
"name": "布林带 1小时",
"type": "n8n-nodes-base.httpRequest",
"position": [
-920,
-260
],
"parameters": {
"url": "https://www.alphavantage.co/query?function=BBANDS&symbol=TSLA&interval=60min&time_period=14&series_type=close&entitlement=delayed",
"options": {},
"authentication": "genericCredentialType",
"genericAuthType": "httpQueryAuth"
},
"credentials": {
"httpQueryAuth": {
"id": "cDmyrlGDH8qhKXPx",
"name": "Alpha Vantage Premium"
}
},
"typeVersion": 4.2
},
{
"id": "fd9bc08f-9db4-404e-9e3d-68a56cef437f",
"name": "简单移动平均线 1小时",
"type": "n8n-nodes-base.httpRequest",
"position": [
-920,
-40
],
"parameters": {
"url": "https://www.alphavantage.co/query?function=SMA&symbol=TSLA&interval=60min&time_period=14&series_type=close&entitlement=delayed",
"options": {},
"authentication": "genericCredentialType",
"genericAuthType": "httpQueryAuth"
},
"credentials": {
"httpQueryAuth": {
"id": "cDmyrlGDH8qhKXPx",
"name": "Alpha Vantage Premium"
}
},
"typeVersion": 4.2
},
{
"id": "31489239-8fc7-47e7-94d4-8a34c24c646a",
"name": "指数移动平均线 1小时",
"type": "n8n-nodes-base.httpRequest",
"position": [
-920,
160
],
"parameters": {
"url": "https://www.alphavantage.co/query?function=EMA&symbol=TSLA&interval=60min&time_period=14&series_type=close&entitlement=delayed",
"options": {},
"authentication": "genericCredentialType",
"genericAuthType": "httpQueryAuth"
},
"credentials": {
"httpQueryAuth": {
"id": "cDmyrlGDH8qhKXPx",
"name": "Alpha Vantage Premium"
}
},
"typeVersion": 4.2
},
{
"id": "35e97546-dc5d-4c30-9b6c-f6751a24c3a7",
"name": "ADX 1小时",
"type": "n8n-nodes-base.httpRequest",
"position": [
-920,
360
],
"parameters": {
"url": "https://www.alphavantage.co/query?function=ADX&symbol=TSLA&interval=60min&time_period=14&series_type=close&entitlement=delayed",
"options": {},
"authentication": "genericCredentialType",
"genericAuthType": "httpQueryAuth"
},
"credentials": {
"httpQueryAuth": {
"id": "cDmyrlGDH8qhKXPx",
"name": "Alpha Vantage Premium"
}
},
"typeVersion": 4.2
},
{
"id": "655df5a9-0d91-41d1-bdb1-5be5cb97dce4",
"name": "1小时数据 Webhook",
"type": "n8n-nodes-base.webhook",
"position": [
-1440,
-120
],
"webhookId": "1eb54436-6511-4c6c-8d27-2a6ff8f15411",
"parameters": {
"path": "1eb54436-6511-4c6c-8d27-2a6ff8f15411",
"options": {},
"responseMode": "responseNode"
},
"typeVersion": 2
},
{
"id": "2b732a52-bfeb-486a-84ca-2ecffd6ff622",
"name": "RSI 1天",
"type": "n8n-nodes-base.httpRequest",
"position": [
2140,
-580
],
"parameters": {
"url": "https://www.alphavantage.co/query?function=RSI&symbol=TSLA&interval=daily&time_period=14&series_type=close&entitlement=delayed",
"options": {},
"authentication": "genericCredentialType",
"genericAuthType": "httpQueryAuth"
},
"credentials": {
"httpQueryAuth": {
"id": "cDmyrlGDH8qhKXPx",
"name": "Alpha Vantage Premium"
}
},
"typeVersion": 4.2
},
{
"id": "b456f6c4-bdb0-49b2-ba9e-999a3726f43b",
"name": "MACD 1天",
"type": "n8n-nodes-base.httpRequest",
"position": [
2140,
-780
],
"parameters": {
"url": "https://www.alphavantage.co/query?function=MACD&symbol=TSLA&interval=daily&time_period=14&series_type=close&entitlement=delayed",
"options": {},
"authentication": "genericCredentialType",
"genericAuthType": "httpQueryAuth"
},
"credentials": {
"httpQueryAuth": {
"id": "cDmyrlGDH8qhKXPx",
"name": "Alpha Vantage Premium"
}
},
"typeVersion": 4.2
},
{
"id": "a8e1a625-a49d-44bc-98e8-d1b3f4a57bfc",
"name": "布林带 1天",
"type": "n8n-nodes-base.httpRequest",
"position": [
2140,
-360
],
"parameters": {
"url": "https://www.alphavantage.co/query?function=BBANDS&symbol=TSLA&interval=daily&time_period=14&series_type=close&entitlement=delayed",
"options": {},
"authentication": "genericCredentialType",
"genericAuthType": "httpQueryAuth"
},
"credentials": {
"httpQueryAuth": {
"id": "cDmyrlGDH8qhKXPx",
"name": "Alpha Vantage Premium"
}
},
"typeVersion": 4.2
},
{
"id": "1ed45f01-19d5-4a1c-928a-b0f4456faece",
"name": "简单移动平均线 1天",
"type": "n8n-nodes-base.httpRequest",
"position": [
2140,
-160
],
"parameters": {
"url": "https://www.alphavantage.co/query?function=SMA&symbol=TSLA&interval=daily&time_period=14&series_type=close&entitlement=delayed",
"options": {},
"authentication": "genericCredentialType",
"genericAuthType": "httpQueryAuth"
},
"credentials": {
"httpQueryAuth": {
"id": "cDmyrlGDH8qhKXPx",
"name": "Alpha Vantage Premium"
}
},
"typeVersion": 4.2
},
{
"id": "2549b6e2-bb0e-433e-b137-f88fa21b39a9",
"name": "指数移动平均线 1天",
"type": "n8n-nodes-base.httpRequest",
"position": [
2140,
60
],
"parameters": {
"url": "https://www.alphavantage.co/query?function=EMA&symbol=TSLA&interval=daily&time_period=14&series_type=close&entitlement=delayed",
"options": {},
"authentication": "genericCredentialType",
"genericAuthType": "httpQueryAuth"
},
"credentials": {
"httpQueryAuth": {
"id": "cDmyrlGDH8qhKXPx",
"name": "Alpha Vantage Premium"
}
},
"typeVersion": 4.2
},
{
"id": "18dd8937-5936-4915-a617-18629cc32eb8",
"name": "ADX 1天",
"type": "n8n-nodes-base.httpRequest",
"position": [
2140,
280
],
"parameters": {
"url": "https://www.alphavantage.co/query?function=ADX&symbol=TSLA&interval=daily&time_period=14&series_type=close&entitlement=delayed",
"options": {},
"authentication": "genericCredentialType",
"genericAuthType": "httpQueryAuth"
},
"credentials": {
"httpQueryAuth": {
"id": "cDmyrlGDH8qhKXPx",
"name": "Alpha Vantage Premium"
}
},
"typeVersion": 4.2
},
{
"id": "f593b208-aa5e-42fc-9f7b-b3abd6472de8",
"name": "1天数据 Webhook",
"type": "n8n-nodes-base.webhook",
"position": [
1580,
-200
],
"webhookId": "65f1d0f0-b165-45e7-9a99-ceb977a9abbf",
"parameters": {
"path": "65f1d0f0-b165-45e7-9a99-ceb977a9abbf",
"options": {},
"responseMode": "responseNode"
},
"typeVersion": 2
},
{
"id": "46cd5f07-970d-42a5-b300-2cd67515be4d",
"name": "响应 Webhook 1天数据",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
3360,
-300
],
"parameters": {
"options": {},
"respondWith": "allIncomingItems"
},
"typeVersion": 1.2
},
{
"id": "86557d7b-7333-4189-9b06-5cbffd978c81",
"name": "响应 Webhook 15分钟数据",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
1740,
-1660
],
"parameters": {
"options": {},
"respondWith": "allIncomingItems"
},
"typeVersion": 1.2
},
{
"id": "82c833de-4a12-4976-b998-129465e80804",
"name": "响应 Webhook 1小时数据",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
540,
-120
],
"parameters": {
"options": {},
"respondWith": "allIncomingItems"
},
"typeVersion": 1.2
},
{
"id": "c9c62905-a5d2-4af7-bd7d-1d0310e34706",
"name": "合并 1小时指标",
"type": "n8n-nodes-base.merge",
"position": [
100,
-180
],
"parameters": {
"numberInputs": 6
},
"typeVersion": 3.1
},
{
"id": "4e2db262-5fbd-43f2-b0e8-5dfff74bd69b",
"name": "合并 15分钟指标",
"type": "n8n-nodes-base.merge",
"position": [
1420,
-1720
],
"parameters": {
"numberInputs": 6
},
"typeVersion": 3.1
},
{
"id": "32bdda97-56b4-449d-8cc0-9e56f5cb33e7",
"name": "合并 1天指标",
"type": "n8n-nodes-base.merge",
"position": [
3000,
-360
],
"parameters": {
"numberInputs": 6
},
"typeVersion": 3.1
},
{
"id": "8c0d9209-786e-4ad8-b76b-0c94a3ffa788",
"name": "格式化响应 - MACD 15分钟",
"type": "n8n-nodes-base.code",
"position": [
940,
-2100
],
"parameters": {
"jsCode": "// Get the MACD data from input\nconst raw = items[0].json;\nconst resultKey = \"Technical Analysis: MACD\";\nconst data = raw[resultKey];\n\nif (!data) {\n return [{ json: { error: \"No MACD data returned.\" } }];\n}\n\n// Extract latest 20 entries\nconst latest20 = Object.entries(data).slice(0, 20);\nconst cleaned = Object.fromEntries(latest20);\n\nreturn [{\n json: {\n indicator: \"MACD\",\n timeframe: \"15min\",\n data: cleaned\n }\n}];"
},
"typeVersion": 2
},
{
"id": "98fc07c6-d8ac-44a9-95d9-430485febca2",
"name": "格式化响应 - RSI 15分钟",
"type": "n8n-nodes-base.code",
"position": [
940,
-1920
],
"parameters": {
"jsCode": "// Extract RSI data from HTTP response\nconst raw = items[0].json;\nconst resultKey = \"Technical Analysis: RSI\";\nconst data = raw[resultKey];\n\nif (!data) {\n return [{ json: { error: \"No RSI data returned.\" } }];\n}\n\n// Trim to latest 20 points\nconst latest20 = Object.entries(data).slice(0, 20);\nconst cleaned = Object.fromEntries(latest20);\n\nreturn [{\n json: {\n indicator: \"RSI\",\n timeframe: \"15min\",\n data: cleaned\n }\n}];"
},
"typeVersion": 2
},
{
"id": "2f7d7b00-ef80-4ee4-92e8-50c1707aed0e",
"name": "格式化响应 - 布林带 15分钟",
"type": "n8n-nodes-base.code",
"position": [
940,
-1760
],
"parameters": {
"jsCode": "// Extract BBANDS data from HTTP response\nconst raw = items[0].json;\nconst resultKey = \"Technical Analysis: BBANDS\";\nconst data = raw[resultKey];\n\nif (!data) {\n return [{ json: { error: \"No BBANDS data returned.\" } }];\n}\n\n// Get the latest 20 entries\nconst latest20 = Object.entries(data).slice(0, 20);\nconst cleaned = Object.fromEntries(latest20);\n\nreturn [{\n json: {\n indicator: \"BBANDS\",\n timeframe: \"15min\",\n data: cleaned\n }\n}];"
},
"typeVersion": 2
},
{
"id": "7b214e3c-f725-48eb-98ec-799c60c08216",
"name": "格式化响应 - 简单移动平均线 15分钟",
"type": "n8n-nodes-base.code",
"position": [
940,
-1560
],
"parameters": {
"jsCode": "// Extract SMA data from HTTP response\nconst raw = items[0].json;\nconst resultKey = \"Technical Analysis: SMA\";\nconst data = raw[resultKey];\n\nif (!data) {\n return [{ json: { error: \"No SMA data returned.\" } }];\n}\n\n// Get the latest 20 entries\nconst latest20 = Object.entries(data).slice(0, 20);\nconst cleaned = Object.fromEntries(latest20);\n\nreturn [{\n json: {\n indicator: \"SMA\",\n timeframe: \"15min\",\n data: cleaned\n }\n}];"
},
"typeVersion": 2
},
{
"id": "6f202147-927e-4427-8f99-06fdec6d614d",
"name": "格式化响应 - 指数移动平均线 15分钟",
"type": "n8n-nodes-base.code",
"position": [
940,
-1380
],
"parameters": {
"jsCode": "// Extract EMA data from HTTP response\nconst raw = items[0].json;\nconst resultKey = \"Technical Analysis: EMA\";\nconst data = raw[resultKey];\n\nif (!data) {\n return [{ json: { error: \"No EMA data returned.\" } }];\n}\n\n// Get the latest 20 entries\nconst latest20 = Object.entries(data).slice(0, 20);\nconst cleaned = Object.fromEntries(latest20);\n\nreturn [{\n json: {\n indicator: \"EMA\",\n timeframe: \"15min\",\n data: cleaned\n }\n}];"
},
"typeVersion": 2
},
{
"id": "66147010-c52f-49ea-bca7-a668c38555bd",
"name": "格式化响应 - ADX 15分钟",
"type": "n8n-nodes-base.code",
"position": [
940,
-1180
],
"parameters": {
"jsCode": "// Extract ADX data from HTTP response\nconst raw = items[0].json;\nconst resultKey = \"Technical Analysis: ADX\";\nconst data = raw[resultKey];\n\nif (!data) {\n return [{ json: { error: \"No ADX data returned.\" } }];\n}\n\n// Get the latest 20 entries\nconst latest20 = Object.entries(data).slice(0, 20);\nconst cleaned = Object.fromEntries(latest20);\n\nreturn [{\n json: {\n indicator: \"ADX\",\n timeframe: \"15min\",\n data: cleaned\n }\n}];"
},
"typeVersion": 2
},
{
"id": "fe59f145-09fa-4dbc-9cf8-04b664e58259",
"name": "格式化响应 - MACD 1小时",
"type": "n8n-nodes-base.code",
"position": [
-500,
-660
],
"parameters": {
"jsCode": "// Extract MACD data from HTTP response\nconst raw = items[0].json;\nconst resultKey = \"Technical Analysis: MACD\";\nconst data = raw[resultKey];\n\nif (!data) {\n return [{ json: { error: \"No MACD data returned.\" } }];\n}\n\n// Get the latest 20 timestamp entries\nconst latest20 = Object.entries(data).slice(0, 20);\n\n// Transform into clean format\nconst cleaned = latest20.map(([timestamp, values]) => ({\n timestamp,\n macd: parseFloat(values.MACD),\n signal: parseFloat(values.MACD_Signal),\n hist: parseFloat(values.MACD_Hist)\n}));\n\nreturn [{\n json: {\n indicator: \"MACD\",\n timeframe: \"1h\",\n data: cleaned\n }\n}];"
},
"typeVersion": 2
},
{
"id": "9e70c5aa-7b6a-4604-bf35-deaafcb31851",
"name": "格式化响应 - RSI 1小时",
"type": "n8n-nodes-base.code",
"position": [
-500,
-460
],
"parameters": {
"jsCode": "// Extract RSI data from HTTP response\nconst raw = items[0].json;\nconst resultKey = \"Technical Analysis: RSI\";\nconst data = raw[resultKey];\n\nif (!data) {\n return [{ json: { error: \"No RSI data returned.\" } }];\n}\n\n// Take latest 20 entries\nconst latest20 = Object.entries(data).slice(0, 20);\n\n// Format into simplified array\nconst cleaned = latest20.map(([timestamp, value]) => ({\n timestamp,\n rsi: parseFloat(value.RSI)\n}));\n\nreturn [{\n json: {\n indicator: \"RSI\",\n timeframe: \"1h\",\n data: cleaned\n }\n}];"
},
"typeVersion": 2
},
{
"id": "8647d17c-d2e7-4aaf-a94d-452a7830fe2a",
"name": "格式化响应 - 布林带 1小时",
"type": "n8n-nodes-base.code",
"position": [
-500,
-260
],
"parameters": {
"jsCode": "const resultKey = 'Technical Analysis: BBANDS';\nconst raw = $json; // This captures the output of the HTTP node\nconst data = raw[resultKey];\n\nif (!data) {\n return [{ json: { error: `No BBANDS data returned from Alpha Vantage.` } }];\n}\n\n// Extract the latest 20 entries\nconst latest20 = Object.entries(data).slice(0, 20);\n\n// Format each entry cleanly\nconst cleaned = latest20.map(([timestamp, value]) => ({\n timestamp,\n upper: parseFloat(value['Real Upper Band']),\n middle: parseFloat(value['Real Middle Band']),\n lower: parseFloat(value['Real Lower Band']),\n}));\n\nreturn [{\n json: {\n indicator: 'BBANDS',\n timeframe: '1h',\n data: cleaned\n }\n}];"
},
"typeVersion": 2
},
{
"id": "3f3a85aa-409c-4252-8e68-5e9cc1247b0b",
"name": "格式化响应 - 简单移动平均线 1小时",
"type": "n8n-nodes-base.code",
"position": [
-500,
-40
],
"parameters": {
"jsCode": "const resultKey = 'Technical Analysis: SMA';\nconst raw = $json;\nconst data = raw[resultKey];\n\nif (!data) {\n return [{ json: { error: `No SMA data returned from Alpha Vantage.` } }];\n}\n\n// Extract the latest 20 entries\nconst latest20 = Object.entries(data).slice(0, 20);\n\n// Format each entry cleanly\nconst cleaned = latest20.map(([timestamp, value]) => ({\n timestamp,\n value: parseFloat(value['SMA']),\n}));\n\nreturn [{\n json: {\n indicator: 'SMA',\n timeframe: '1h',\n data: cleaned\n }\n}];"
},
"typeVersion": 2
},
{
"id": "f6ae58f3-aad7-4d19-82d6-0e56339eb9ac",
"name": "格式化响应 - 指数移动平均线 1小时",
"type": "n8n-nodes-base.code",
"position": [
-500,
160
],
"parameters": {
"jsCode": "const resultKey = 'Technical Analysis: EMA';\nconst raw = $json;\nconst data = raw[resultKey];\n\nif (!data) {\n return [{ json: { error: `No EMA data returned from Alpha Vantage.` } }];\n}\n\n// Extract the latest 20 entries\nconst latest20 = Object.entries(data).slice(0, 20);\n\n// Format each entry cleanly\nconst cleaned = latest20.map(([timestamp, value]) => ({\n timestamp,\n value: parseFloat(value['EMA']),\n}));\n\nreturn [{\n json: {\n indicator: 'EMA',\n timeframe: '1h',\n data: cleaned\n }\n}];"
},
"typeVersion": 2
},
{
"id": "67ff1f40-6e8f-4cd4-a67b-898687f56e54",
"name": "格式化响应 - ADX 1小时",
"type": "n8n-nodes-base.code",
"position": [
-500,
360
],
"parameters": {
"jsCode": "const resultKey = 'Technical Analysis: ADX';\nconst raw = $json;\nconst data = raw[resultKey];\n\nif (!data) {\n return [{ json: { error: `No ADX data returned from Alpha Vantage.` } }];\n}\n\n// Extract the latest 20 entries\nconst latest20 = Object.entries(data).slice(0, 20);\n\n// Format each entry cleanly\nconst cleaned = latest20.map(([timestamp, value]) => ({\n timestamp,\n value: parseFloat(value['ADX']),\n}));\n\nreturn [{\n json: {\n indicator: 'ADX',\n timeframe: '1h',\n data: cleaned\n }\n}];"
},
"typeVersion": 2
},
{
"id": "656ab57a-e8f6-48cc-8ebd-3ffe869eefbd",
"name": "格式化响应 - MACD 1天",
"type": "n8n-nodes-base.code",
"position": [
2520,
-780
],
"parameters": {
"jsCode": "const resultKey = 'Technical Analysis: MACD';\nconst raw = $json;\nconst data = raw[resultKey];\n\nif (!data) {\n return [{ json: { error: `No MACD data returned from Alpha Vantage.` } }];\n}\n\n// Extract the latest 20 entries\nconst latest20 = Object.entries(data).slice(0, 20);\n\n// Format each entry cleanly\nconst cleaned = latest20.map(([timestamp, value]) => ({\n timestamp,\n macd: parseFloat(value.MACD),\n macdSignal: parseFloat(value.MACD_Signal),\n macdHist: parseFloat(value.MACD_Hist),\n}));\n\nreturn [{\n json: {\n indicator: 'MACD',\n timeframe: '1d',\n data: cleaned\n }\n}];"
},
"typeVersion": 2
},
{
"id": "eebab549-07fc-474c-86ae-bd39651cf3c3",
"name": "格式化响应 - RSI 1天",
"type": "n8n-nodes-base.code",
"position": [
2520,
-580
],
"parameters": {
"jsCode": "const resultKey = 'Technical Analysis: RSI';\nconst raw = $json;\nconst data = raw[resultKey];\n\nif (!data) {\n return [{ json: { error: 'No RSI data returned from Alpha Vantage.' } }];\n}\n\n// Extract the latest 20 entries\nconst latest20 = Object.entries(data).slice(0, 20);\n\n// Format each entry\nconst cleaned = latest20.map(([timestamp, value]) => ({\n timestamp,\n rsi: parseFloat(value.RSI),\n}));\n\nreturn [{\n json: {\n indicator: 'RSI',\n timeframe: '1d',\n data: cleaned\n }\n}];"
},
"typeVersion": 2
},
{
"id": "66755c9a-c829-42ef-8b3a-3fa4df8d2a6e",
"name": "格式化响应 - 布林带 1天",
"type": "n8n-nodes-base.code",
"position": [
2520,
-360
],
"parameters": {
"jsCode": "const raw = $json[\"Technical Analysis: BBANDS\"];\n\nif (!raw) {\n return [{ json: { error: \"No BBANDS data returned from Alpha Vantage.\" } }];\n}\n\nconst latest20 = Object.entries(raw).slice(0, 20);\n\nconst cleaned = latest20.map(([timestamp, value]) => ({\n timestamp,\n upper: parseFloat(value[\"Real Upper Band\"]) || null,\n middle: parseFloat(value[\"Real Middle Band\"]) || null,\n lower: parseFloat(value[\"Real Lower Band\"]) || null,\n}));\n\nreturn [{\n json: {\n indicator: \"BBANDS\",\n timeframe: \"1d\",\n data: cleaned\n }\n}];"
},
"typeVersion": 2
},
{
"id": "2c21751d-a91c-4d35-bb26-9170e14c25aa",
"name": "格式化响应 - 简单移动平均线 1天",
"type": "n8n-nodes-base.code",
"position": [
2520,
-160
],
"parameters": {
"jsCode": "const raw = $json[\"Technical Analysis: SMA\"];\n\nif (!raw) {\n return [{ json: { error: \"No SMA data returned from Alpha Vantage.\" } }];\n}\n\n// Get the latest 20 data points\nconst latest20 = Object.entries(raw).slice(0, 20);\n\n// Clean and format each entry\nconst cleaned = latest20.map(([timestamp, value]) => ({\n timestamp,\n sma: parseFloat(value.SMA) || null\n}));\n\nreturn [{\n json: {\n indicator: \"SMA\",\n timeframe: \"1d\",\n data: cleaned\n }\n}];"
},
"typeVersion": 2
},
{
"id": "e50c1d0b-e5f0-4622-a350-1843c4fea180",
"name": "格式化响应 - 指数移动平均线 1天",
"type": "n8n-nodes-base.code",
"position": [
2520,
60
],
"parameters": {
"jsCode": "const raw = $json[\"Technical Analysis: EMA\"];\n\nif (!raw) {\n return [{ json: { error: \"No EMA data returned from Alpha Vantage.\" } }];\n}\n\n// Extract and clean last 20 entries\nconst latest20 = Object.entries(raw).slice(0, 20);\n\nconst cleaned = latest20.map(([timestamp, value]) => ({\n timestamp,\n ema: parseFloat(value.EMA) || null\n}));\n\nreturn [{\n json: {\n indicator: \"EMA\",\n timeframe: \"1d\",\n data: cleaned\n }\n}];"
},
"typeVersion": 2
},
{
"id": "d620600d-1450-4aec-ac38-3bff733eacf6",
"name": "格式化响应 - ADX 1天",
"type": "n8n-nodes-base.code",
"position": [
2520,
280
],
"parameters": {
"jsCode": "const raw = $json[\"Technical Analysis: ADX\"];\n\nif (!raw) {\n return [{ json: { error: \"No ADX data returned from Alpha Vantage.\" } }];\n}\n\nconst latest20 = Object.entries(raw).slice(0, 20);\n\nconst cleaned = latest20.map(([timestamp, value]) => ({\n timestamp,\n adx: parseFloat(value.ADX) || null\n}));\n\nreturn [{\n json: {\n indicator: \"ADX\",\n timeframe: \"1d\",\n data: cleaned\n }\n}];"
},
"typeVersion": 2
},
{
"id": "7e58c620-1988-4ae7-89ca-55d7b201c842",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
1500,
-700
],
"parameters": {
"color": 4,
"height": 700,
"content": "## Webhooks (1天数据)"
},
"typeVersion": 1
},
{
"id": "37c8a591-5aa1-49b2-bd87-0efdbba4aa62",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
0,
-2160
],
"parameters": {
"color": 4,
"height": 680,
"content": "## Webhooks (15分钟数据)"
},
"typeVersion": 1
},
{
"id": "e2df7338-6357-4908-8c16-48dcfed20963",
"name": "便签2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1520,
-620
],
"parameters": {
"color": 4,
"height": 680,
"content": "## Webhooks (1小时数据)"
},
"typeVersion": 1
},
{
"id": "f4046d64-d579-4c19-b596-c2d535dddf4f",
"name": "便签3",
"type": "n8n-nodes-base.stickyNote",
"position": [
460,
-580
],
"parameters": {
"color": 4,
"width": 260,
"height": 640,
"content": "## Webhooks 响应 (1小时数据)"
},
"typeVersion": 1
},
{
"id": "f4c94214-345e-45fc-acd4-8f3a691badf6",
"name": "便签4",
"type": "n8n-nodes-base.stickyNote",
"position": [
1660,
-2100
],
"parameters": {
"color": 4,
"width": 280,
"height": 640,
"content": "## Webhooks 响应 (15分钟数据)"
},
"typeVersion": 1
},
{
"id": "4c1b8bef-f190-48e9-bc53-25638296ff77",
"name": "便签5",
"type": "n8n-nodes-base.stickyNote",
"position": [
3280,
-760
],
"parameters": {
"color": 4,
"width": 260,
"height": 660,
"content": "## Webhooks 响应 (1天数据)"
},
"typeVersion": 1
},
{
"id": "48955bf1-2028-41b0-95ce-b2295336fe7f",
"name": "便签6",
"type": "n8n-nodes-base.stickyNote",
"position": [
2060,
-1380
],
"parameters": {
"color": 6,
"width": 260,
"height": 1900,
"content": "## Alpha Vantage API 调用 1天"
},
"typeVersion": 1
},
{
"id": "4d640d80-7359-4c9d-99a1-f1a3ec49aa73",
"name": "便签7",
"type": "n8n-nodes-base.stickyNote",
"position": [
2440,
-1380
],
"parameters": {
"color": 2,
"width": 260,
"height": 1900,
"content": "## 格式化响应节点 (JSON 清理器)"
},
"typeVersion": 1
},
{
"id": "384390dd-7fb7-46d6-96de-b3cf1e94023b",
"name": "便签8",
"type": "n8n-nodes-base.stickyNote",
"position": [
440,
-2680
],
"parameters": {
"color": 6,
"width": 260,
"height": 1760,
"content": "## Alpha Vantage API 调用 15分钟"
},
"typeVersion": 1
},
{
"id": "45e8abfd-1612-4569-843b-d0e5aab87815",
"name": "便签9",
"type": "n8n-nodes-base.stickyNote",
"position": [
860,
-2680
],
"parameters": {
"color": 2,
"width": 260,
"height": 1760,
"content": "## 格式化响应节点 (JSON 清理器)"
},
"typeVersion": 1
},
{
"id": "dba61599-047c-45e1-8dff-72d2fca3cd6b",
"name": "便签10",
"type": "n8n-nodes-base.stickyNote",
"position": [
-580,
-1260
],
"parameters": {
"color": 2,
"width": 260,
"height": 1860,
"content": "## 格式化响应节点 (JSON 清理器)"
},
"typeVersion": 1
},
{
"id": "845c6359-0e9e-438f-bbdb-3566dee64c94",
"name": "便利贴11",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1000,
-1260
],
"parameters": {
"color": 6,
"width": 260,
"height": 1860,
"content": "## Alpha Vantage API 调用 1小时"
},
"typeVersion": 1
},
{
"id": "a55c9d0b-e45f-4012-8e59-8236a033f8cb",
"name": "便利贴12",
"type": "n8n-nodes-base.stickyNote",
"position": [
1340,
-1980
],
"parameters": {
"color": 5,
"width": 260,
"height": 620,
"content": "## 技术指标 API 合并"
},
"typeVersion": 1
},
{
"id": "a74523af-432b-4ee9-8e40-8c5846c8f6af",
"name": "便签13",
"type": "n8n-nodes-base.stickyNote",
"position": [
20,
-440
],
"parameters": {
"color": 5,
"width": 260,
"height": 620,
"content": "## 技术指标 API 合并"
},
"typeVersion": 1
},
{
"id": "634cf6ed-2231-4f99-bc1b-7dbe92d9a1d3",
"name": "便签14",
"type": "n8n-nodes-base.stickyNote",
"position": [
2920,
-660
],
"parameters": {
"color": 5,
"width": 260,
"height": 660,
"content": "## 技术指标 API 合并"
},
"typeVersion": 1
},
{
"id": "bf8ac533-da8a-4e8e-a3cb-5f89d8c85e1f",
"name": "便签15",
"type": "n8n-nodes-base.stickyNote",
"position": [
3700,
-2000
],
"parameters": {
"width": 1800,
"height": 2520,
"content": "## 📘 特斯拉量化技术指标 Webhooks 工具"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "5492ea23-51d6-4c57-bccf-786739f5f4b0",
"connections": {
"ADX 1day": {
"main": [
[
{
"node": "Format Response - ADX 1day",
"type": "main",
"index": 0
}
]
]
},
"EMA 1day": {
"main": [
[
{
"node": "Format Response - EMA 1day",
"type": "main",
"index": 0
}
]
]
},
"RSI 1day": {
"main": [
[
{
"node": "Format Response - RSI 1day",
"type": "main",
"index": 0
}
]
]
},
"SMA 1day": {
"main": [
[
{
"node": "Format Response - SMA 1day",
"type": "main",
"index": 0
}
]
]
},
"ADX 15min": {
"main": [
[
{
"node": "Format Response - ADX 15min",
"type": "main",
"index": 0
}
]
]
},
"ADX 1hour": {
"main": [
[
{
"node": "Format Response - ADX 1hour",
"type": "main",
"index": 0
}
]
]
},
"EMA 15min": {
"main": [
[
{
"node": "Format Response - EMA 15min",
"type": "main",
"index": 0
}
]
]
},
"EMA 1hour": {
"main": [
[
{
"node": "Format Response - EMA 1hour",
"type": "main",
"index": 0
}
]
]
},
"MACD 1day": {
"main": [
[
{
"node": "Format Response - MACD 1day",
"type": "main",
"index": 0
}
]
]
},
"RSI 15min": {
"main": [
[
{
"node": "Format Response - RSI 15min",
"type": "main",
"index": 0
}
]
]
},
"RSI 1hour": {
"main": [
[
{
"node": "Format Response - RSI 1hour",
"type": "main",
"index": 0
}
]
]
},
"SMA 15min": {
"main": [
[
{
"node": "Format Response - SMA 15min",
"type": "main",
"index": 0
}
]
]
},
"SMA 1hour": {
"main": [
[
{
"node": "Format Response - SMA 1hour",
"type": "main",
"index": 0
}
]
]
},
"MACD 15min": {
"main": [
[
{
"node": "Format Response - MACD 15min",
"type": "main",
"index": 0
}
]
]
},
"MACD 1hour": {
"main": [
[
{
"node": "Format Response - MACD 1hour",
"type": "main",
"index": 0
}
]
]
},
"BBands 1day": {
"main": [
[
{
"node": "Format Response - BBANDS 1day",
"type": "main",
"index": 0
}
]
]
},
"BBands 15min": {
"main": [
[
{
"node": "Format Response - BBANDS 15min",
"type": "main",
"index": 0
}
]
]
},
"BBands 1hour": {
"main": [
[
{
"node": "Format Response - BBANDS 1hour",
"type": "main",
"index": 0
}
]
]
},
"1day Data Webhook": {
"main": [
[
{
"node": "MACD 1day",
"type": "main",
"index": 0
},
{
"node": "RSI 1day",
"type": "main",
"index": 0
},
{
"node": "BBands 1day",
"type": "main",
"index": 0
},
{
"node": "SMA 1day",
"type": "main",
"index": 0
},
{
"node": "EMA 1day",
"type": "main",
"index": 0
},
{
"node": "ADX 1day",
"type": "main",
"index": 0
}
]
]
},
"15min Data Webhook": {
"main": [
[
{
"node": "MACD 15min",
"type": "main",
"index": 0
},
{
"node": "RSI 15min",
"type": "main",
"index": 0
},
{
"node": "BBands 15min",
"type": "main",
"index": 0
},
{
"node": "SMA 15min",
"type": "main",
"index": 0
},
{
"node": "EMA 15min",
"type": "main",
"index": 0
},
{
"node": "ADX 15min",
"type": "main",
"index": 0
}
]
]
},
"1hour Data Webhook": {
"main": [
[
{
"node": "MACD 1hour",
"type": "main",
"index": 0
},
{
"node": "RSI 1hour",
"type": "main",
"index": 0
},
{
"node": "BBands 1hour",
"type": "main",
"index": 0
},
{
"node": "SMA 1hour",
"type": "main",
"index": 0
},
{
"node": "EMA 1hour",
"type": "main",
"index": 0
},
{
"node": "ADX 1hour",
"type": "main",
"index": 0
}
]
]
},
"Merge 1day Indicators": {
"main": [
[
{
"node": "Respond to Webhook 1day Data",
"type": "main",
"index": 0
}
]
]
},
"Merge 1hour Indicators": {
"main": [
[
{
"node": "Respond to Webhook 1hour Data",
"type": "main",
"index": 0
}
]
]
},
"Merge 15 min Indicators": {
"main": [
[
{
"node": "Respond to Webhook 15min Data",
"type": "main",
"index": 0
}
]
]
},
"Format Response - ADX 1day": {
"main": [
[
{
"node": "Merge 1day Indicators",
"type": "main",
"index": 5
}
]
]
},
"Format Response - EMA 1day": {
"main": [
[
{
"node": "Merge 1day Indicators",
"type": "main",
"index": 4
}
]
]
},
"Format Response - RSI 1day": {
"main": [
[
{
"node": "Merge 1day Indicators",
"type": "main",
"index": 1
}
]
]
},
"Format Response - SMA 1day": {
"main": [
[
{
"node": "Merge 1day Indicators",
"type": "main",
"index": 3
}
]
]
},
"Format Response - ADX 15min": {
"main": [
[
{
"node": "Merge 15 min Indicators",
"type": "main",
"index": 5
}
]
]
},
"Format Response - ADX 1hour": {
"main": [
[
{
"node": "Merge 1hour Indicators",
"type": "main",
"index": 5
}
]
]
},
"Format Response - EMA 15min": {
"main": [
[
{
"node": "Merge 15 min Indicators",
"type": "main",
"index": 4
}
]
]
},
"Format Response - EMA 1hour": {
"main": [
[
{
"node": "Merge 1hour Indicators",
"type": "main",
"index": 4
}
]
]
},
"Format Response - MACD 1day": {
"main": [
[
{
"node": "Merge 1day Indicators",
"type": "main",
"index": 0
}
]
]
},
"Format Response - RSI 15min": {
"main": [
[
{
"node": "Merge 15 min Indicators",
"type": "main",
"index": 1
}
]
]
},
"Format Response - RSI 1hour": {
"main": [
[
{
"node": "Merge 1hour Indicators",
"type": "main",
"index": 1
}
]
]
},
"Format Response - SMA 15min": {
"main": [
[
{
"node": "Merge 15 min Indicators",
"type": "main",
"index": 3
}
]
]
},
"Format Response - SMA 1hour": {
"main": [
[
{
"node": "Merge 1hour Indicators",
"type": "main",
"index": 3
}
]
]
},
"Format Response - MACD 15min": {
"main": [
[
{
"node": "Merge 15 min Indicators",
"type": "main",
"index": 0
}
]
]
},
"Format Response - MACD 1hour": {
"main": [
[
{
"node": "Merge 1hour Indicators",
"type": "main",
"index": 0
}
]
]
},
"Format Response - BBANDS 1day": {
"main": [
[
{
"node": "Merge 1day Indicators",
"type": "main",
"index": 2
}
]
]
},
"Format Response - BBANDS 15min": {
"main": [
[
{
"node": "Merge 15 min Indicators",
"type": "main",
"index": 2
}
]
]
},
"Format Response - BBANDS 1hour": {
"main": [
[
{
"node": "Merge 1hour Indicators",
"type": "main",
"index": 2
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
高级 - 财务, 人工智能
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
币安技术指标 Webhook 工具
币安技术指标 Webhook 工具
Code
Merge
Webhook
+3
69 节点Don Jayamaha Jr
财务
Binance SM 新闻和情绪分析师 Webhook 工具
使用GPT-4o和Telegram警报分析任何代币的加密货币新闻情绪
Set
Code
Merge
+7
28 节点Don Jayamaha Jr
财务
加密货币新闻与情绪分析
通过Telegram使用GPT-4o进行实时加密货币新闻与情绪分析
Set
Code
Merge
+7
30 节点Don Jayamaha Jr
财务
ERPNext AI候选人筛选自动化
ERPNext的AI驱动候选人筛选自动化
If
Set
Code
+11
39 节点Amjid Ali
财务
使用Gmail、OpenAI和Google Drive提取和分类发票与收据
使用Gmail、OpenAI和Google Drive提取和分类发票与收据
If
Set
Code
+10
20 节点Tom
财务
Yookassa支付处理
使用YooKassa和Google表格进行支付处理与订单跟踪
If
Set
Code
+7
44 节点Sergey Skorobogatov
财务
工作流信息
难度等级
高级
节点数量61
分类2
节点类型6
作者
Don Jayamaha Jr
@don-the-gem-dealerWith 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 查看 →
分享此工作流