Spin up a tiny, serverless-style API from n8n that returns BTC/ETH prices & 24h changes plus USD→EUR and USD→NGN from public, no-key data sources. Ideal for dashboards, low-code apps, or internal tools that just need a simple JSON feed.
btc.price
, btc.change_24h
eth.price
, eth.change_24h
usd_eur
, usd_ngn
, ts
(ISO timestamp)🔐 Security (recommended)
Add a Webhook Secret (query header check in Code node) or IP allowlist via your reverse proxy.
If embedding in public sites, proxy through your backend and apply rate-limit/cache headers there.
🚀 Usage ideas
Frontend dashboards (Chart.js, ECharts).
HomeAssistant / Node-RED info panels.
Google Apps Script to store the JSON into Sheets on a timer.
🎛 Customization
More coins: extend CoinGecko ids= (e.g., bitcoin,ethereum,solana).
More FX: read additional codes from fx.rates and add to the payload.
Timestamps: convert ts to your preferred timezone on client side.
CORS: if calling from browsers, add CORS headers in Respond (options → headers).
🧩 Troubleshooting
Empty/partial JSON: run the two HTTP nodes once to verify responses.
429s / rate limiting: add a short Wait node or cache outputs.
Wrong URL: ensure you’re using Production URL outside the n8n editor.
Security errors: if you add a secret, return 401 when it’s missing/invalid.