All Projects → Zarathustra2 → TradeRepublicApi

Zarathustra2 / TradeRepublicApi

Licence: MIT license
Unofficial trade republic API

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects
Makefile
30231 projects

Projects that are alternatives of or similar to TradeRepublicApi

Reddit Hyped Stocks
A web application to explore currently hyped stocks on Reddit
Stars: ✭ 173 (+29.1%)
Mutual labels:  finance, stocks
cira
Cira algorithmic trading made easy. A Façade library for simpler interaction with alpaca-trade-API from Alpaca Markets.
Stars: ✭ 21 (-84.33%)
Mutual labels:  finance, stocks
Investments
Helps you with managing your investments
Stars: ✭ 213 (+58.96%)
Mutual labels:  finance, stocks
Tiingo Python
Python REST Client for interacting with the Tiingo Financial Data API
Stars: ✭ 152 (+13.43%)
Mutual labels:  finance, stocks
Stocksera
Web application that provides alternative data to retail investors
Stars: ✭ 426 (+217.91%)
Mutual labels:  finance, stocks
Yahoo Finance Api
PHP client for Yahoo Finance API 📈
Stars: ✭ 179 (+33.58%)
Mutual labels:  finance, stocks
Ta Rs
Technical analysis library for Rust language
Stars: ✭ 248 (+85.07%)
Mutual labels:  finance, stocks
Tradestation
EasyLanguage indicators and systems for TradeStation
Stars: ✭ 65 (-51.49%)
Mutual labels:  finance, stocks
pyEX
Python interface to IEX and IEX cloud APIs
Stars: ✭ 407 (+203.73%)
Mutual labels:  finance, stocks
fundamentos
Download Bovespa Stock Market fundamentals with Python.
Stars: ✭ 80 (-40.3%)
Mutual labels:  finance, stocks
Sec Edgar Downloader
Download SEC filings from the EDGAR database using Python
Stars: ✭ 146 (+8.96%)
Mutual labels:  finance, stocks
DeltaTrader
极简版Python量化交易工具
Stars: ✭ 174 (+29.85%)
Mutual labels:  finance, trade
Turingtrader
The Open-Source Backtesting Engine/ Market Simulator by Bertram Solutions.
Stars: ✭ 132 (-1.49%)
Mutual labels:  finance, stocks
Finance
Here you can find all the quantitative finance algorithms that I've worked on and refined over the past year!
Stars: ✭ 194 (+44.78%)
Mutual labels:  finance, stocks
Algobot
A C++ stock market algorithmic trading bot
Stars: ✭ 78 (-41.79%)
Mutual labels:  finance, stocks
Python Trading Robot
A trading robot, that can submit basic orders in an automated fashion using the TD API.
Stars: ✭ 235 (+75.37%)
Mutual labels:  finance, stocks
Stocksharp
Algorithmic trading and quantitative trading open source platform to develop trading robots (stock markets, forex, crypto, bitcoins, and options).
Stars: ✭ 4,601 (+3333.58%)
Mutual labels:  finance, stocks
Iex Api
The IEX API provides any individual or academic, public or private institution looking to develop applications that require stock market data to access near real-time quote and trade data for all stocks trading on IEX.
Stars: ✭ 683 (+409.7%)
Mutual labels:  finance, stocks
Mida
The open-source and cross-platform trading framework
Stars: ✭ 263 (+96.27%)
Mutual labels:  finance, stocks
stockbot
Alpaca algo stock trading bot
Stars: ✭ 105 (-21.64%)
Mutual labels:  stocks, trade

Addendum to Export Trade Republic Timeline as Excel(csv)

This section only explains a specific use-case, which has been tested in the examples folder.

The rest of the readme is intentionally not modified.

Steps to use

Important note: This use case is tested on Linux, python 3.8 and with German Language only.

  • Update the ./examples/envConsts.py file with appropriate path(s).
  • copy environment_template.py to environment.py and change it to match your TR account.
  • See the StartMe.sh linux command-line script for how it is used further.

Trade Republic API

This is an unofficial API for the German broker Trade Republic.

Unfortunately the previous owner has made his repo private. This is meant to be a follow-up repo, more features to be added in the future.

Currently, this can be used to try out algorithmic trading or learning how to process a lot of data.

Trade Republic only allows one device to be registered at the same time. So if you are currently logged in on your phone it will log you out from your phone.

Also running it the first time will likely error but then running it for the second time will work. Have to debug this but not much time.

Example blocking history

from api import TrBlockingApi

# This will go through your most recent history events
# and print it on the terminal
def main():

    tr = TrBlockingApi(NUMBER, PIN)
    tr.login()

    res = tr.hist()
    print(res.keys())
    for x in res["data"]:
        print(tr.hist_event(x["data"]["id"]))

Example async

def process(json_data):
    print("I am a processor: ", json_data)

async def main():
    tr = TRApi(NUMBER, PIN)
    tr.login()

    # Each callback can be specified 
    # if wanted, default is print
    await tr.cash(callback=lambda x: print(f"Cash data: {x}"))
    await tr.portfolio()

    isin = "US62914V1061"
    await tr.derivativ_details(isin)
    await tr.stock_details(isin)
    await tr.ticker(isin, callback=process)
    await tr.news(isin) 
    
    await tr.start()

if __name__ == '__main__':
    asyncio.get_event_loop().run_until_complete(main())

JSON Format

Dividende

{
	"type": "timelineEvent",
	"data": {
		"id": "1512453d-1880-4b46-ac4e-2a8ee3f97187",
		"timestamp": 1616811300786,
		"icon": "https://assets.traderepublic.com/img/icon/timeline/Dividend.png",
		"title": "Stock XYZ",
		"body": "Gutschrift Dividende pro Aktie von 0,40 USD",
		"cashChangeAmount": 1.97,
		"action": {
			"type": "timelineDetail",
			"payload": "1512453d-1880-4b46-ac4e-2a8ee3f97187"
		},
		"attributes": [

		],
		"month": "2021-03"
	}
}

Einzahlung

{
	"type": "timelineEvent",
	"data": {
		"id": "7f854148-4278-45f3-8c99-e2f7059ab70c",
		"timestamp": 1616660487759,
		"icon": "https://assets.traderepublic.com/img/icon/timeline/CashIn.png",
		"title": "Einzahlung",
		"body": "Geldeingang vom Konto\nDE32120300001032514893",
		"cashChangeAmount": 100.0,
		"attributes": [

		],
		"month": "2021-03"
	}
}

Auszahlung

{
	"type": "timelineEvent",
	"data": {
		"id": "f4d62473-d4ed-485a-b56e-7c0509c04701",
		"timestamp": 1617126782673,
		"icon": "https://assets.traderepublic.com/img/icon/timeline/CashOut.png",
		"title": "Auszahlung",
		"body": "Geldausgang an Dein\nReferenzkonto",
		"cashChangeAmount": -5.0,
		"attributes": [

		],
		"month": "2021-03"
	}
}

Sparplan Ausführung

{
	"type": "timelineEvent",
	"data": {
		"id": "91a39f02-376b-4fd7-a3c4-05a3cd1e52ba",
		"timestamp": 1615910518967,
		"icon": "https://assets.traderepublic.com/img/icon/timeline/SavingsPlanExecuted.png",
		"title": "Stock XYZ",
		"body": "Sparplan ausgef\u00fchrt zu 156,86 \u20ac",
		"cashChangeAmount": -9.99,
		"action": {
			"type": "timelineDetail",
			"payload": "91a39f02-376b-4fd7-a3c4-05a3cd1e52ba"
		},
		"attributes": [

		],
		"month": "2021-03"
	}
}

Kauf

{
	"type": "timelineEvent",
	"data": {
		"id": "67ce42be-ec6a-4e97-bb1e-e4eac899bb4f",
		"timestamp": 1616690513004,
		"icon": "https://assets.traderepublic.com/img/icon/timeline/Arrow-Right.png",
		"title": "Stock XYZ",
		"body": "Kauf zu 50,99 \u20ac",
		"cashChangeAmount": -51.99,
		"action": {
			"type": "timelineDetail",
			"payload": "67ce42be-ec6a-4e97-bb1e-e4eac899bb4f"
		},
		"attributes": [

		],
		"month": "2021-03"
	}
}

Verkauf

{
	"type": "timelineEvent",
	"data": {
		"id": "3265a78b-4738-419a-88a5-f8d3f5cc914d",
		"timestamp": 1617008391425,
		"icon": "https://assets.traderepublic.com/img/icon/timeline/Arrow-Left.png",
		"title": "Stock XYZ",
		"body": "Limit Verkauf zu 265,30 \u20ac\nRendite: \ufffc 22,20 %",
		"cashChangeAmount": 123.4,
		"action": {
			"type": "timelineDetail",
			"payload": "3265a78b-4738-419a-88a5-f8d3f5cc914d"
		},
		"attributes": [
			{
				"location": 35,
				"length": 9,
				"type": "positiveChange"
			}
		],
		"month": "2021-03"
	}
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].