Skip to main content

Use TradeRepublic in terminal

Project description

pytr: Use TradeRepublic in terminal

This is a library for the private API of the Trade Republic online brokerage. I am not affiliated with Trade Republic Bank GmbH.

Installation

Install with pip install pytr

Or you can clone the repo like so:

git clone https://github.com/marzzzello/pytr.git
cd pytr
pip install .

Usage

$ pytr help
usage: pytr [-h] [-s {bash,zsh}] [-v {warning,info,debug}] [--applogin]
            {help,login,portfolio,dl_docs,get_price_alarms,details,set_price_alarms} ...

positional arguments:
  {help,login,portfolio,dl_docs,get_price_alarms,details,set_price_alarms}
                        Desired action to perform
    help                Print this help message
    login               Check if credentials file exists. If not create it and ask for input.
                        Try to login. Ask for device reset if needed
    portfolio           Show current portfolio
    dl_docs             Download all pdf documents from the timeline and sort them into folders
    get_price_alarms    Get overview of current price alarms
    details             Get details for an ISIN
    set_price_alarms    Set price alarms based on diff from current price

optional arguments:
  -h, --help            show this help message and exit
  -s {bash,zsh}, --print-completion {bash,zsh}
                        print shell completion script (default: None)
  -v {warning,info,debug}, --verbosity {warning,info,debug}
                        Set verbosity level (default: info)
  --applogin            Use app login instead of web login (default: False)

Authentication

There are two authentication methods:

  • Web login (default)
  • App login

Web login is the newer method that uses the same login method as app.traderepublic.com, meaning you receive a token in the TradeRepublic app or via SMS.

App login is the older method that uses the same login method as the TradeRepublic app. First you need to perform a device reset - a private key will be generated that pins your "device". The private key is saved to your keyfile. This procedure will log you out from your mobile device.

$ pytr login
$ # or
$ pytr login --phone_no +49123456789 --pin 1234

If no arguments are supplied pytr will look for them in the file ~/.pytr/credentials (the first line must contain the phone number, the second line the pin). If the file doesn't exist pytr will ask for for the phone number and pin.

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

pytr-0.0.11.tar.gz (17.9 kB view details)

Uploaded Source

Built Distribution

pytr-0.0.11-py3-none-any.whl (21.1 kB view details)

Uploaded Python 3

File details

Details for the file pytr-0.0.11.tar.gz.

File metadata

  • Download URL: pytr-0.0.11.tar.gz
  • Upload date:
  • Size: 17.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for pytr-0.0.11.tar.gz
Algorithm Hash digest
SHA256 b0a755cb40e34a0d385e4ac38de8f5de1b8043921d60528503efb7fcfb33d08f
MD5 cb6eda287e43c270fb768e94a040b3b6
BLAKE2b-256 f40bc283b366a7f3f4dbff9fa3fd036c238eb65d515fb1f8e09d669481517c50

See more details on using hashes here.

File details

Details for the file pytr-0.0.11-py3-none-any.whl.

File metadata

  • Download URL: pytr-0.0.11-py3-none-any.whl
  • Upload date:
  • Size: 21.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for pytr-0.0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 e9ed83f09788de50cccf03c9513976b910e6e44531595fd41d9efcec7d5e92c8
MD5 c40a23b600b35b07d63a8072233b5b99
BLAKE2b-256 b7bb127b7a02ceb51424e6532df3163e2a8e4fc3cb03759786b6652da9c997ea

See more details on using hashes here.

Supported by

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