This Python script converts Trade Republic transaction exports into a format compatible with Ghostfolio, an open-source investment tracking application.
- Python 3
- Python Libraries:
pandas
datetime
csv
json
collections
- Clone this repository:
git clone https://github.com/taclab/trade-republic-to-ghostfolio.git
cd trade-republic-to-ghostfolio
- Install dependencies:
pip install pandas
This script integrates into a comprehensive data import workflow:
-
Transaction Download
- Use traderepublic-portfolio-downloader to export your Trade Republic transactions
-
Transaction Conversion
- Use this script to convert transactions to Ghostfolio format
-
Market Data Feeding
- Use ghostfolio-feeder to import market data
-
Place your exported Trade Republic CSV file (
traderepublic_transactions.csv
) in the same directory as the script -
Run the script:
python script.py
- The script will generate two files:
ghostfolio_transactions.csv
: Transactions in Ghostfolio formatinstruments_data.json
: Unique instrument data for ghostfolio-feeder
- Converts buy and dividend transactions
- Generates transaction statistics
- Adds metadata for Ghostfolio scraper configuration
- Currently supports buy and dividend transactions
- Uses a generic scraper configuration for Börse Frankfurt
- Requires post-processing for specific configurations
This script is provided as-is, without warranty. Always verify your imported transactions.