Closed mocdaniel closed 2 months ago
@mocdaniel You're probaly right, the app lookup exchange rate using Yahoo app. We need probably $ASSETCURRENCY -> USD -> $BASECURRENCY if we can get $ASSETCURRENCY -> $BASECURRENCY.
I have the same issue I think (added an issue)
Basically it seems the USD value is used instead of the EUR value, but is displayed with a EUR sign (when I setup my account in eur) hence causing confusion...
Perhaps you should have ALL VALUES internally be represented as {currency, amount} and a helper which is "displayInUserRequestedCurrency" which takes the {currency, amount} and converts it (using current exchange rates) to the user currency?
Should be fixed in v1.0.14. There is now a setting page to update exchange rate manually if can’t be fetched from yahoo finance api.
How would I add such an exchange rate manually? I don't see a button triggering a dialog or anything similar. Maybe I'm missing something, don't want to open another issue just yet.
You will see exchange rate when you add accounts and activities with currencies other than base currency. You will be able to edit the ones not found in Yahoo finance
After importing all of my portfolio's orders, I noticed some exchange rates not being applied for the position's ticker as well as its corresponding holding.
What I mean with this is i.e. the following:
RIO
) and got dividends once, both happened in EUR. The bulk import via CSV seems to have worked:Now if I look up the stats on YAHOO, it displays the Rio Tinto statistics in Great British Pence (GBp), and matches the wrong ticker value displayed in the app 1:1.
I noticed the same behavior for other currency pairs as well, e.g. EURHKD. After a quick glance into the source code it looks like it returns the fallback conversion rate of
1.0
here, for some reason:https://github.com/afadil/wealthfolio/blob/b7c9bc0ceb7f84112407402cb1ebaa9f42dc6dc6/src-tauri/src/portfolio/portfolio_service.rs#L74
However, without further debugging (and a better knowledge of Rust), I coulnd't find out why exactly this is/was happening.
My best guess is that many of the more 'exotic' currency pairs need to be converted by going over it this way:
$ASSETCURRENCY -> USD -> $BASECURRENCY
I've seen apps like Ghostfolio do it that way, probably because there always exists an exchange rate to/from USD, but probably not for (all) other currency pairs.