SOL/USDT Multi-Timeframe-AI-Marktanalysator und Handelssystem (mit Telegram-Genehmigung)

Experte

Dies ist ein Crypto Trading, AI Summarization-Bereich Automatisierungsworkflow mit 56 Nodes. Hauptsächlich werden If, Code, Wait, Merge, Telegram und andere Nodes verwendet. Automatisierung von Solana-Handels mit Gemini AI, multipler Zeitrahmen-Analyse und AFK Crypto

Voraussetzungen
  • Telegram Bot Token
  • Möglicherweise sind Ziel-API-Anmeldedaten erforderlich
  • Google Gemini API Key
Workflow-Vorschau
Visualisierung der Node-Verbindungen, mit Zoom und Pan
Workflow exportieren
Kopieren Sie die folgende JSON-Konfiguration und importieren Sie sie in n8n
{
  "id": "TDhvdJh7HyOMRo6k",
  "meta": {
    "instanceId": "c4eae34af81eeff658410c97c38d8a485e4c73ba5cea5b25eef189aa5e5a73b9",
    "templateCredsSetupCompleted": true
  },
  "name": "SOL/USDT Multi-Timeframe AI Market Analyzer and Trader with Telegram Approval",
  "tags": [],
  "nodes": [
    {
      "id": "63af3727-3774-4117-ba4d-6d28e0ff3c92",
      "name": "Transkribieren",
      "type": "n8n-nodes-base.code",
      "position": [
        672,
        -192
      ],
      "parameters": {
        "jsCode": "return {\n  json: {\n    symbol: \"SOLUSDT\",\n    price: $node[\"Fetch_1m\"].json.Data.Data.slice(-1)[0].close,\n    data_1m: $node[\"Fetch_1m\"].json.Data.Data,\n    data_5m: $node[\"Fetch_5m\"].json.Data.Data,\n    data_1h: $node[\"Fetch_1h\"].json.Data.Data\n  }\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "26be9798-3f0c-4086-8a53-a07d516c7ad8",
      "name": "Zusammenführen",
      "type": "n8n-nodes-base.merge",
      "position": [
        448,
        -208
      ],
      "parameters": {
        "numberInputs": 3
      },
      "typeVersion": 3.2
    },
    {
      "id": "2567ad21-a7e9-42d8-9fa9-a1c9ba6f223c",
      "name": "Abrufen_1m",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        224,
        -384
      ],
      "parameters": {
        "url": "https://min-api.cryptocompare.com/data/v2/histominute?fsym=SOL&tsym=USDT&limit=60",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "5e067079-4be8-444d-a35e-e8aa193cf533",
      "name": "Abrufen_5m",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        224,
        -192
      ],
      "parameters": {
        "url": "https://min-api.cryptocompare.com/data/v2/histominute?fsym=SOL&tsym=USDT&limit=60&aggregate=5",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "b02873ec-79b0-4488-82aa-2d605d107d0a",
      "name": "Abrufen_1h",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        224,
        0
      ],
      "parameters": {
        "url": "https://min-api.cryptocompare.com/data/v2/histohour?fsym=SOL&tsym=USDT&limit=60",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "590d5cfa-b7f3-43a2-8487-e3ff18fb044b",
      "name": "KI-Ausgabe parsen",
      "type": "n8n-nodes-base.code",
      "position": [
        1472,
        -192
      ],
      "parameters": {
        "jsCode": "// 1️⃣ Get raw text from AI Agent output\nconst rawOutput = $node[\"AI Agent\"].json.output;\n\n// 2️⃣ Validate that something exists\nif (!rawOutput) {\n  throw new Error(\"AI Agent output is empty or undefined.\");\n}\n\n// 3️⃣ Extract the JSON portion between ```json ... ```\nconst jsonMatch = rawOutput.match(/```json([\\s\\S]*?)```/);\n\nif (!jsonMatch) {\n  throw new Error(\"No valid JSON found in AI Agent output. Make sure the AI returns data inside ```json ... ```\");\n}\n\n// 4️⃣ Parse the extracted JSON content\nlet parsedData;\ntry {\n  parsedData = JSON.parse(jsonMatch[1].trim());\n} catch (err) {\n  throw new Error(\"Failed to parse JSON from AI Agent output: \" + err.message);\n}\n\n// 5️⃣ Return as parsed object for downstream nodes (e.g., Telegram)\nreturn [parsedData];"
      },
      "typeVersion": 2
    },
    {
      "id": "59b2ec89-e7f6-4dfc-a016-60a5b8ed9a97",
      "name": "Textnachricht senden",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1696,
        -192
      ],
      "webhookId": "1a1dfa33-b29d-4bea-baac-9a49a5f2d21b",
      "parameters": {
        "text": "=📊 *Multi-Timeframe Analysis*\n\n💲 *Symbol*: {{ $json.symbol }}\n💰 *Current Price*: ${{ $('Transcribe').item.json.price }}\n\n━━━━━━━━━━━━━━\n🕐 *1-Minute Analysis*\n• *Price Momentum:* {{ $json.analysis['1m'].price_momentum }}\n• *Volume Patterns:* {{ $json.analysis['1m'].volume_patterns }}\n• *Support/Resistance:* {{ $json.analysis['1m'].support_resistance }}\n• *Trend Direction:* {{ $json.analysis['1m'].trend_direction }}\n• *Moving Averages:* {{ $json.analysis['1m'].moving_averages }}\n• *Momentum Indicators:* {{ $json.analysis['1m'].momentum_indicators }}\n• *Volatility:* {{ $json.analysis['1m'].volatility }}\n\n",
        "chatId": "CHAT_ID",
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "id": "P5PVPL3oGa7q3l59",
          "name": "Telegram account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "c3841dcf-b7d3-4bc0-9ff7-9179b1b76ef9",
      "name": "Stündlich",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -16,
        -192
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours"
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "b3e4d111-b90b-45fd-b275-1c0659979b76",
      "name": "Wenn",
      "type": "n8n-nodes-base.if",
      "position": [
        2816,
        -288
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "or",
          "conditions": [
            {
              "id": "74e970ea-4d82-4266-86f1-8cf0d3fb2fe9",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $('Parse AI Output').item.json.trading_recommendation.action }}{{ $('Parse AI Output').item.json.analysis.trading_recommendation.action }}",
              "rightValue": "LONG"
            },
            {
              "id": "a383d2f6-bfe7-4c11-81a8-ebc13b31ec05",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $('Parse AI Output').item.json.trading_recommendation.action }}{{ $('Parse AI Output').item.json.analysis.trading_recommendation.action }}",
              "rightValue": "Buy"
            },
            {
              "id": "4c2ac1da-631e-410a-8daa-f66d516e6024",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $('Parse AI Output').item.json.trading_recommendation.action }}{{ $('Parse AI Output').item.json.analysis.trading_recommendation.action }}",
              "rightValue": "Long"
            },
            {
              "id": "3be4941c-75dc-4c79-bc19-dd94957b12c8",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $('Parse AI Output').item.json.trading_recommendation.action }}{{ $('Parse AI Output').item.json.analysis.trading_recommendation.action }}",
              "rightValue": "buy"
            },
            {
              "id": "c9a6d9ea-1649-44fe-b99b-244ab1d96176",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $('Parse AI Output').item.json.trading_recommendation.action }}{{ $('Parse AI Output').item.json.analysis.trading_recommendation.action }}",
              "rightValue": "long"
            },
            {
              "id": "ba701b46-5b73-4e38-8af4-7f83d2a26fbf",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $('Parse AI Output').item.json.trading_recommendation.action }}{{ $('Parse AI Output').item.json.analysis.trading_recommendation.action }}",
              "rightValue": "Buy (Long)"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "c30d5737-0aa0-4362-8b29-a0fe4e81df85",
      "name": "Wenn1",
      "type": "n8n-nodes-base.if",
      "position": [
        3040,
        -80
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "or",
          "conditions": [
            {
              "id": "85750594-99d7-4aca-88e5-90bf5ba8575d",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $('Parse AI Output').item.json.trading_recommendation.action }}{{ $('Parse AI Output').item.json.analysis.trading_recommendation.action }}",
              "rightValue": "SHORT"
            },
            {
              "id": "c3e9608a-7840-4c35-9d36-01755a6f4aa0",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $('Parse AI Output').item.json.trading_recommendation.action }}{{ $('Parse AI Output').item.json.analysis.trading_recommendation.action }}",
              "rightValue": "Sell"
            },
            {
              "id": "a7f4868b-2f3f-4587-9946-e6e21b1a9788",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $('Parse AI Output').item.json.trading_recommendation.action }}{{ $('Parse AI Output').item.json.analysis.trading_recommendation.action }}",
              "rightValue": "Short"
            },
            {
              "id": "bb80da00-3211-4ea4-8069-17ef42819de7",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $('Parse AI Output').item.json.trading_recommendation.action }}{{ $('Parse AI Output').item.json.analysis.trading_recommendation.action }}",
              "rightValue": "sell"
            },
            {
              "id": "bbf716e4-1557-4543-b75f-d31c22fdb342",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $('Parse AI Output').item.json.trading_recommendation.action }}{{ $('Parse AI Output').item.json.analysis.trading_recommendation.action }}",
              "rightValue": "short"
            },
            {
              "id": "e7426c1d-81b3-4ccf-87d5-211eafb98cb6",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $('Parse AI Output').item.json.trading_recommendation.action }}{{ $('Parse AI Output').item.json.analysis.trading_recommendation.action }}",
              "rightValue": "Sell (Short)"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "8b7240b6-81bc-43cf-9231-b7a9771ca35a",
      "name": "Wallet-Guthaben abfragen",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        912,
        -192
      ],
      "parameters": {
        "url": "https://api.afkcrypto.com/v1/wallets/balances?chain=solana",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "nnx8yhW5BkW736Dl",
          "name": "AFK_Crypto_API_Key"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "a4dc8e55-4ffb-436c-9fe6-80c8b2d29c1b",
      "name": "Kaufbestätigung",
      "type": "n8n-nodes-base.telegram",
      "position": [
        3264,
        -608
      ],
      "webhookId": "37bc8b4b-c462-481b-b231-9e592305ade6",
      "parameters": {
        "text": "=✅ Successful\n\nPair: SOL/USDT\nAction: {{ $('Parse AI Output').item.json.trading_recommendation.action }}{{ $('Parse AI Output').item.json.analysis.trading_recommendation.action }}\nAmount: {{ $('Parse AI Output').item.json.trading_recommendation.position_amount }}{{ $('Parse AI Output').item.json.analysis.trading_recommendation.position_amount }}\nHash: {{ $json.hash }}\nDate: {{ $now }}",
        "chatId": "CHAT_ID",
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "id": "P5PVPL3oGa7q3l59",
          "name": "Telegram account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "926d8714-72c4-412b-ad4b-9318ea4c233f",
      "name": "Verkaufsbestätigung",
      "type": "n8n-nodes-base.telegram",
      "position": [
        3488,
        -176
      ],
      "webhookId": "47c5fab0-50c2-42c7-9ae3-d277fe55cba8",
      "parameters": {
        "text": "=☑️ Successful\n\nPair: SOL/USDT\nAction: {{ $('Parse AI Output').item.json.trading_recommendation.action }}{{ $('Parse AI Output').item.json.analysis.trading_recommendation.action }}\nAmount: {{ $('Parse AI Output').item.json.trading_recommendation.position_amount }}{{ $('Parse AI Output').item.json.analysis.trading_recommendation.position_amount }}\nHash: {{ $json.hash }}\nDate: {{ $now }}",
        "chatId": "CHAT_ID",
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "id": "P5PVPL3oGa7q3l59",
          "name": "Telegram account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "8e83181b-4229-4766-8616-addaa9e8e56c",
      "name": "Wenn2",
      "type": "n8n-nodes-base.if",
      "position": [
        4160,
        -672
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "fc37abe0-9ce2-46f2-9671-e41eff7b10c9",
              "operator": {
                "type": "number",
                "operation": "gte"
              },
              "leftValue": "={{ $json.price }}",
              "rightValue": "={{ $('Parse AI Output').item.json.analysis.trading_recommendation.take_profit.tp1 }}{{ $('Parse AI Output').item.json.trading_recommendation.take_profit.tp1 }}"
            }
          ]
        },
        "looseTypeValidation": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "eef75327-e40b-4846-b3a8-b935297b5094",
      "name": "Textnachricht senden2",
      "type": "n8n-nodes-base.telegram",
      "position": [
        3264,
        32
      ],
      "webhookId": "b1b16336-a2cc-444e-8bf7-d79577711dce",
      "parameters": {
        "text": "🔔 No transaction found 🔔",
        "chatId": "CHAT_ID",
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "id": "P5PVPL3oGa7q3l59",
          "name": "Telegram account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "f9344a7d-1dfe-48ff-97e8-574d15fd9ce8",
      "name": "Genehmigt/Abgelehnt",
      "type": "n8n-nodes-base.if",
      "position": [
        2592,
        -192
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "6adb07b1-38f3-4a13-bbc5-725cd3e0b4ef",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              },
              "leftValue": "={{ $json.data.approved }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "4a356019-3c61-4d2a-afe8-1e393249c290",
      "name": "Textnachricht senden3",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2816,
        -96
      ],
      "webhookId": "61378de0-919b-4687-9bb6-52f5ab777cf2",
      "parameters": {
        "text": "❌ Transaction cancelled ❌",
        "chatId": "CHAT_ID",
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "id": "P5PVPL3oGa7q3l59",
          "name": "Telegram account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "c8f87634-7cc4-4b63-8c8e-60a27fcf5d40",
      "name": "Wenn3",
      "type": "n8n-nodes-base.if",
      "position": [
        4384,
        -240
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "fc37abe0-9ce2-46f2-9671-e41eff7b10c9",
              "operator": {
                "type": "number",
                "operation": "lte"
              },
              "leftValue": "={{ $json.price }}",
              "rightValue": "={{ $('Parse AI Output').item.json.analysis.trading_recommendation.take_profit.tp1 }}{{ $('Parse AI Output').item.json.trading_recommendation.take_profit.tp1 }}"
            }
          ]
        },
        "looseTypeValidation": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "01550883-d791-42c7-8b48-1b69f77e63d8",
      "name": "SOL/USDC1 VERKAUFEN",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        4384,
        -720
      ],
      "parameters": {
        "url": "https://api.afkcrypto.com/v1/trade/swap",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "chain",
              "value": "solana"
            },
            {
              "name": "fromToken",
              "value": "So11111111111111111111111111111111111111112"
            },
            {
              "name": "toToken",
              "value": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
            },
            {
              "name": "amount",
              "value": "={{ $('Parse AI Output').item.json.trading_recommendation.position_size }}{{ $('Parse AI Output').item.json.analysis.trading_recommendation.position_size }}"
            },
            {
              "name": "slippage",
              "value": "1"
            }
          ]
        },
        "genericAuthType": "httpHeaderAuth",
        "headerParameters": {
          "parameters": [
            {
              "name": "Idempotency-Key",
              "value": "={{ $execution.id + '-tp' }}"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "nnx8yhW5BkW736Dl",
          "name": "AFK_Crypto_API_Key"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "6a18378e-7eac-4ba4-9486-9bdd10e6a206",
      "name": "SOL/USDC1 KAUFEN",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        4608,
        -288
      ],
      "parameters": {
        "url": "https://api.staging.afkcrypto.com/v1/trade/swap",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "chain",
              "value": "solana"
            },
            {
              "name": "fromToken",
              "value": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
            },
            {
              "name": "toToken",
              "value": "So11111111111111111111111111111111111111112"
            },
            {
              "name": "amount",
              "value": "={{ $('Parse AI Output').item.json.trading_recommendation.position_size }}{{ $('Parse AI Output').item.json.analysis.trading_recommendation.position_size }}"
            },
            {
              "name": "slippage",
              "value": "1"
            }
          ]
        },
        "genericAuthType": "httpHeaderAuth",
        "headerParameters": {
          "parameters": [
            {
              "name": "Idempotency-Key",
              "value": "={{ $execution.id + '-tp' }}"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "nnx8yhW5BkW736Dl",
          "name": "AFK_Crypto_API_Key"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "b934df6d-b0e4-4b15-95af-823a32f53145",
      "name": "Wenn4",
      "type": "n8n-nodes-base.if",
      "position": [
        4384,
        -512
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "9acbe266-8770-46f0-9169-1facd0f28f77",
              "operator": {
                "type": "number",
                "operation": "lte"
              },
              "leftValue": "={{ $json.price }}",
              "rightValue": "={{ $('Parse AI Output').item.json.analysis.trading_recommendation.stop_loss }}{{ $('Parse AI Output').item.json.trading_recommendation.stop_loss }}"
            }
          ]
        },
        "looseTypeValidation": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "861d10b8-c2e5-4b81-a0c0-79424ce9a5c0",
      "name": "SOL/USDC2 VERKAUFEN",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        4608,
        -512
      ],
      "parameters": {
        "url": "https://api.afkcrypto.com/v1/trade/swap",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "chain",
              "value": "solana"
            },
            {
              "name": "fromToken",
              "value": "So11111111111111111111111111111111111111112"
            },
            {
              "name": "toToken",
              "value": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
            },
            {
              "name": "amount",
              "value": "={{ $('Parse AI Output').item.json.trading_recommendation.position_size }}{{ $('Parse AI Output').item.json.analysis.trading_recommendation.position_size }}"
            },
            {
              "name": "slippage",
              "value": "1"
            }
          ]
        },
        "genericAuthType": "httpHeaderAuth",
        "headerParameters": {
          "parameters": [
            {
              "name": "Idempotency-Key",
              "value": "={{ $execution.id + '-sl' }}"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "nnx8yhW5BkW736Dl",
          "name": "AFK_Crypto_API_Key"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "4971f17e-6479-40bd-8ddf-4ae162fe50cb",
      "name": "Textnachricht senden4",
      "type": "n8n-nodes-base.telegram",
      "position": [
        5056,
        -288
      ],
      "webhookId": "33973b30-5041-4442-bea7-8528f57b6b72",
      "parameters": {
        "text": "=✅ Take Profit Hit\n\nPair: SOL/USDT\nAction: {{ $('Parse AI Output').item.json.trading_recommendation.action }}{{ $('Parse AI Output').item.json.analysis.trading_recommendation.action }}\nAmount: {{ $('Parse AI Output').item.json.trading_recommendation.position_amount }}{{ $('Parse AI Output').item.json.analysis.trading_recommendation.position_amount }} SOL\nBalance: {{ $json.balances[0].raw }}\nHash: {{ $json.hash }}\nDate: {{ $now }}",
        "chatId": "CHAT_ID",
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "id": "P5PVPL3oGa7q3l59",
          "name": "Telegram account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "45616c25-62f1-4365-94a7-781dfedea485",
      "name": "Textnachricht senden5",
      "type": "n8n-nodes-base.telegram",
      "position": [
        5280,
        -80
      ],
      "webhookId": "33973b30-5041-4442-bea7-8528f57b6b72",
      "parameters": {
        "text": "=❌ Stop Loss Hit\n\nPair: SOL/USDT\nAction: {{ $('Parse AI Output').item.json.trading_recommendation.action }}{{ $('Parse AI Output').item.json.analysis.trading_recommendation.action }}\nAmount: {{ $('Parse AI Output').item.json.trading_recommendation.position_amount }}{{ $('Parse AI Output').item.json.analysis.trading_recommendation.position_amount }} SOL\nBalance: {{ $json.balances[0].raw }}\nHash: {{ $json.hash }}\nDate: {{ $now }}",
        "chatId": "CHAT_ID",
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "id": "P5PVPL3oGa7q3l59",
          "name": "Telegram account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "b3a66e36-f0cf-4d97-a51d-3679ce856942",
      "name": "SOL/USDT KAUFEN",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3040,
        -608
      ],
      "parameters": {
        "url": "https://api.afkcrypto.com/v1/trade/swap",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "chain",
              "value": "solana"
            },
            {
              "name": "fromToken",
              "value": "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB"
            },
            {
              "name": "toToken",
              "value": "So11111111111111111111111111111111111111112"
            },
            {
              "name": "amount",
              "value": "={{ $('Parse AI Output').item.json.trading_recommendation.position_size }}{{ $('Parse AI Output').item.json.analysis.trading_recommendation.position_size }}"
            },
            {
              "name": "slippage",
              "value": "1"
            }
          ]
        },
        "genericAuthType": "httpHeaderAuth",
        "headerParameters": {
          "parameters": [
            {
              "name": "Idempotency-Key",
              "value": "={{ $execution.id }}"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "nnx8yhW5BkW736Dl",
          "name": "AFK_Crypto_API_Key"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "47bae529-aab5-4d18-af0e-f43dac0bce4f",
      "name": "SOL/USDT VERKAUFEN",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3264,
        -176
      ],
      "parameters": {
        "url": "https://api.afkcrypto.com/v1/trade/swap",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "chain",
              "value": "solana"
            },
            {
              "name": "fromToken",
              "value": "So11111111111111111111111111111111111111112"
            },
            {
              "name": "toToken",
              "value": "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB"
            },
            {
              "name": "amount",
              "value": "={{ $('Parse AI Output').item.json.trading_recommendation.position_size }}{{ $('Parse AI Output').item.json.analysis.trading_recommendation.position_size }}"
            },
            {
              "name": "slippage",
              "value": "1"
            }
          ]
        },
        "genericAuthType": "httpHeaderAuth",
        "headerParameters": {
          "parameters": [
            {
              "name": "Idempotency-Key",
              "value": "={{ $execution.id }}"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "nnx8yhW5BkW736Dl",
          "name": "AFK_Crypto_API_Key"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "aa3b9322-d886-44cf-a4b9-5ed2a987ffd0",
      "name": "Textnachricht senden6",
      "type": "n8n-nodes-base.telegram",
      "position": [
        4832,
        -720
      ],
      "webhookId": "33973b30-5041-4442-bea7-8528f57b6b72",
      "parameters": {
        "text": "=✅ Take Profit Hit\n\nPair: SOL/USDT\nAction: {{ $('Parse AI Output').item.json.trading_recommendation.action }}{{ $('Parse AI Output').item.json.analysis.trading_recommendation.action }}\nAmount: {{ $('Parse AI Output').item.json.trading_recommendation.position_amount }}{{ $('Parse AI Output').item.json.analysis.trading_recommendation.position_amount }} SOL\nBalance: {{ $json.balances[0].raw }}\nHash: {{ $json.hash }}\nDate: {{ $now }}",
        "chatId": "CHAT_ID",
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "id": "P5PVPL3oGa7q3l59",
          "name": "Telegram account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "7a69556e-abc5-4369-a573-641995edc95b",
      "name": "Textnachricht senden7",
      "type": "n8n-nodes-base.telegram",
      "position": [
        5056,
        -512
      ],
      "webhookId": "33973b30-5041-4442-bea7-8528f57b6b72",
      "parameters": {
        "text": "=❌ Stop Loss Hit\n\nPair: SOL/USDT\nAction: {{ $('Parse AI Output').item.json.trading_recommendation.action }}{{ $('Parse AI Output').item.json.analysis.trading_recommendation.action }}\nAmount: {{ $('Parse AI Output').item.json.trading_recommendation.position_amount }}{{ $('Parse AI Output').item.json.analysis.trading_recommendation.position_amount }} SOL\nBalance: {{ $json.balances[0].raw }}\nHash: {{ $json.hash }}\nDate: {{ $now }}",
        "chatId": "CHAT_ID",
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "id": "P5PVPL3oGa7q3l59",
          "name": "Telegram account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "42bbe94f-cd46-41f3-bdce-674dcfa7c856",
      "name": "Wenn5",
      "type": "n8n-nodes-base.if",
      "position": [
        4608,
        -80
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "fc37abe0-9ce2-46f2-9671-e41eff7b10c9",
              "operator": {
                "type": "number",
                "operation": "gte"
              },
              "leftValue": "={{ $json.price }}",
              "rightValue": "={{ $('Parse AI Output').item.json.analysis.trading_recommendation.take_profit.tp1 }}{{ $('Parse AI Output').item.json.trading_recommendation.take_profit.tp1 }}"
            }
          ]
        },
        "looseTypeValidation": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "2f3eb1d3-3ac0-4bd6-83b3-aaf294aa02b3",
      "name": "SOL-Preis prüfen1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3936,
        -240
      ],
      "parameters": {
        "url": "https://www.okx.com/api/v5/market/ticker?instId=SOL-USDT",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "fc70de7a-f30a-419c-bd3f-a194f057f868",
      "name": "SOL/USDC2 KAUFEN",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        4832,
        -80
      ],
      "parameters": {
        "url": "https://api.afkcrypto.com/v1/trade/swap",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "chain",
              "value": "solana"
            },
            {
              "name": "fromToken",
              "value": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
            },
            {
              "name": "toToken",
              "value": "So11111111111111111111111111111111111111112"
            },
            {
              "name": "amount",
              "value": "={{ $('Parse AI Output').item.json.trading_recommendation.position_size }}{{ $('Parse AI Output').item.json.analysis.trading_recommendation.position_size }}"
            },
            {
              "name": "slippage",
              "value": "1"
            }
          ]
        },
        "genericAuthType": "httpHeaderAuth",
        "headerParameters": {
          "parameters": [
            {
              "name": "Idempotency-Key",
              "value": "={{ $execution.id + '-sl' }}"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "nnx8yhW5BkW736Dl",
          "name": "AFK_Crypto_API_Key"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "e3a33ad6-b834-4b92-adfe-65ac4e211191",
      "name": "Preis in Int2 umwandeln",
      "type": "n8n-nodes-base.code",
      "position": [
        3936,
        -672
      ],
      "parameters": {
        "jsCode": "// Get the price as a string\nconst data = $json[\"data\"][0];\nconst lastPriceString = data.last;\n\n// Convert it to a Number (float)\nconst lastPrice = parseFloat(lastPriceString);\n\n// Return clean numeric output\nreturn [\n  {\n    json: {\n      symbol: data.instId,\n      price: lastPrice,\n    },\n  },\n];"
      },
      "typeVersion": 2
    },
    {
      "id": "f9285afe-efa5-4b19-92fa-032e9f888ce3",
      "name": "15s warten",
      "type": "n8n-nodes-base.wait",
      "position": [
        3488,
        -608
      ],
      "webhookId": "9dfb401c-5cf4-4c9d-bd35-bbc0e41c2d21",
      "parameters": {
        "amount": 15
      },
      "typeVersion": 1.1
    },
    {
      "id": "a47f29b7-2f34-46e0-821b-f2279928b6f9",
      "name": "15s warten_1",
      "type": "n8n-nodes-base.wait",
      "position": [
        3712,
        -176
      ],
      "webhookId": "9dfb401c-5cf4-4c9d-bd35-bbc0e41c2d21",
      "parameters": {
        "amount": 15
      },
      "typeVersion": 1.1
    },
    {
      "id": "23f9cb2f-aaa5-4dcc-82f0-0560cfa4bc67",
      "name": "Preis in Int3 umwandeln",
      "type": "n8n-nodes-base.code",
      "position": [
        4160,
        -240
      ],
      "parameters": {
        "jsCode": "// Get the price as a string\nconst data = $json[\"data\"][0];\nconst lastPriceString = data.last;\n\n// Convert it to a Number (float)\nconst lastPrice = parseFloat(lastPriceString);\n\n// Return clean numeric output\nreturn [\n  {\n    json: {\n      symbol: data.instId,\n      price: lastPrice,\n    },\n  },\n];"
      },
      "typeVersion": 2
    },
    {
      "id": "c1ea14ca-bec4-463f-9d16-12ac32f0e6d8",
      "name": "Textnachricht senden8",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1920,
        -192
      ],
      "webhookId": "1a1dfa33-b29d-4bea-baac-9a49a5f2d21b",
      "parameters": {
        "text": "=━━━━━━━━━━━━━━\n⏱ *5-Minute Analysis*\n• *Price Momentum:* {{ $('Parse AI Output').item.json.analysis['5m'].price_momentum }}\n• *Volume Patterns:* {{ $('Parse AI Output').item.json.analysis['5m'].volume_patterns }}\n• *Support/Resistance:* {{ $('Parse AI Output').item.json.analysis['5m'].support_resistance }}\n• *Trend Direction:* {{ $('Parse AI Output').item.json.analysis['5m'].trend_direction }}\n• *Moving Averages:* {{ $('Parse AI Output').item.json.analysis['5m'].moving_averages }}\n• *Momentum Indicators:* {{ $('Parse AI Output').item.json.analysis['5m'].momentum_indicators }}\n• *Volatility:* {{ $('Parse AI Output').item.json.analysis['5m'].volatility }}",
        "chatId": "CHAT_ID",
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "id": "P5PVPL3oGa7q3l59",
          "name": "Telegram account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "f6466d67-5678-4af3-9bb2-9a6375a56ec1",
      "name": "HTTP Anfrage",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        4608,
        -720
      ],
      "parameters": {
        "url": "https://api.afkcrypto.com/v1/wallets/balances?chain=solana",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "307c506a-eb1a-4223-8912-2336eef9e80c",
      "name": "HTTP Anfrage1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        4832,
        -512
      ],
      "parameters": {
        "url": "https://api.afkcrypto.com/v1/wallets/balances?chain=solana",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "7b5c810a-30d5-4874-8f50-16656e43c148",
      "name": "HTTP Anfrage2",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        4832,
        -288
      ],
      "parameters": {
        "url": "https://api.afkcrypto.com/v1/wallets/balances?chain=solana",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "e56caf8c-060b-4dd0-8f17-f69ff1c683d3",
      "name": "HTTP Anfrage3",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        5056,
        -80
      ],
      "parameters": {
        "url": "https://api.afkcrypto.com/v1/wallets/balances?chain=solana",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "6ea3dd48-4c5e-4f0b-8b98-8e19b8cb73b4",
      "name": "Nachricht senden und auf Antwort warten",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2368,
        -192
      ],
      "webhookId": "d4fbeaff-b087-4666-8eb7-65f49dd30308",
      "parameters": {
        "chatId": "CHAT_ID",
        "message": "=━━━━━━━━━━━━━━\n📈 *Market Structure*\n• *Trend Alignment:* {{ $('Parse AI Output').item.json.market_structure.trend_alignment }}{{ $('Parse AI Output').item.json.analysis.market_structure.trend_alignment }}\n• *Confluence Zones:* {{ $('Parse AI Output').item.json.market_structure.confluence_zones }}{{ $('Parse AI Output').item.json.analysis.market_structure.confluence_zones }}\n• *Candlestick Patterns:* {{ $('Parse AI Output').item.json.market_structure.candlestick_patterns }}{{ $('Parse AI Output').item.json.analysis.market_structure.candlestick_patterns }}\n\n━━━━━━━━━━━━━━\n🎯 *Trading Recommendation*\n• *Action:* {{ $('Parse AI Output').item.json.analysis.trading_recommendation.action }}{{ $('Parse AI Output').item.json.trading_recommendation.action }}\n• *Immediate Action:* {{ $('Parse AI Output').item.json.analysis.trading_recommendation.immediate_action }}{{ $('Parse AI Output').item.json.trading_recommendation.immediate_action }}\n• *Entry Strategy:* {{ $('Parse AI Output').item.json.analysis.trading_recommendation.entry_strategy }}{{ $('Parse AI Output').item.json.trading_recommendation.entry_strategy }}\n• *Stop-Loss:* {{ $('Parse AI Output').item.json.analysis.trading_recommendation.stop_loss }}{{ $('Parse AI Output').item.json.trading_recommendation.stop_loss }}\n• *Take-Profits:*\n   • TP1 → {{ $('Parse AI Output').item.json.analysis.trading_recommendation.take_profit.tp1 }}{{ $('Parse AI Output').item.json.trading_recommendation.take_profit.tp1 }}\n• *Position Size:* {{ $('Parse AI Output').item.json.analysis.trading_recommendation.position_size }}{{ $('Parse AI Output').item.json.trading_recommendation.position_size }} lamports {{ $('Parse AI Output').item.json.trading_recommendation.position_amount }}\n\n━━━━━━━━━━━━━━\n*Do you want to execute the trade?* {{ $('Parse AI Output').item.json.analysis.trading_recommendation.action }}{{ $('Parse AI Output').item.json.trading_recommendation.action }}\n\n⚠️ *Disclaimer:* AI can make mistakes. ALWAYS double check the trade especially the POSITION SIZE. {{ $('Parse AI Output').item.json.disclaimer }}",
        "options": {},
        "operation": "sendAndWait",
        "approvalOptions": {
          "values": {
            "approvalType": "double"
          }
        }
      },
      "credentials": {
        "telegramApi": {
          "id": "P5PVPL3oGa7q3l59",
          "name": "Telegram account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "52a8f39a-536f-4dc9-8cad-1a3356e51b0c",
      "name": "Textnachricht senden9",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2144,
        -192
      ],
      "webhookId": "1a1dfa33-b29d-4bea-baac-9a49a5f2d21b",
      "parameters": {
        "text": "=━━━━━━━━━━━━━━\n⏱ *1-Hour Analysis*\n• *Price Momentum:* {{ $('Parse AI Output').item.json.analysis['1hr'].price_momentum }}\n• *Volume Patterns:* {{ $('Parse AI Output').item.json.analysis['1hr'].volume_patterns }}\n• *Support/Resistance:* {{ $('Parse AI Output').item.json.analysis['1hr'].support_resistance }}\n• *Trend Direction:* {{ $('Parse AI Output').item.json.analysis['1hr'].trend_direction }}\n• *Moving Averages:* {{ $('Parse AI Output').item.json.analysis['1hr'].moving_averages }}\n• *Momentum Indicators:* {{ $('Parse AI Output').item.json.analysis['1hr'].momentum_indicators }}\n• *Volatility:* {{ $('Parse AI Output').item.json.analysis['1hr'].volatility }}",
        "chatId": "CHAT_ID",
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "id": "P5PVPL3oGa7q3l59",
          "name": "Telegram account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "b9f3362c-8cc5-473c-9b9a-129fc0a3d836",
      "name": "KI-Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1136,
        -192
      ],
      "parameters": {
        "text": "=Perform a full Multi-Timeframe Technical Analysis and Trading Recommendation using the following real market data.\n\nSymbol: {{$node[\"Transcribe\"].json[\"symbol\"]}}\nCurrent Price: {{$node[\"Transcribe\"].json[\"price\"]}}\n\n1-Minute Candlestick Data:\n{{$node[\"Transcribe\"].json[\"data_1m\"]}}\n\n5-Minute Candlestick Data:\n{{$node[\"Transcribe\"].json[\"data_5m\"]}}\n\n1-Hour Candlestick Data:\n{{$node[\"Transcribe\"].json[\"data_1h\"]}}\n\nAnalyze all timeframes, identify confluence between trends, support/resistance zones, and likely scenarios.\n\nWhen calculating position_size, follow these rules:\n\t•\tThe current account balance is {{ $json.balances[0].raw }} lamports.\nConvert it to SOL using:\n{{ $json.balances[0].raw }} = balance_lamports / 1,000,000,000\n\t•\tAssume a maximum risk of 1% of the balance per trade.\nrisk_amount_SOL = balance_lamports × 0.01.\n\t•\tUse this formula: position_size = risk_amount_SOL / |entry_price − stop_loss|.\n\t•\tConvert the result to lamports:\nposition_size_lamports = position_size × 1,000,000,000\n\t•\tSeparate both lamports and SOL in the output.\t•\tposition_size: formatted like: \"128965000\"\n\t•\tposition_amount: formatted like: \"(0.128965 SOL)\"\n\t•\tIf entry_price or stop_loss is missing, or if (entry_price − stop_loss) ≤ 0, set \"position_size\": \"Not applicable.\"\n\t•\tIf the calculated position_size exceeds the available balance, cap it at (balance_lamports × 0.99) to prevent over-allocation.\n\nReturn your final answer in valid JSON format, enclosed in triple backticks like this:\n\n```json\n{\n  \"symbol\": \"{{$node['Transcribe'].json['symbol']}}\",\n  \"analysis\": {\n    \"1m\": {\n      \"price_momentum\": \"\",\n      \"volume_patterns\": \"\",\n      \"support_resistance\": \"\",\n      \"trend_direction\": \"\",\n      \"moving_averages\": \"\",\n      \"momentum_indicators\": \"\",\n      \"volatility\": \"\"\n    },\n    \"market_structure\": {\n      \"trend_alignment\": \"\",\n      \"confluence_zones\": \"\",\n      \"candlestick_patterns\": \"\"\n    \"5m\": {\n      \"price_momentum\": \"\",\n      \"volume_patterns\": \"\",\n      \"support_resistance\": \"\",\n      \"trend_direction\": \"\",\n      \"moving_averages\": \"\",\n      \"momentum_indicators\": \"\",\n      \"volatility\": \"\"\n    },\n    \"market_structure\": {\n      \"trend_alignment\": \"\",\n      \"confluence_zones\": \"\",\n      \"candlestick_patterns\": \"\"\n     \"1hr\": {\n      \"price_momentum\": \"\",\n      \"volume_patterns\": \"\",\n      \"support_resistance\": \"\",\n      \"trend_direction\": \"\",\n      \"moving_averages\": \"\",\n      \"momentum_indicators\": \"\",\n      \"volatility\": \"\"\n    },\n    \"market_structure\": {\n      \"trend_alignment\": \"\",\n      \"confluence_zones\": \"\",\n      \"candlestick_patterns\": \"\"\n    },\n    \"trading_recommendation\": {\n      \"action\": \"LONG, SHORT, or HOLD\",\n      \"immediate_action\": \"\",\n      \"entry_strategy\": \"\",\n      \"stop_loss\": \"\",\n      \"stop_loss_reason\": \"\",\n      \"take_profit\": {\n        \"tp1\": \"\",\n        \"tp2\": \"\",\n        \"tp3\": \"\"\n      },\n      \"position_amount\": \"\"\n      \"position_size\": \"\"\n    }\n  },\n  \"disclaimer\": \"This is general information only and not financial advice. For personal guidance, please talk to a licensed professional.\"\n}",
        "options": {
          "systemMessage": "You are a professional quantitative crypto trading analyst.\n\nYour task is to perform structured, multi-timeframe technical analysis using real market data. Use professional trading terminology and objective, data-driven reasoning.\n\nAlways produce your report in this exact structure:\n\n1. **1-Minute Analysis**\n   - Price Momentum\n   - Volume Patterns and Spikes\n   - Support/Resistance Levels\n   - Short-Term Trend Direction\n   - Moving Averages\n   - Momentum Indicators\n   - Volatility\n\n2. **Market Structure Analysis**\n   - Trend Alignment Across Timeframes\n   - Confluence Zones\n   - Candlestick Patterns\n\n3. **Trading Recommendation**\n   - Action\n   - Immediate Action\n   - Entry Strategy\n   - Stop-Loss\n   - Take-Profit (TP1, TP2, TP3)\n   - Position Size\n\nGuidelines:\n- Only use the data provided. Do not assume or fabricate values.\n- Identify key support/resistance, trend strength, and momentum shifts.\n- Be concise, professional, and avoid emotional language.\n- End with this disclaimer:\n  “This is general information only and not financial advice. For personal guidance, please talk to a licensed professional.”"
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "1769ee10-57ea-4cac-ba03-ddf2c2482f57",
      "name": "SOL-Preis prüfen",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3712,
        -672
      ],
      "parameters": {
        "url": "https://www.okx.com/api/v5/market/ticker?instId=SOL-USDT",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "328e30db-6733-4d75-a6d2-26f83b23dc70",
      "name": "Google Gemini Chat-Modell",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        1200,
        32
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "googlePalmApi": {
          "id": "rJzDGbm8eDazr9g5",
          "name": "Google Gemini API"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "17740cc3-d0ec-44c3-9413-f3f2e03fe5ba",
      "name": "Haftnotiz",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -112,
        -432
      ],
      "parameters": {
        "width": 256,
        "height": 592,
        "content": "### Schedule Trigger  \nExecutes the workflow automatically every hour.  \nThis node initiates a full SOL/USDT analysis cycle — fetching data, running AI evaluation, and preparing a trade signal.  \nModify the interval for higher or lower trading frequency as needed.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "a4576bad-8c80-4400-9af8-1053b1c13beb",
      "name": "Haftnotiz1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        160,
        -560
      ],
      "parameters": {
        "color": 2,
        "width": 672,
        "height": 720,
        "content": "### Market Data Aggregator (Crypto Compare)  \nFetches multi-timeframe OHLCV data for SOL/USDT using the Crypto Compare API.  \nTimeframes: 1m, 5m, and 1h — combined for momentum and volatility analysis.  \nData includes:\n- Open, High, Low, Close  \n- Volume and % Change  \nThis data feeds directly into the AI Analyzer for technical interpretation.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "af9be015-8daf-4c80-b884-258893b8eb4d",
      "name": "Haftnotiz2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1088,
        -464
      ],
      "parameters": {
        "color": 4,
        "width": 336,
        "height": 624,
        "content": "### Multi-Timeframe Market Analyzer  \nProcesses the aggregated SOL/USDT data through an AI model (Gemini or OpenAI).  \nExtracts:\n- Market Sentiment (Bullish / Bearish / Neutral)  \n- Trade Recommendation (LONG / SHORT / HOLD)  \n- Stop-Loss and Take-Profit levels  \n- Confidence Rating and Reasoning  \nActs as the core intelligence module of the trading system.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "092bc523-7bc1-4e38-aa4e-31929dc42ef7",
      "name": "Haftnotiz3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        848,
        -448
      ],
      "parameters": {
        "color": 3,
        "width": 224,
        "height": 608,
        "content": "### Wallet Balance Verifier  \nQueries your AFK Crypto Wallet balance using:\nGET /v1/wallets/balances?chain=solana  \nEnsures there are sufficient funds before trade execution.  \nCalculates position size based on your 1% risk parameter relative to current balance.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "e55b3b88-e28c-4888-aeac-cda127c2dea6",
      "name": "Haftnotiz4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1440,
        -528
      ],
      "parameters": {
        "color": 5,
        "width": 208,
        "height": 688,
        "content": "### Trade Message Composer  \nGenerates a Telegram-ready message containing AI insights and trade details.  \nMessage includes:\n- Market Sentiment  \n- Suggested Position (LONG / SHORT)  \n- Entry, TP, SL  \n- Confidence Score  \nThis structured message is then sent to Telegram for approval.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "e28d7b83-2748-45dc-81dd-38e027c16a42",
      "name": "Haftnotiz5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1664,
        -352
      ],
      "parameters": {
        "color": 6,
        "width": 864,
        "height": 512,
        "content": "### Telegram Approval Request  \nSends interactive message to your Telegram channel or chat with two buttons:\n✅ Approve — Execute Trade  \n❌ Decline — Ignore Signal  \nEnsures you maintain manual control over trade execution decisions.  \nRequires Telegram Bot Token and Chat ID credentials.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "9ddfa07b-afb8-42ba-8f25-36a6b09d22a8",
      "name": "Haftnotiz6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2544,
        -416
      ],
      "parameters": {
        "color": 7,
        "width": 208,
        "height": 576,
        "content": "### Approval Condition Filter  \nEvaluates your Telegram response.  \nIf response = ✅ Approve → continue to Trade Execution node.  \nIf response = ❌ Decline → send cancellation message and end flow.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "7add2bfe-1621-47b7-bf79-0004a0db9153",
      "name": "Haftnotiz7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2768,
        -800
      ],
      "parameters": {
        "width": 672,
        "height": 960,
        "content": "### AFK Crypto Trade Executor  \nExecutes trade instantly via:\nPOST /v1/trade/swap  \nUses AI’s recommended parameters:\n- Pair: SOL/USDT  \n- Type: Buy/Sell  \n- Amount: Calculated 1% risk size  \nHandles all on-chain execution automatically through your AFK Crypto Wallet.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "94ea6047-2c12-434d-b50e-89cfc8b381b1",
      "name": "Haftnotiz8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3456,
        -832
      ],
      "parameters": {
        "color": 3,
        "width": 1536,
        "height": 992,
        "content": "### Active Position Watcher  \nContinuously monitors live SOL price after trade execution.  \nEvaluates TP and SL conditions in real-time using latest market data.  \nOnce target is hit:\n- Live monitoring of SOL price\n- Position auto-closes via AFK Crypto API.  \n"
      },
      "typeVersion": 1
    },
    {
      "id": "0552f986-694e-4b9d-97ed-1e8e85c77ebd",
      "name": "Haftnotiz9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        5008,
        -672
      ],
      "parameters": {
        "color": 4,
        "width": 464,
        "height": 832,
        "content": "### Post-Trade Summary Message  \nSends Telegram notification summarizing the completed trade:  \n- Entry and Exit Prices  \n- Result (Profit / Loss)  \n- Updated Wallet Balance  \nKeeps you informed of all closed trades in real time.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "fa217657-4748-46bc-ab0b-6a0aa3a51900",
      "name": "Haftnotiz10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        5488,
        -944
      ],
      "parameters": {
        "width": 768,
        "height": 1104,
        "content": "## SOL/USDT Multi-Timeframe AI Market Analyzer and Trader with Telegram Approval  \n\n### Try It Out!  \nAn intelligent AI-powered Solana trading assistant that merges multi-timeframe market analysis, Telegram approvals, and on-chain AFK Crypto execution.  \nGives you full automation with manual approval control.\n\n### How It Works  \n1. Hourly trigger starts analysis.  \n2. Fetches SOL/USDT data (1m, 5m, 1h).  \n3. AI generates trade suggestion + TP/SL.  \n4. Wallet balance verified.  \n5. Telegram message sent for approval.  \n6. Upon approval, executes trade.  \n7. Monitors open position and closes automatically upon TP/SL.  \n8. Sends Telegram report after each trade.\n\n### How to Use  \n- Import into n8n workspace.  \n- Set AFK Crypto API key, Telegram Bot Token, and Chat ID.  \n- Adjust timeframes or risk allocation in config nodes.  \n- Deploy and activate.  \n\n### (Optional) Extend This Workflow  \n- Auto-Trade if Confidence > 90%.  \n- Sync trades to Notion or Airtable for PnL tracking.  \n- Dynamic risk adjuster based on balance and volatility.  \n- Add ETH/USDT or BTC/USDT pairs for diversification.\n\n### Requirements  \n- AFK Crypto Wallet + API Key  \n- Telegram Bot Token + Chat ID  \n- Crypto Compare API Key  \n- Active n8n instance with HTTP Request, AI, and Telegram nodes enabled  \n\n### AFK APIs Used  \n- GET https://api.afkcrypto.com/v1/wallets/balances?chain=solana  \n- POST https://api.afkcrypto.com/v1/trade/swap  \n\n### Summary  \nA complete AI-integrated Solana trading system with real-time analysis, Telegram approvals, and automated execution — balancing AI precision with trader control.\n\n## AFK Crypto Website: afkcrypto.com\n## Join our Discord server! https://discord.com/invite/v4DgTEUUJJ"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "351ee0d9-6bb5-4afb-822a-a2a062da1e2c",
  "connections": {
    "b3e4d111-b90b-45fd-b275-1c0659979b76": {
      "main": [
        [
          {
            "node": "b3a66e36-f0cf-4d97-a51d-3679ce856942",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "c30d5737-0aa0-4362-8b29-a0fe4e81df85",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c30d5737-0aa0-4362-8b29-a0fe4e81df85": {
      "main": [
        [
          {
            "node": "47bae529-aab5-4d18-af0e-f43dac0bce4f",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "eef75327-e40b-4846-b3a8-b935297b5094",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "8e83181b-4229-4766-8616-addaa9e8e56c": {
      "main": [
        [
          {
            "node": "01550883-d791-42c7-8b48-1b69f77e63d8",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "b934df6d-b0e4-4b15-95af-823a32f53145",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c8f87634-7cc4-4b63-8c8e-60a27fcf5d40": {
      "main": [
        [
          {
            "node": "6a18378e-7eac-4ba4-9486-9bdd10e6a206",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "42bbe94f-cd46-41f3-bdce-674dcfa7c856",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "b934df6d-b0e4-4b15-95af-823a32f53145": {
      "main": [
        [
          {
            "node": "861d10b8-c2e5-4b81-a0c0-79424ce9a5c0",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "f9285afe-efa5-4b19-92fa-032e9f888ce3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "42bbe94f-cd46-41f3-bdce-674dcfa7c856": {
      "main": [
        [
          {
            "node": "fc70de7a-f30a-419c-bd3f-a194f057f868",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "a47f29b7-2f34-46e0-821b-f2279928b6f9",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "26be9798-3f0c-4086-8a53-a07d516c7ad8": {
      "main": [
        [
          {
            "node": "63af3727-3774-4117-ba4d-6d28e0ff3c92",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c3841dcf-b7d3-4bc0-9ff7-9179b1b76ef9": {
      "main": [
        [
          {
            "node": "2567ad21-a7e9-42d8-9fa9-a1c9ba6f223c",
            "type": "main",
            "index": 0
          },
          {
            "node": "5e067079-4be8-444d-a35e-e8aa193cf533",
            "type": "main",
            "index": 0
          },
          {
            "node": "b02873ec-79b0-4488-82aa-2d605d107d0a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "b9f3362c-8cc5-473c-9b9a-129fc0a3d836": {
      "main": [
        [
          {
            "node": "590d5cfa-b7f3-43a2-8487-e3ff18fb044b",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "b02873ec-79b0-4488-82aa-2d605d107d0a": {
      "main": [
        [
          {
            "node": "26be9798-3f0c-4086-8a53-a07d516c7ad8",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "2567ad21-a7e9-42d8-9fa9-a1c9ba6f223c": {
      "main": [
        [
          {
            "node": "26be9798-3f0c-4086-8a53-a07d516c7ad8",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "5e067079-4be8-444d-a35e-e8aa193cf533": {
      "main": [
        [
          {
            "node": "26be9798-3f0c-4086-8a53-a07d516c7ad8",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "f9285afe-efa5-4b19-92fa-032e9f888ce3": {
      "main": [
        [
          {
            "node": "1769ee10-57ea-4cac-ba03-ddf2c2482f57",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "63af3727-3774-4117-ba4d-6d28e0ff3c92": {
      "main": [
        [
          {
            "node": "8b7240b6-81bc-43cf-9231-b7a9771ca35a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "a47f29b7-2f34-46e0-821b-f2279928b6f9": {
      "main": [
        [
          {
            "node": "2f3eb1d3-3ac0-4bd6-83b3-aaf294aa02b3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "b3a66e36-f0cf-4d97-a51d-3679ce856942": {
      "main": [
        [
          {
            "node": "a4dc8e55-4ffb-436c-9fe6-80c8b2d29c1b",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "f6466d67-5678-4af3-9bb2-9a6375a56ec1": {
      "main": [
        [
          {
            "node": "aa3b9322-d886-44cf-a4b9-5ed2a987ffd0",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "6a18378e-7eac-4ba4-9486-9bdd10e6a206": {
      "main": [
        [
          {
            "node": "7b5c810a-30d5-4874-8f50-16656e43c148",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "fc70de7a-f30a-419c-bd3f-a194f057f868": {
      "main": [
        [
          {
            "node": "e56caf8c-060b-4dd0-8f17-f69ff1c683d3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "307c506a-eb1a-4223-8912-2336eef9e80c": {
      "main": [
        [
          {
            "node": "7a69556e-abc5-4369-a573-641995edc95b",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "7b5c810a-30d5-4874-8f50-16656e43c148": {
      "main": [
        [
          {
            "node": "4971f17e-6479-40bd-8ddf-4ae162fe50cb",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "e56caf8c-060b-4dd0-8f17-f69ff1c683d3": {
      "main": [
        [
          {
            "node": "45616c25-62f1-4365-94a7-781dfedea485",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "47bae529-aab5-4d18-af0e-f43dac0bce4f": {
      "main": [
        [
          {
            "node": "926d8714-72c4-412b-ad4b-9318ea4c233f",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "01550883-d791-42c7-8b48-1b69f77e63d8": {
      "main": [
        [
          {
            "node": "f6466d67-5678-4af3-9bb2-9a6375a56ec1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "861d10b8-c2e5-4b81-a0c0-79424ce9a5c0": {
      "main": [
        [
          {
            "node": "307c506a-eb1a-4223-8912-2336eef9e80c",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "1769ee10-57ea-4cac-ba03-ddf2c2482f57": {
      "main": [
        [
          {
            "node": "e3a33ad6-b834-4b92-adfe-65ac4e211191",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "590d5cfa-b7f3-43a2-8487-e3ff18fb044b": {
      "main": [
        [
          {
            "node": "59b2ec89-e7f6-4dfc-a016-60a5b8ed9a97",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "a4dc8e55-4ffb-436c-9fe6-80c8b2d29c1b": {
      "main": [
        [
          {
            "node": "f9285afe-efa5-4b19-92fa-032e9f888ce3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "2f3eb1d3-3ac0-4bd6-83b3-aaf294aa02b3": {
      "main": [
        [
          {
            "node": "23f9cb2f-aaa5-4dcc-82f0-0560cfa4bc67",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "926d8714-72c4-412b-ad4b-9318ea4c233f": {
      "main": [
        [
          {
            "node": "a47f29b7-2f34-46e0-821b-f2279928b6f9",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "8b7240b6-81bc-43cf-9231-b7a9771ca35a": {
      "main": [
        [
          {
            "node": "b9f3362c-8cc5-473c-9b9a-129fc0a3d836",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "59b2ec89-e7f6-4dfc-a016-60a5b8ed9a97": {
      "main": [
        [
          {
            "node": "c1ea14ca-bec4-463f-9d16-12ac32f0e6d8",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "f9344a7d-1dfe-48ff-97e8-574d15fd9ce8": {
      "main": [
        [
          {
            "node": "b3e4d111-b90b-45fd-b275-1c0659979b76",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "4a356019-3c61-4d2a-afe8-1e393249c290",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c1ea14ca-bec4-463f-9d16-12ac32f0e6d8": {
      "main": [
        [
          {
            "node": "52a8f39a-536f-4dc9-8cad-1a3356e51b0c",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "52a8f39a-536f-4dc9-8cad-1a3356e51b0c": {
      "main": [
        [
          {
            "node": "6ea3dd48-4c5e-4f0b-8b98-8e19b8cb73b4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "e3a33ad6-b834-4b92-adfe-65ac4e211191": {
      "main": [
        [
          {
            "node": "8e83181b-4229-4766-8616-addaa9e8e56c",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "23f9cb2f-aaa5-4dcc-82f0-0560cfa4bc67": {
      "main": [
        [
          {
            "node": "c8f87634-7cc4-4b63-8c8e-60a27fcf5d40",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "328e30db-6733-4d75-a6d2-26f83b23dc70": {
      "ai_languageModel": [
        [
          {
            "node": "b9f3362c-8cc5-473c-9b9a-129fc0a3d836",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "6ea3dd48-4c5e-4f0b-8b98-8e19b8cb73b4": {
      "main": [
        [
          {
            "node": "f9344a7d-1dfe-48ff-97e8-574d15fd9ce8",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Häufig gestellte Fragen

Wie verwende ich diesen Workflow?

Kopieren Sie den obigen JSON-Code, erstellen Sie einen neuen Workflow in Ihrer n8n-Instanz und wählen Sie "Aus JSON importieren". Fügen Sie die Konfiguration ein und passen Sie die Anmeldedaten nach Bedarf an.

Für welche Szenarien ist dieser Workflow geeignet?

Experte - Krypto-Handel, KI-Zusammenfassung

Ist es kostenpflichtig?

Dieser Workflow ist völlig kostenlos. Beachten Sie jedoch, dass Drittanbieterdienste (wie OpenAI API), die im Workflow verwendet werden, möglicherweise kostenpflichtig sind.

Workflow-Informationen
Schwierigkeitsgrad
Experte
Anzahl der Nodes56
Kategorie2
Node-Typen10
Schwierigkeitsbeschreibung

Für fortgeschrittene Benutzer, komplexe Workflows mit 16+ Nodes

Autor

Automation expert and founder of AFK Crypto with over 5 years of experience in crypto automations.

Externe Links
Auf n8n.io ansehen

Diesen Workflow teilen

Kategorien

Kategorien: 34