Ability to list copied positions?
I copy a bunch of people on eToro, and I'm trying to create a summary containing all my currently copied positions.
By inspecting the requests, I've figured out that all the data I need is included in the response from the logindata endpoint. Would it be possible to add an endpoint to expose this data?
In case anyone is interested, this is where the data about "Mirrors" can be found in the response from logindata:
List of Mirrors containing names and avatars: AggregatedResult.ApiResponses.MirrorsUserData.Content.users[]
Lists of copied positions: AggregatedResult.ApiResponses.PrivatePortfolio.Content.ClientPortfolio.Mirrors[].Positions
Just to follow up, I've forked the project and added the functionality I needed: https://github.com/mortenscheel/etoro-api.
Let me know if you'd be interested in a pull request. This is my first experience with Kotlin, so I'd probably need some help cleaning thigs up though.
hi, thanks for your contribution, i'm going to merge your changes into master
it's merged now, thanks again
No problem. I've pushed a few changes to the fork, in case you want to get those as well. I assume you'll review the code before tagging a new release? Like I said, I've never worked with Kotlin before, and it's been years since I did anything in Java.
Also, I should mention that the Dockerfile is taken from https://github.com/JustinGuese/docker-etoro-api which was mentioned in #26
btw i found issue with mirror controller, it fails if there is no mirrors in your login data, it also doen't work for 'Demo' mode
will commit fixes
Thanks. I don't know how to implement Demo mode for Mirrors. Should it just return an empty array?
I've pushed an update that simplifies a few thing. I've dropped caching of mirror data, and made mirror_id optional in /mirrors/positions.
Regarding code style, do you know how I can make Idea use the standard you're using?
hi, i don't use any settings other than default for kotlin, just doint shift+ctrl+options+L with 3 checkboxes for code format. btw demo is already implemented in master