Convert Degiro transaction data to Tradervue generic importer format
DegiroToTradervue.py Python scripts converts your "Transaction.csv" export from Degiro to the generic import format for Tradervue.
- Python 3
- Pandas Module
- Requests Module
Modules can be installed with pip and the given requirements.txt
pip install -r requirements.txt
- Data from Transaction.csv will be read in
- Degiro export contains Date, Time, ProductName, ISIN, Exchange, Quantity, Price, and much more...
- Tradervue only needs Date, Time, Symbol, Quantity and Price.
- Change CVS header to match Tradervue format
- Convert date format from dd-mm-YYYY to YYYY-mm-dd
- Try to convert ISIN to stock symbol, this is the "hardest" part.
- First try to look up symbol in "SymbolLookUp.csv" table
- If not found make an API call to OpenFIGI.
- This should work for US Stocks
- Everything else needs to be added to the "SymbolLookUp.csv" manually or the API call needs to be improved.
- Without an APIKEY the rate limit is 5 calls per minuted, so we will wait 12 Seconds between calls.
- Write API call response back to "SymbolLookUp.csv" for furture use.
- Write data to "output.csv"
Basic usage just needs the path to the "Transaction.csv" exported from your Degiro Account.
Transaction report, for a given date range, can be exported under: Activity -> Transaction -> Export -> CSV
Invoke the Python script:
python3 DegiroToTradervue.py --data "path/to/Transaction.csv"
"output.csv" will be generated.
Which in turn can be imported by the Tradervue generic importer.
-h, --help show help message and exit
--data DATA [requiered] CSV file containing the Degiro transaction data e.g."Transactions.csv"
--apiKey APIKEY [optional] OpenFIGI api key to increase the rate limit on ISIN to Symbol lookups
--log_level [optional] Logging level: {DEBUG,INFO,WARNING,ERROR,CRITICAL}
--log_file LOG_FILE [optional] File were the log gets written to e.g. "DegiroTradervue.log"
The APIKEY can be used to open up the rate limit. The OpenFIGI API key can be obtained at www.openfigi.com