diff --git a/README.md b/README.md index 44efc19..8dcedd6 100644 --- a/README.md +++ b/README.md @@ -38,18 +38,36 @@ To be able to write rates into the DWH, take these points into consideration: Remember to activate the project virtual environment. -You can use `xexe` to get rates and store them locally like this: +You can use `xexe` to get rates and store them locally as a `.csv` file like this: ```bash xexe get-rates --start-date "2024-01-01" --end-date "2024-01-10" --output my_rates.csv ``` +By default, `xexe` runs against a mock rate generator. To get real rates from xe.com, you need to specify the `--rates-source` to `xe` like this: + +```bash +xexe get-rates --rates-source xe --output my_xe_rates.csv +``` + +You can also be explicit about wanting mock rates like this: + +```bash +xexe get-rates --rates-source mock --output my_mock_rates.csv +``` + If you want to point writing to the DWH instead of a local file. ```bash xexe get-rates --output dwh ``` +If you don't want to write the rates anywhere, activate the `--dry-run` flag. You still need to specify some output. + +```bash +xexe get-rates --dry-run --output my_rates.csv +``` + You can also run without specifying dates. Not specifying `end-date` will get rates up to today. Not specifying `start-date` will get dates up to last week. ```bash @@ -63,7 +81,7 @@ xexe get-rates --output my_rates.csv xexe get-rates --currencies USD,EUR,GBP --output my_rates.csv ``` -The output file will follow this schema: +The output file for `.csv` outputs will follow this schema: - `date` - `from_currency` @@ -76,7 +94,7 @@ The file will contain all the combinations of the different currencies and dates This is better understood with an example. Find below a real call and its real CSV output: ```bash -xexe get-rates --start-date 2024-01-01 --end-date 2024-01-03 --currencies EUR,USD,GBP --output file.csv --ignore-warnings +xexe get-rates --start-date 2024-01-01 --end-date 2024-01-03 --rates-source xe --currencies EUR,USD,GBP --output file.csv ``` ```csv