You need curl and jq packages:
sudo apt install curl jq
You can do this using floatrates.com API. It's updated daily at midnight.
curl http://www.floatrates.com/daily/usd.json | jq .pln
..or for USDEUR:
curl http://www.floatrates.com/daily/usd.json | jq .eur
...and for EURUSD:
curl http://www.floatrates.com/daily/eur.json | jq .usd
and so on.
Top comments (2)
Very nice and simple explaination. Do you know if there any request limit on this API?
I would expect there is a limit, but I don't know what it is.