Micro-API for Crypto and USD Exchange Rate Data - n8n Workflow

Build a custom, unified micro-API using an n8n workflow to fetch real-time prices for BTC and ETH (via CoinGecko) and current USD exchange rates (via ExchangeRate-API).

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • Developers needing a unified endpoint for financial data.

  • Data Analysts seeking streamlined access to crypto and FX rates.

  • Users looking to publish real-time data from an n8n workflow without needing complex server setup.

  • Anyone exploring advanced capabilities of n8n templates for custom service creation.

Overview

Creating robust applications often requires integrating data from multiple sources. This can lead to slow response times or complicated multi-step fetching logic. This specialized n8n workflow solves that problem by acting as an aggregation layer.

It utilizes the power of the n8n platform to simultaneously query CoinGecko for Bitcoin (BTC) and Ethereum (ETH) prices (including 24-hour changes) and ExchangeRate-API for fiat exchange rates (USD to EUR and NGN).

When the endpoint is hit (via the initial n8n trigger), the workflow executes these requests in parallel, merges the results, processes and cleans the data using a custom code n8n node, and instantly returns a clean, predictable JSON payload. This is a perfect example of leveraging n8n templates to build efficient microservices.

How it Works

This n8n workflow is initiated by a custom public endpoint defined by the Webhook n8n trigger.


  1. Trigger Initiation: An external request hits the configured crypto-fx webhook path, activating the n8n trigger.

  2. Parallel Data Fetching: The n8n workflow immediately branches into two simultaneous HTTP Request nodes. One node fetches fiat rates (USD base) and the other fetches crypto prices (BTC and ETH) and 24h change data.

  3. Data Consolidation: The Merge n8n node waits for both parallel requests to complete and combines their payloads into a single data stream.

  4. Data Transformation (Code): A critical Code n8n node processes the combined data. It extracts the BTC/ETH prices and 24h changes, as well as the specific USD→EUR and USD→NGN rates, structuring them into a clean, easy-to-consume JSON format.

  5. Final Response: The Respond n8n node takes the newly structured JSON payload and sends it back immediately to the original requester, fulfilling the goal of this powerful n8n workflow.

Installation Guide

To deploy this n8n template and create your API endpoint, follow these steps:


  1. Import the JSON: Copy the provided n8n workflow JSON code.

  2. Create New Workflow: In your n8n instance, click 'Add Workflow' and select 'Import from JSON'. Paste the code.

  3. Activate the Workflow: No external credentials are required as both CoinGecko and ExchangeRate-API are used here without API keys. Ensure the workflow is set to 'Active'.

  4. Test the Endpoint: Once active, click on the Webhook n8n node and copy the Test or Production URL. Access this URL using a POST or GET request tool (like Postman or a browser) to test the new micro-API endpoint established by the n8n trigger.

Node Details

Webhook (n8n trigger): This is the entry point for the n8n workflow. It is configured to listen on the path crypto-fx and handles the incoming request by initiating the data fetching process.
Get Fiat Exchange Rates (HTTP Request n8n node): Connects to api.exchangerate-api.com to retrieve the latest exchange rates with USD as the base currency. This data is essential for the final payload.
Get Crypto Prices (HTTP Request n8n node): Connects to api.coingecko.com to fetch current prices and 24-hour change percentages for Bitcoin and Ethereum, using USD as the target currency.
Merge (n8n node): Used to synchronize and combine the results from the two parallel HTTP requests before they proceed to the transformation stage.
Build JSON (Code n8n node): This highly specialized n8n node iterates over the merged input items and selectively constructs the final output JSON payload. It extracts price and change24h for crypto, and the USDEUR and USD_NGN rates, ensuring the output is clean and uniform.
Respond (n8n node): The final step in this n8n workflow. It takes the output generated by the Code node and sends it back to the client that initiated the original n8n trigger, concluding the API call.

Related n8n Workflows

Free

Nodes: 6 Nodes
Updated: December 26 2025
View all
Created by
David Olusola
David Olusola

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 - [email protected]

Featured*