Skip to content

Automated macOS tool to sync Trade Republic transactions to Google Drive (CSV) with smart deduplication and backups.

Notifications You must be signed in to change notification settings

ttaffi/TradeSync

Repository files navigation

TradeSync Logo

TradeSync

Automated Transaction Synchronization for Trade Republic

License: MIT Python 3.11+ Platform macOS Release

Seamlessly export your Trade Republic transactions and keep your Google Drive spreadsheet in sync.
Built for macOS. Secure, local, and automated.


📖 Overview

TradeSync resolves the pain of manually exporting and tracking your portfolio changes. It acts as a bridge between your Trade Republic account and your personal finance spreadsheets on Google Drive.

By automating the retrieval (pytr) and synchronization (Google Drive API) of data, TradeSync ensures your financial records are always up-to-date without duplicates or manual intervention.

✨ Key Features

  • 🔄 Automated Sync: One-click synchronization of your entire transaction history.
  • ☁️ Google Drive Integration: Directly appends new transactions to your chosen CSV file in the cloud.
  • 🧠 Smart Deduplication: Intelligently hashing rows to prevent duplicates, even if you sync multiple times.
  • 🛡️ Safety First:
    • Local Processing: Your credentials stay on your machine.
    • Auto-Backup: Automatically creates a timestamped backup of your remote CSV before every update.
  • 🖥️ Native macOS Experience:
    • Standalone .app (no Python required).
    • Native notifications on completion.
    • Sleek, modern UI with Dark Mode support.

🚀 Getting Started

Prerequisites

  1. Trade Republic Account: A verified phone number and PIN.
  2. Google Account: Creating a project in Google Cloud Console (see Configuration).

Installation

  1. Go to the Releases page.
  2. Download the latest TradeSync_version.dmg.
  3. Open the DMG and drag TradeSync.app to your Applications folder.

Usage

  1. Launch TradeSync from your Applications.
  2. The first time you run it, you'll be guided through the Configuration setup.
  3. Once configured, simply click Sync Now.
    • When 2FA is required, the app will prompt you for the code sent to your phone.
    • Sit back and wait for the "Sync Complete" notification!

⚙️ Configuration

To ensure security, TradeSync requires your own credentials. It does not use a shared server.

1. Google Cloud Credentials

You need to generate a credentials.json file to allow TradeSync to access your Google Drive.

  1. Go to the Google Cloud Console.
  2. Create a new Project (e.g., "TradeSync Personal").
  3. Enable the Google Drive API for this project.
  • Go to "APIs & Services" > Library.
    • Search for "Google Drive API".
    • Click Enable.
  1. Go to APIs & Services > OAuth consent screen.
    • User Type: External (unless you have a Workspace org).
    • Fill in required fields (AppName, email).
    • Test Users: IMPORTANT! Click "Add Users" and add your own Google email address. Without this, the login will fail.
  2. Go to Credentials > Create Credentials > OAuth client ID.
    • Application type: Desktop app.
  3. Download the JSON file.
  4. Import this file when prompted by TradeSync settings.

2. Google Drive Folder

  1. Create a folder in your Google Drive where you want the transactions to be saved.
  2. Copy the Folder ID from the URL (the string after folders/ in your browser address bar).
  3. Paste this ID into TradeSync settings.

3. Trade Republic

  • Phone Number: International format (e.g., +393331234567).
  • PIN: Your 4-digit app PIN.

👨‍💻 Development

Want to contribute? Setup your local environment to build and test TradeSync.

Requirements

  • Python 3.11+
  • virtualenv

Setup

# Clone the repository
git clone https://github.com/ttaffi/TradeSync.git
cd TradeSync

# Create and activate virtual environment
python -m venv .venv
source .venv/bin/activate

# Install dependencies
pip install -r requirements.txt

Running Locally

# Run the GUI Application
python -m src.launcher

# Run Core Logic (CLI)
python -m src.main

Building for Release

We use PyInstaller to create the standalone macOS application.

./scripts/build_release.sh

Artifacts will be generated in dist/.


🔒 Privacy & Security

  • Local Execution: This application runs entirely on your device. Your Trade Republic credentials and Google tokens are stored locally.
  • Direct Connection: Data flows directly from Trade Republic to your computer, and then to your Google Drive. There is no "middleman" server.
  • Open Source: The code is available here for inspection.

🤝 Credits

This project makes use of the excellent pytr library to handle the communication with Trade Republic's API. A huge thanks to the maintainers of that project.

⚠️ Disclaimer

This is an unofficial tool and is not affiliated with, endorsed by, or connected to Trade Republic Bank GmbH or Google LLC. Use it at your own risk. The developer is not responsible for any financial decisions or data loss.


�📄 License

Distributed under the MIT License. See LICENSE for more information.

About

Automated macOS tool to sync Trade Republic transactions to Google Drive (CSV) with smart deduplication and backups.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published