Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] European central bank exchange rate #134

Merged
merged 3 commits into from
Dec 31, 2024
Merged

Conversation

sfraczek
Copy link
Collaborator

It adds european central bank exchange rate.

@sfraczek sfraczek added the enhancement New feature or request label Nov 21, 2024
sfraczek and others added 3 commits December 19, 2024 20:22
@sfraczek sfraczek force-pushed the european_central_bank branch from 2778af6 to c9d8615 Compare December 19, 2024 19:57
@sfraczek sfraczek marked this pull request as ready for review December 19, 2024 19:59
@sfraczek sfraczek requested a review from jczaja December 19, 2024 19:59
@sfraczek sfraczek linked an issue Dec 19, 2024 that may be closed by this pull request
use chrono;
use roxmltree;

pub fn get_eur_to_usd_exchange_rate(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this is named "get_eur_to_usd_exchange_rate" ? The exchange rate we need is USD to EUR ?

Copy link
Collaborator Author

@sfraczek sfraczek Dec 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My understanding is that we need EUR to USD because I assume that the denominator is 1 not nominator. In case of EUR/USD (which I read as euro to usd) if denominator is 1 than USD = 1 and EUR < 1 and overall value is < 1.

in this function I download the opposite USD/EUR and invert it because I haven't seen the inverse anywhere on ECB api.

Copy link
Collaborator Author

@sfraczek sfraczek Dec 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can change it if you prefer, I'm not fluent in financial market terminology so I don't know which is right, I was doing it so it is easy for me to understand.

Copy link
Collaborator

@jczaja jczaja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jczaja jczaja merged commit 4becaeb into main Dec 31, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ECB exchange rates
2 participants