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
31 stars 8 forks source link

Include BUX csv template #77

Closed huub66 closed 3 weeks ago

huub66 commented 1 month ago

Hi, great tool, thanks for developing! Would it be possible to include the BUX CSV template to the tool?

bux_csv_template.csv

dickwolff commented 1 month ago

Thanks for the request and the sample CSV. I will try and work on it this weekend and get back to you!

dickwolff commented 1 month ago

I still have to add test coverage, but here is a first draft of the BUX converter for you to try. Can you test this and let me know if everything works as expected?

Also, can you provide me with the export instructions so I can add them to the readme? Please check the current export instructions in the readme if you need inspiration 😅. Thanks!

huub66 commented 1 month ago

Not yet successful in conversion, see below command and result;

docker run --rm -v /ghostfolio-export/in-folder:/var/tmp/e2g-input -v /ghostfolio-export/out-folder:/var/tmp/e2g-output --env GHOSTFOLIO_ACCOUNT_ID=e1c71dd6-5726-44de-a143-0cf0e6ba3d73 dickwolff/export-to-ghostfolio:0.14.0-beta

> export-to-ghostfolio@0.14.0 watch
> tsx ./src/watcher.ts

[i] Watching /var/tmp/e2g-input..
[i] Found ._bux_transaction_history.csv!
[i] Determined the file type to be of kind 'bux'.
[i] Starting Export to Ghostfolio v0.14.0
[i] Found bux_transaction_history.csv!
[i] Determined the file type to be of kind 'bux'.
[i] Starting Export to Ghostfolio v0.14.0
[i] Restored 0 ISIN-symbol pairs and 0 symbols from cache..
[i] Processing file using Bux converter
[i] Restored 0 ISIN-symbol pairs and 0 symbols from cache..
[i] Processing file using Bux converter
[e] An error ocurred while processing.
[e] Error details: Error: An error ocurred while parsing!
[e] Moving file to output..
[i] Stop container as usePolling is set to false..
dickwolff commented 1 month ago

Hmm, that error message is not really helpful. I’ll need to improve that.

The error occurs when parsing the file. Something with either the headers or the contents. Will try and add some more detailed logging so you can try again. I will get back to you and let you know when the logging is added.

dickwolff commented 1 month ago

I have added more logging in the converter (was separate PR but merged the changes).

Can you pull the 0.14.0-beta image and try again so the CSV parse issue will show? Thanks!

dickwolff commented 1 month ago

While adding tests I found there was an issue with the yahoo-finance2 dependency. I have updated the dependency and now it seems to work again. I have pushed a new version of 0.14.0-beta to Docker Hub.

huub66 commented 1 month ago

Thanks for following up on this, conversion is now running smooth! Output file however is generated incorrectly, the timestamp of the conversion time is used for all activities while it should be the timestamp per activity from the csv file.

dickwolff commented 1 month ago

I see the timestamp mapping did not read the correct value. I have fixed that now and the sample export converts with corresponding timestamps! A new 0.14.0-beta is now available!

huub66 commented 4 weeks ago

Works!

One suggestion though; would it be possible to name platform related fees an interest as "Bux Interest" or "Bux Fee". In the current ways these cost are generated with a string as name which looks quite confusing in the UI. Not sure if ghostfolio is offering a better way to prevent this, being new to that application as well :)

dickwolff commented 4 weeks ago

Great suggestion, I've added this just now.

Can you help me with the export instructions, so I can put them in de README file? Thanks a lot!

huub66 commented 4 weeks ago

Thanks! Will create some instructions tomorrow.

huub66 commented 3 weeks ago

Noticed you had created some instructions already, just a small remark; you can retrieve transaction history 3x per day instead 3x per month. Herewith some screens to support your instructions;

1170-2314-max

1170-2092-max

dickwolff commented 3 weeks ago

Yes, i took them from the BUX support website. I thought I read there is was 3 times per month. Will change that, thanks for the tip!