What This Workflow Does
This n8n workflow creates a unified API endpoint that combines real-time cryptocurrency pricing data from CoinGecko with foreign exchange rates from ExchangeRate-API. It solves the common challenge of needing to fetch and synchronize data from multiple APIs when building financial applications that deal with both crypto assets and fiat currencies.
The workflow outputs a clean JSON response containing current BTC and ETH prices, 24-hour percentage changes, and USD→EUR exchange rates - all formatted for easy consumption by web applications, trading bots, or financial dashboards. By combining these data sources serverlessly through n8n, you eliminate the need to maintain separate API integrations and synchronization logic.
How It Works
1. Fetching Crypto Prices from CoinGecko
The workflow first queries CoinGecko's free API to retrieve current market data for Bitcoin and Ethereum. It extracts the current USD price, 24-hour price change percentage, and market cap for each asset. CoinGecko aggregates data from hundreds of exchanges, providing reliable volume-weighted averages.
2. Retrieving FX Rates from ExchangeRate-API
Simultaneously, the workflow makes a parallel API call to ExchangeRate-API to get the latest USD to EUR conversion rate. This service provides mid-market rates sourced from central bank data, updated hourly. The rate is used to calculate equivalent crypto values in euros.
3. Formatting the Combined Response
The workflow merges both data streams into a single, standardized JSON object with timestamps. The output includes both raw numbers and formatted strings for display purposes, making it ready-to-use in frontend applications without additional processing.
Pro tip: Add API key authentication to your webhook endpoint if exposing this API publicly to prevent unauthorized usage.
Who This Is For
This template is ideal for fintech developers, crypto startups, and financial analysts who need combined crypto/fiat data without building complex integrations. Typical users include:
- Crypto portfolio tracker developers
- Trading bot creators needing FX conversions
- E-commerce platforms accepting crypto payments
- Financial reporting tools with multi-currency support
What You'll Need
- An active n8n instance (cloud or self-hosted)
- Free API keys for CoinGecko and ExchangeRate-API
- A webhook URL to trigger the workflow
- Basic understanding of JSON API responses
Quick Setup Guide
- Import the downloaded JSON template into your n8n instance
- Register for free API keys at CoinGecko and ExchangeRate-API
- Add your keys to the respective HTTP Request nodes
- Deploy the workflow as a webhook
- Test the endpoint with Postman or cURL
Key Benefits
Reduce API calls by 50%: Get crypto and FX data in one request instead of managing multiple integrations.
Eliminate synchronization headaches: The workflow handles all timing and data alignment automatically.
Serverless architecture: No need to maintain infrastructure - runs entirely through n8n's execution engine.
Customizable output: Easily modify the JSON structure to match your application's specific requirements.