ok24601 / etoro-api

etoro trading REST API
ISC License
100 stars 48 forks source link

Export positions as Yahoo Finance portfolio #33

Open mortenscheel opened 3 years ago

mortenscheel commented 3 years ago

I found out it's pretty easy to generate a csv file from my eToro positions and import it in Yahoo Finance.

The csv structure is pretty simple: Column name Data from Note
Symbol EtoroAsset.SymbolFull To upper case
Trade Date EtoroPosition.OpenDateTime YYYYMMDD format
Purchase Price EtoroPosition.OpenRate
Quantity EtoroPosition.Amount / EtoroPosition.OpenRate Amount of shares
Comment Optional

I would send a PR, but I don't know the best way to add Symbol to EtoroPosition. The response should probably have these headers:

Content-Type: text/csv
Content-Disposition: attachment;filename=portfolio.csv
EnriqueWood commented 1 month ago

Is there a way to export SELL (not SHORT) positions?