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

Add eToro converter (and some other improvements) #28

Merged
merged 21 commits into from
Feb 9, 2024

Conversation

dickwolff
Copy link
Owner

@dickwolff dickwolff commented Feb 8, 2024

Added

  • ✨ New broker: eToro
  • 🏗️ Improved testability of the converters by allowing the Yahoo Finance service to be provided via dependency injection
  • 📈 Improved test coverage of Trading 212 converter

Fixes

  • 🐛 Fixed the Schwab converter as this was not working due to some changes from last week
  • 🐛 Added some more language specific rules for DEGIRO (ignore & platform fees)

@dickwolff dickwolff added New broker Request support for a new broker eToro Related to eToro labels Feb 8, 2024
@dickwolff
Copy link
Owner Author

@semiBE Here is a first draft of an Etoro converter. The example you provided in #25 is processed correctly.

Can you verify if the data is correct and if there are any other issues?

Whenever you are satisfied with it, can you provide me with instructions how to export data from Etoro (and convert xsls to CSV) so I can add it to the readme in the repository? Thanks!!

@dickwolff dickwolff changed the title Add Etoro converter Add eToro converter Feb 8, 2024
@semiBE
Copy link

semiBE commented Feb 8, 2024

For eToro you need to select the "Portfolio" section on the left then go to the top of the page where you see "My Portfolio" and click on the arrow facing down and select "History" then you click on the icon on the extreme right which looks like 3 vertical bars and a wheel on top (no clue about the meaning). There you select "Account statement". In the next page you choose the dates of interest and click create. In the next page you click on the xlsx icon on the top right to download the xlsx file. Afterwards you delete all the tabs from the file but the "Account Activity" and convert the file to a comma separated values file (.csv)

@semiBE
Copy link

semiBE commented Feb 8, 2024

I tested with the sample file and it looks like it's recognized somewhat differently than eToro. Here the log:

2024-02-08T19:19:23.989719371Z     at Object.readFileSync (node:fs:453:20)
2024-02-08T19:19:23.989723701Z     at SchwabConverter.processFileContents (/app/src/converters/schwabConverter.ts:30:28)
2024-02-08T19:19:23.989727891Z     at SchwabConverter.readAndProcessFile (/app/src/converters/abstractconverter.ts:34:14)
2024-02-08T19:19:23.989733549Z     at createAndRunConverter (/app/src/converter.ts:25:15)
2024-02-08T19:19:23.989739695Z     at FSWatcher.<anonymous> (/app/src/watcher.ts:47:30)
2024-02-08T19:19:23.989746819Z     at FSWatcher.emit (node:events:518:28)
2024-02-08T19:19:23.989751079Z     at FSWatcher.emit (node:domain:488:12)
2024-02-08T19:19:23.989755340Z     at FSWatcher.emitWithAll (/app/node_modules/chokidar/index.js:540:8)
2024-02-08T19:19:23.989759600Z     at FSWatcher._emit (/app/node_modules/chokidar/index.js:632:8)
2024-02-08T19:19:23.989763860Z     at NodeFsHandler._handleFile (/app/node_modules/chokidar/lib/nodefs-handler.js:400:14) {
2024-02-08T19:19:23.989768540Z   errno: -2,
2024-02-08T19:19:23.989772381Z   code: 'ENOENT',
2024-02-08T19:19:23.989776572Z   syscall: 'open',
2024-02-08T19:19:23.989780902Z   path: 'Date,Type,Details,Amount,Units,Realized Equity Change,Realized Equity,Balance,Position ID,Asset type,NWA\n' +

@dickwolff
Copy link
Owner Author

Did you try it with the Docker image? Because I have not published a new version of the image yet that has eToro support. So that would explain why it has run with Schwab. Currently you can only run it locally.

@dickwolff
Copy link
Owner Author

@semiBE I have created a beta image here (tag 0.4.0-beta). This now should work with eToro file watcher (and also has some more improvements for the other converters).

Copy link

github-actions bot commented Feb 9, 2024

Code Coverage

Package Line Rate Branch Rate Complexity Health
src 34% 49% 0
src.converters 42% 34% 0
src.models 38% 100% 0
Summary 40% (298 / 749) 38% (128 / 336) 0

@dickwolff dickwolff changed the title Add eToro converter Add eToro converter (and some other improvements) Feb 9, 2024
@dickwolff
Copy link
Owner Author

Fixes request from #25

@dickwolff dickwolff merged commit 6380880 into main Feb 9, 2024
3 checks passed
@dickwolff dickwolff deleted the feature/Etoro-Converter branch February 9, 2024 09:23
@dickwolff dickwolff mentioned this pull request Feb 9, 2024
@semiBE
Copy link

semiBE commented Feb 9, 2024

Did you try it with the Docker image? Because I have not published a new version of the image yet that has eToro support. So that would explain why it has run with Schwab. Currently you can only run it locally.

Indeed I tested it in Docker, I`ll check the beta image!

@dickwolff dickwolff removed New broker Request support for a new broker eToro Related to eToro labels Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants