Erstellen Sie eine BTC-ETH-Preis- und USD-Wechselkurs-API mit CoinGecko und ExchangeRate-API

Fortgeschritten

Dies ist ein Crypto Trading, Miscellaneous, Multimodal AI-Bereich Automatisierungsworkflow mit 7 Nodes. Hauptsächlich werden Code, Merge, Webhook, HttpRequest, RespondToWebhook und andere Nodes verwendet. Erstellen Sie eine BTC/ETH-Preis- und US-Dollar-Wechselkurs-API mit CoinGecko und ExchangeRate-API

Voraussetzungen
  • HTTP Webhook-Endpunkt (wird von n8n automatisch generiert)
  • Möglicherweise sind Ziel-API-Anmeldedaten erforderlich
Workflow-Vorschau
Visualisierung der Node-Verbindungen, mit Zoom und Pan
Workflow exportieren
Kopieren Sie die folgende JSON-Konfiguration und importieren Sie sie in n8n
{
  "meta": {
    "instanceId": "2000c64071c20843606b95c63795bb0797c41036047055a6586498e855b96efc"
  },
  "nodes": [
    {
      "id": "f43de1da-85c9-4e07-87b2-e3d54aba8cfd",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -704,
        -16
      ],
      "webhookId": "9cb6d3c6-0ff2-4ff4-a992-4b8ebc27de72",
      "parameters": {
        "path": "crypto-fx",
        "options": {},
        "httpMethod": "POST",
        "responseMode": "responseNode"
      },
      "typeVersion": 1
    },
    {
      "id": "53645dd6-4117-4e41-b958-5d3bfc022f6a",
      "name": "Fiat-Wechselkurse abrufen",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -496,
        -80
      ],
      "parameters": {
        "url": "https://api.exchangerate-api.com/v4/latest/USD",
        "options": {}
      },
      "typeVersion": 4.1
    },
    {
      "id": "9d0c77d1-67bc-4030-93d2-75ca981bb504",
      "name": "Kryptopreise abrufen",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -496,
        80
      ],
      "parameters": {
        "url": "https://api.coingecko.com/api/v3/simple/price?ids=bitcoin,ethereum&vs_currencies=usd&include_24hr_change=true",
        "options": {}
      },
      "typeVersion": 4.1
    },
    {
      "id": "9bd74632-a79c-4076-b75d-2a7550325356",
      "name": "Zusammenführen",
      "type": "n8n-nodes-base.merge",
      "position": [
        -304,
        0
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "89163b24-4f91-4a12-b260-d00b47849a73",
      "name": "JSON erstellen",
      "type": "n8n-nodes-base.code",
      "position": [
        -96,
        0
      ],
      "parameters": {
        "jsCode": "let fx,cg;for(const it of $input.all()){ if(it.json?.rates) fx=it.json; if(it.json?.bitcoin) cg=it.json; }\nconst payload={\n  btc:{ price: cg?.bitcoin?.usd ?? null, change_24h: cg?.bitcoin?.usd_24h_change ?? null },\n  eth:{ price: cg?.ethereum?.usd ?? null, change_24h: cg?.ethereum?.usd_24h_change ?? null },\n  usd_eur: fx?.rates?.EUR ?? null,\n  usd_ngn: fx?.rates?.NGN ?? null,\n  ts: new Date().toISOString()\n};\nreturn [{json: payload}];"
      },
      "typeVersion": 2
    },
    {
      "id": "70a8ddb0-b644-4344-a17f-1cadbb8074e6",
      "name": "Antworten",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        128,
        0
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "28ab2e99-d2cc-420c-9e5f-c73fd14639c0",
      "name": "Notizzettel",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        272,
        -208
      ],
      "parameters": {
        "width": 544,
        "height": 640,
        "content": "## 🌐 Crypto + FX Micro-API (Webhook JSON)\n\n**What it does:**  \nExposes a lightweight **GET** endpoint that returns **BTC/ETH price + 24h %** and **USD→EUR / USD→NGN** in clean JSON.\n\n**Route:**  \n`/webhook/crypto-fx` (use n8n’s Test or Production URL)\n\n**Flow:**  \n**Webhook (GET)** → ExchangeRate-API → CoinGecko → **Merge** → **Code (build JSON)** → **Respond**\n\n**Example Response:**  \n```json\n{\n  \"btc\": { \"price\": 112417, \"change_24h\": 1.22 },\n  \"eth\": { \"price\": 4334.57, \"change_24h\": 1.33 },\n  \"usd_eur\": 0.854,\n  \"usd_ngn\": 1524.54,\n  \"ts\": \"2025-09-08T08:00:00.000Z\"\n}\n"
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "9bd74632-a79c-4076-b75d-2a7550325356": {
      "main": [
        [
          {
            "node": "89163b24-4f91-4a12-b260-d00b47849a73",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "f43de1da-85c9-4e07-87b2-e3d54aba8cfd": {
      "main": [
        [
          {
            "node": "53645dd6-4117-4e41-b958-5d3bfc022f6a",
            "type": "main",
            "index": 0
          },
          {
            "node": "9d0c77d1-67bc-4030-93d2-75ca981bb504",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "89163b24-4f91-4a12-b260-d00b47849a73": {
      "main": [
        [
          {
            "node": "70a8ddb0-b644-4344-a17f-1cadbb8074e6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "9d0c77d1-67bc-4030-93d2-75ca981bb504": {
      "main": [
        [
          {
            "node": "9bd74632-a79c-4076-b75d-2a7550325356",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "53645dd6-4117-4e41-b958-5d3bfc022f6a": {
      "main": [
        [
          {
            "node": "9bd74632-a79c-4076-b75d-2a7550325356",
            "type": "main",
            "index": 1
          }
        ]
      ]
    }
  }
}
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?

Fortgeschritten - Krypto-Handel, Verschiedenes, Multimodales KI

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
Fortgeschritten
Anzahl der Nodes7
Kategorie3
Node-Typen6
Schwierigkeitsbeschreibung

Für erfahrene Benutzer, mittelkomplexe Workflows mit 6-15 Nodes

Autor
David Olusola

David Olusola

@dae221

I help ambitious businesses eliminate operational bottlenecks and scale faster with AI automation. My clients typically see 40-60% efficiency gains within 90 days. Currently accepting 3 new projects this quarter - david@daexai.com

Externe Links
Auf n8n.io ansehen

Diesen Workflow teilen

Kategorien

Kategorien: 34