Skip to content

ticker-forex: switch to a keyless endpoint (exchangeratesapi.io now needs a key) - #474

Open
cahthuranag wants to merge 1 commit into
polybar:masterfrom
cahthuranag:feat/allratestoday-fallback
Open

cahthuranag wants to merge 1 commit into
polybar:masterfrom
cahthuranag:feat/allratestoday-fallback

Conversation

@cahthuranag

Copy link
Copy Markdown

I work on AllRatesToday.

ticker-forex.sh calls https://api.exchangeratesapi.io/latest, which now returns {"success":false,"error":{"code":101,"type":"missing_access_key"}} for unkeyed requests, so the module shows nothing.

This PR points API at https://allratestoday.com/api/compat/exchangeratesapi/latest, which is keyless and returns the same {"base":..,"date":..,"rates":{..}} shape, so the curl/jq line is unchanged. Rates are ECB reference rates, updated once per working day. The base and symbols parameters work as before (any ECB currency as base).

The endpoint's terms ask for a visible credit where the rates are shown, so I added a one-line credit to the script's README and a comment in the script. Happy to switch the URL to another keyless source (e.g. Frankfurter) if you prefer that.

Tested: sh -n on the script, and ran it with the default EUR/PLN config; it prints # 4.40. I couldn't run shellcheck locally; CI is the arbiter.

api.exchangeratesapi.io now rejects requests without an access key
(error 101 missing_access_key), so the script prints nothing.
Point it at a keyless endpoint with the same response shape.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

2 participants