Menu

Moving from Frankfurter to AllRatesToday without rewriting your code
📰

Moving from Frankfurter to AllRatesToday without rewriting your code

DEV Community: javascript·Exchange Rate API·3 days ago
#7zHAG2HK
#devtojavascript#devto#dev#rates#frankfurter
Long article (251 words) — no AI summary yet.
Reading 0:00
15s threshold

Plenty of apps start on Frankfurter and later need something it doesn't do: bank rates, intraday rates, more customs tables. Rewriting every call site is the usual blocker.

AllRatesToday has a compatibility endpoint that answers in Frankfurter's v1 shape ( {amount, base, date, rates} ), backed by the same ECB table.

Step 1: change the base URL

// before const BASE = "https://api.frankfurter.dev/v1" ; // after const BASE = "https://allratestoday.com/api/compat/frankfurter" ;

const res = await fetch ( `${BASE}/latest?from=USD&to=EUR,GBP` ) ; const { base , date , rates } = await res . json ( ) ;

Enter fullscreen mode

Exit fullscreen mode

/latest , dated tables, date ranges ( /2026-11-01..2026-11-30 ) and /currencies keep the same paths and parameters. Dates and ranges need a free key.

Two differences to know

For an unsupported or same-currency pair, the compat endpoint returns 200 with empty rates , where Frankfurter returns 404 / 422 .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.