Skip to main content

Download TradeRepublic files and convert data for import in Portfolio Performance.

Project description

GitHub tag (with filter) PyPI build and publish PyPI - Version

pytrpp: Download TradeRepublic files and export data to Portfolio Performance

This is a library for the private API of the Trade Republic online brokerage. This package and its authors are not affiliated with Trade Republic Bank GmbH.

Files can be produced to import orders and other transactions into Portfolio Performance: An open source tool to calculate the overall performance of an investment portfolio - across all accounts - using True-Time Weighted Return or Internal Rate of Return. https://www.portfolio-performance.info/. The package authors are not affiliated with Portfolio Performance.

This package is based on the source of pytr (https://github.com/pytr-org/pytr) originally by marzzzello.

Installation

Install release from PyPI with pip install pytrpp

Or install from git repo like so: pip install git+https://github.com/MartinScharrer/pytrpp

Usage

Recommended usages:

  • pytrpp -n PHONE_NO -p PIN -D TARGET_DIR
  • pytrpp -C CREDENTIALS_FILE -D TARGET_DIR
    The credential file consists of two lines with the phone number followed by the PIN.

Full usage information:

usage: pytrpp [-h] [-v {warning,info,debug}] [-V] [-n PHONE_NO] [-p PIN]
              [-l LOCALE] [-D DIR] [-K COOKIES_FILE] [-C CREDENTIALS_FILE]
              [-E EVENTS_FILE] [-P PAYMENTS_FILE] [-O ORDERS_FILE]
              [-F DOCS_DIR] [-d DAYS | -s DATE | -r FILE] [--workers WORKERS]

Use "pytrpp command_name --help" to get detailed help to a specific command

options:
  -h, --help             show this help message and exit
  -v {warning,info,debug}, --verbosity {warning,info,debug}
                         Set verbosity level (default: info)
  -V, --version          Print version information and quit
  -n PHONE_NO, --phone_no PHONE_NO
                         TradeRepublic phone number (international format)
  -p PIN, --pin PIN      TradeRepublic pin
  -l LOCALE, --locale LOCALE
                         Locale setting (e.g. "en" for English, "de" for
                         German)
  -D DIR, --dir DIR      Main directory to use. Special path can be set using
                         the following options.
  -K COOKIES_FILE, --cookies-file COOKIES_FILE
                         Cookies file
  -C CREDENTIALS_FILE, --credentials-file CREDENTIALS_FILE
                         Credential file
  -E EVENTS_FILE, --events-file EVENTS_FILE
                         Events file to store
  -P PAYMENTS_FILE, --payments-file PAYMENTS_FILE
                         Payments file to store
  -O ORDERS_FILE, --orders-file ORDERS_FILE
                         Orders file to store
  -F DOCS_DIR, --docs-dir DOCS_DIR
                         Directory to download files to
  --workers WORKERS      Number of workers for parallel downloading

Date Range:
  Control date range to include (mutually exclusive):

  -d DAYS, --last-days DAYS
                         Number of last days to include
  -s DATE, --since DATE  Include only entry since this date
  -r FILE, --since-ref FILE
                         Include only entry newer than the modified date of
                         this file

Authentication

Currently only web login (simulating a browser) is supported.

The phone number and the PIN must be provided. A login code is then generated as second factor on the connected smartphone which also needs to be entered. The login can be buffered using a cookie file, so multiple runs will only require the login code once until the cookie expires.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytrpp-0.1.3.tar.gz (21.6 kB view details)

Uploaded Source

Built Distribution

pytrpp-0.1.3-py3-none-any.whl (22.4 kB view details)

Uploaded Python 3

File details

Details for the file pytrpp-0.1.3.tar.gz.

File metadata

  • Download URL: pytrpp-0.1.3.tar.gz
  • Upload date:
  • Size: 21.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.2

File hashes

Hashes for pytrpp-0.1.3.tar.gz
Algorithm Hash digest
SHA256 0349b241837701396127e2b8ebc64e49d1aeeefb6955b5d96ae0a5ee5bd3f0a3
MD5 987bfcd9a34fb7997c81b32a391cef18
BLAKE2b-256 571da8c7853829e065aeb94d5eee3e9a5366424ff3e396c9642337a01582339d

See more details on using hashes here.

File details

Details for the file pytrpp-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: pytrpp-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 22.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for pytrpp-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c48f5280d499235c1fe53ef90cc0adf3b3030d6b6cbc064f0014447cb664a716
MD5 65f9cb774575a25fc711bfd87d16fda0
BLAKE2b-256 2e9b9dbeb2ce9bab49881e4c3fb182caa2034b680a6e6c1a8368faebc3bcb18e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page