update readme

This commit is contained in:
Pablo Martin 2025-05-27 11:18:34 +02:00
parent 22bfc217f3
commit d20c46d52d

View file

@ -81,6 +81,15 @@ xexe get-rates --output my_rates.csv
xexe get-rates --currencies USD,EUR,GBP --output my_rates.csv
```
Using the `currencies` option will compute ALL combinations between different currencies. If you want a finer-grained control over which currency pairs you fetch, you can instead use the `pairs` options like this:
```bash
# Pairs must be concatenations of two valid ISO 4217 codes. Each pair must be
# comma-separated. No need to use reverse and equal pairs. As in, if you provide
# `USDEUR`, xexe will do that pair and also `EURUSD`, `EUREUR` and `USDUSD`.
xexe get-rates --pairs USDEUR,EURGBP --output my_rates.csv
```
The output file for `.csv` outputs will follow this schema:
- `date`
@ -89,7 +98,7 @@ The output file for `.csv` outputs will follow this schema:
- `exchange_rate`
- `exported_at`
The file will contain all the combinations of the different currencies and dates passed. This includes inverse and equal rates.
The file will contain all the combinations of the different currencies (or pairs) and dates passed. This includes inverse and equal rates.
This is better understood with an example. Find below a real call and its real CSV output:
@ -133,6 +142,7 @@ A few more details:
- Running `get-rates` with an `end-date` beyond the current date will ignore the future dates. The run will behave as if you had specified today as the `end-date`.
- Trying to place an `end-date` before a `start-date` will cause an exception.
- Running with the option `--dry-run` will run against a mock of the xe.com API. Format will be valid, but all rates will be fixed. This is for testing purposes.
- `xexe` will log details to `xexe.log`.
### Deploying for Superhog infra