GithubHelp home page GithubHelp logo

jackliu2006 / pytr Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pytr-org/pytr

0.0 0.0 0.0 96 KB

Use TradeRepublic in terminal and mass download all documents

Home Page: https://pypi.org/project/pytr/

License: MIT License

Python 100.00%

pytr's Introduction

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

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] [-v {warning,info,debug}] [-V]
            {help,login,dl_docs,portfolio,details,get_price_alarms,set_price_alarms,export_transactions,completion}
            ...

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

Commands:
  {help,login,dl_docs,portfolio,details,get_price_alarms,set_price_alarms,export_transactions,completion}
                         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
    dl_docs              Download all pdf documents from the timeline and sort
                         them into folders. Also export account transactions
                         (account_transactions.csv) and JSON files with all
                         events (events_with_documents.json and
                         other_events.json
    portfolio            Show current portfolio
    details              Get details for an ISIN
    get_price_alarms     Get overview of current price alarms
    set_price_alarms     Set price alarms based on diff from current price
    export_transactions  Create a CSV with the deposits and removals ready for
                         importing into Portfolio Performance
    completion           Print shell tab completion

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

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.

pytr's People

Contributors

marzzzello avatar parodev93 avatar ptrstn avatar nborrmann avatar miry avatar sepidre avatar jackliu2006 avatar cgoncalves avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.