ecb-rates/README.md

54 lines
1.3 KiB
Markdown
Raw Normal View History

2025-01-07 17:01:22 +01:00
# ECB Rates
A cli utility to fetch the currency rates against the Euro from the ECB.
## Install
First, make sure that you have the rust toolchain installed. If not, then go to [rustup](https://rustup.rs) to install it.
Now, Git clone the project, then cd into the projects root-dir. Thereafter run:
```sh
cargo install --path .
```
Congratulations! Now the cli binary `ecb-rates` will be in your cargo bin folder.
## Features
2025-01-09 14:11:46 +01:00
#### Fetch in different views
- Last available day.
- Last 90 days
- Since the dawn of the *EUR*
#### Display select currencies
- as an ASCII table
- in JSON prettified
- in JSON minified
#### Cache
It features an extensive cache, which will [calculate hollidays](src/holiday.rs) in order to know whether to invalidate it or not.
2025-01-07 17:01:22 +01:00
2025-01-09 15:06:00 +01:00
### Examples
2025-01-07 17:01:22 +01:00
2025-01-09 15:06:00 +01:00
#### Show the original data from ECB
![eur-to-all](screenshots/eur-to-all.png)
2025-01-07 17:01:22 +01:00
2025-01-09 15:06:00 +01:00
#### ...with only select currencies
![eur-to-all](screenshots/eur-to-all-select.png)
#### Put the exchange rate in the perspective of any currency
![usd-to-all](screenshots/usd-to-all.png)
#### Flip it
![all-to-usd](screenshots/all-to-usd.png)
2025-01-07 17:01:22 +01:00
## Acknowledgment
2025-01-09 14:11:46 +01:00
The data is (obviously) provided by the [European Central Bank](https://www.ecb.europa.eu/stats/policy_and_exchange_rates/euro_reference_exchange_rates/html/index.en.html)