dickwolff / DEGIRO-to-Ghostfolio

DEPRECATED: Convert a DEGIRO transaction history export to a format that can be imported in Ghostfolio
6 stars 1 forks source link

JSON not working if language does not match #1

Closed dascgit closed 1 year ago

dascgit commented 1 year ago

Which language do you expect in the CSV from degiro? Which file can be edited so that the JSON convertion works with other languages?

dickwolff commented 1 year ago

Hi,

Currently I'm doing checks on the Dutch language, I haven't gotten around to make it more robust so it would be language agnostic. I'm plannig to do this in the future. In the meanwhile you could try to make local changes to ìndex.ts` and try to make it work for your own language. Sale checks are at line 132, buy at line 159.

Also note that the YAHOO finance ISIN check does not always give the expected security, like mentioned in the code with the TODO at line 84. I also had this issue with IQQH which gave me the LSE (INRG.L) variant and was not the same as then one I have (IQQH.DE). I haven't found a good solution for this yet.

dascgit commented 1 year ago

Hi,

I have tried to edit the lines you specified but could not get it working. I am always getting "currency":"" in the JSON file. I also haven`t found a solution to get the export from degiro in another language like english. Mine is always in German.

Lipown commented 1 year ago

Same problem here. My exports are in CZECH language. Iam not a programmer but I can do the translation table xxx in Dutch = xxx in Czech if you can could provide me the list.

dickwolff commented 1 year ago

I pushed some changes today eliminating the need for some more language specific search queries. I have looked at the remaining Dutch words and I believe the list below are the remaining Dutch specific words; you can translate these to Czech yourself:

To enable me to make it completely language agnostic it would help to have an export in a foreign language. I would appreciate it if you could share a Czech export file with me. You could anonymise it if you feel more comfortable with that. As long as it contains records which enable me to differentiate buy/sell/dividend lines I could work with that. Thanks a lot!

Please note that there is a known issue in my code with the Yahoo Finance api, it will sometimes return some other stock from another exchange then you have in your Ghostfolio account. For example Yahoo Finance returns INRG.L instead of IQQH.DE (which I have). You have to manually correct these in the exported JSON.

Lipown commented 1 year ago

Sorry for late reply!

tax on dividend/dividend tax > Daň z dividendy buy > Nákup sell > Prodej (have never sold so this one is guess :) ) transactiekosten > DEGIRO Transaction and/or third party fees (Also guess, I only found this in file and it is in English not translated Czech. Exact translation of transaction fees would be "Transakční poplatky")

File attached:

Account.csv

dickwolff commented 1 year ago

No problem! Thanks for the file.

I have made some changes to the converter logic so it is more language agnostic (I have removed some Dutch terms). I've attached the conversion result in my reply below. This should be really close to what your input CSV contains. If you'll validate this for me, I can push the changes to the repo.

ghostfolio-degiro-czech.txt

I've validated this with my own Dutch export file and that works like a charm.

Lipown commented 1 year ago

Could you explain what you mean by validation? You want me to load the file in ghostfolio or check visually pls? Sorry I am just IT hobbyist so I do not know exact meaning of this terminology :)

dickwolff commented 1 year ago

Uploading to Ghostfolio would be the best way to visually check if it looks correct and the positions are also aligned with the real transactions from DEGIRO.

Lipown commented 1 year ago

Iam getting following when I renamed ghostfolio-degiro-czech.txt to ghostfolio-degiro-czech.json and tried to import to Ghostfolio

obrazek

dickwolff commented 1 year ago

Thanks! There are some records that are empty. I'll check tomorrow what went wrong with the processing of these securities.

dickwolff commented 1 year ago

At first glance it seems to refer to records in the CSV with ADR/GDR Pass-Through poplatek. Is this something Czech specific?

dickwolff commented 1 year ago

I added "pass-trough" to the skip list and now the export is like below:

ghostfolio-degiro-czech2.txt

Ghostfolio still wont import it because of the incorrect matching of VUSA. The Yahoo API maps it to VUSA.L (which is in GBp), but I think you have purchased it from a different exchange (like Euronext, Xetra or another). This is a known issue and you need to change these references yourself (replace the VUSA.L reference with the ticker you purchased, and also change the currency (if needed, it currently is USD).

I don't have a solution for this problem yet. No way of knowing which symbol to use with the limited information from the export. Unfortunately the ISIN query to Yahoo Finance does sometimes return an unexpected value (especially ETF's).

Lipown commented 1 year ago

At first glance it seems to refer to records in the CSV with ADR/GDR Pass-Through poplatek. Is this something Czech specific?

It seems like semi translated. poplatek = fee.

Regarding the issue of matching symbols. So I need to manually change the symbol and that's it right? :) It will be easy :) Thank you very much!

Lipown commented 1 year ago

I tried to rewrite the symbol to VUSA.AS. I still have error: obrazek

The issue is that the ETF is bouth in € but the divident is returned in USD. Any idea how to proceed?

dickwolff commented 1 year ago

Is the dividend within your DEGIRO account returned in USD or EUR? If it's the latter, you could manually change the USD to EUR in the JSON file.

Lipown commented 1 year ago

Is the dividend within your DEGIRO account returned in USD or EUR? If it's the latter, you could manually change the USD to EUR in the JSON file. Bought ETF by € but dividend returned in USD

image

Does it affect any FX rate?

Lipown commented 1 year ago

Hello I had finally time to test this. But after changing USD to EUR on the rows of this ETF dividents I got another error: obrazek

Any way to load the historical FX rates pls?

dickwolff commented 1 year ago

I believe you can do this in Ghostfolio in the admin panel and retrieve all data.

dickwolff commented 1 year ago

I have since added a few changes making the tool also check currency before determining a match. I also moved the tool to a generic repository. Can you check with the new version of the tool if the problem still persists?

dickwolff commented 1 year ago

Closing since the project has been moved to another repository