dickwolff / Export-To-Ghostfolio

Convert transaction history export from your favorite broker to a format that can be imported in Ghostfolio.
https://hub.docker.com/r/dickwolff/export-to-ghostfolio
Apache License 2.0
51 stars 10 forks source link

Transaction degiro csv doens0't have the same inputs as sample #115

Open rubengr opened 1 week ago

rubengr commented 1 week ago

Hi

I'm testing you code, but get this error:

npm run start degiro

> export-to-ghostfolio@0.18.2 start
> tsx ./src/manual.ts degiro

[i] Starting Export to Ghostfolio v0.18.2
[i] Restored 0 ISIN-symbol pairs and 0 symbols from cache..
[i] Processing file using DeGiro converter
[i] There is a new version of the DEGIRO converter available in public beta and we're looking for feedback!
[i] You can enable the new converter by setting the environment variable DEGIRO_FORCE_V3=true
[i] Read CSV file. Start processing..

[e] An error ocurred while trying to retrieve an empty symbol (line 5)!

[e] An error ocurred while processing.
[e] TypeError: progress.log is not a function

CSV columns aren't correct. These are my columns: Data,Hora,Data Valor,Produto,ISIN,Descrição,T.,Mudança,,Saldo,,ID da Ordem

dickwolff commented 4 days ago

The columns itself do not matter as much (unless you’ve used the wrong export file but the headers to look correct to me), as they are language specific but the columns are always in the same position. So based on that the tool can infer the correct value while parsing.

The error on your log states it tries to find an empty symbol (with record on line 5 of your input). Can you maybe post this line here? Maybe this is a record that needs to be added to the ignore list.

rubengr commented 3 days ago

Line 5 - 03-10-2024,06:50,02-10-2024,,,Crédito de divisa,,EUR,5.21,EUR,644.02,

dickwolff commented 3 days ago

Thank you. What kind of record is this? Should this affect your Ghostfolio (e.g. is it a Fee record), or can it be ignored (e.g. withdraw)?

rubengr commented 2 days ago

In this case is related to line 6 "03-10-2024,06:50,02-10-2024,,,Levantamento de divisa,1.1072,USD,-5.77,USD,0.00,". It was removed 5.77 USD but the account is in € so the line 5 is the convertion of 5,77USD to Euro. This is all related to dividend in line 7 and 8. Line 7 - 02-10-2024,07:36,01-10-2024,COCA-COLA,US1912161007,Imposto sobre dividendo,,USD,-1.02,USD,5.77, Line 8 - 02-10-2024,07:36,01-10-2024,COCA-COLA,US1912161007,Dividendo,,USD,6.79,USD,6.79, I have other similar: Line 11: 19-09-2024,20:20,19-09-2024,APPLE INC,US0378331005,Levantamento de divisa,1.1191,USD,-457.52,USD,0.00,711b1ad7-a370-4c88-bc86-074aada4a278 Line 12: 19-09-2024,20:20,19-09-2024,APPLE INC,US0378331005,Crédito de divisa,,EUR,408.83,EUR,638.81,711b1ad7-a370-4c88-bc86-074aada4a278 Line 13: 19-09-2024,20:20,19-09-2024,APPLE INC,US0378331005,Comissões de transação DEGIRO e/ou taxas de terceiros,,EUR,-2.00,EUR,229.98,711b1ad7-a370-4c88-bc86-074aada4a278 Line 14: 19-09-2024,20:20,19-09-2024,APPLE INC,US0378331005,"Venda 2 Apple Inc@228,76 USD (US0378331005)",,USD,457.52,USD,457.52,711b1ad7-a370-4c88-bc86-074aada4a278

In this case is the selling of 2 shares of apple in line 14. Line 13 is the comission. Line 12 is the convertion of USD to € added to account and line 11 is the same value in USD.

dickwolff commented 1 day ago

Thanks for the information! If I interpret these correctly these are similar to records in my Dutch export where there is this thing with currency conversions after USD > EUR transactions and I’ve ignored those. So I propose to add these records to the ignore list as well.