Skip to content

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

Open
cahthuranag wants to merge 3 commits into
polybar:masterfrom
cahthuranag:feat/allratestoday-fallback
Open

cahthuranag wants to merge 3 commits 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>
@cahthuranag

Copy link
Copy Markdown
Author

@x70b1 thanks for the approval. Anything else needed from me before this is merged?

@x70b1

x70b1 commented Nov 9, 2026

Copy link
Copy Markdown
Member

Oh. Yeah the change is fine. But can you remove the new comments? They add no benefit to 3 lines of shell code.

@cahthuranag

Copy link
Copy Markdown
Author

@x70b1 Done, the comments are removed (d9c2f1c).

@x70b1

x70b1 commented Nov 11, 2026

Copy link
Copy Markdown
Member

Please remove also the ad link.

@cahthuranag

Copy link
Copy Markdown
Author

Done, removed the README change. The PR is now just the one-line API URL change.

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