Skip to content

feat(tools): add keyless last-resort fallback to currency converter - #102

Open
cahthuranag wants to merge 1 commit into
aghyad97:mainfrom
cahthuranag:feat/allratestoday-provider
Open

cahthuranag wants to merge 1 commit into
aghyad97:mainfrom
cahthuranag:feat/allratestoday-provider

Conversation

@cahthuranag

Copy link
Copy Markdown

Disclosure: I work on AllRatesToday, an exchange rate API.

The currency converter tries Frankfurter, then ExchangeRate-API, and shows "All currency APIs are currently unavailable" if both fail. This adds one more fallback before that error: AllRatesToday's keyless Frankfurter-compatible endpoint (https://allratestoday.com/api/compat/frankfurter/latest?from=usd).

  • No API key and no account needed. It serves the ECB reference rates in the same response shape as Frankfurter, so it reuses FrankfurterResponse and the existing currency list.
  • CORS is enabled, so it works from the browser like the other two.
  • Frankfurter stays first and ExchangeRate-API second, with no change to their behaviour. The new endpoint is only called when both fail.

One file changed, about 20 lines. I haven't run bun run test locally. Happy to adjust, and you are free to decline this if you'd rather keep two sources.

The converter tries Frankfurter, then ExchangeRate-API. If both fail it
now tries AllRatesToday's keyless Frankfurter-compatible endpoint (ECB
reference rates, same response shape, CORS enabled, no API key). The
first two sources and their order are unchanged.

Disclosure: the author works on AllRatesToday.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 23, 2026

Copy link
Copy Markdown

@cahthuranag is attempting to deploy a commit to the Aghyad's projects Team on Vercel.

A member of the Team first needs to authorize it.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant