Open step21 opened 2 years ago
From what I see the web app only shows the current status, no history. Communication happens through subscribing through ids via WebSockets. So probably not easier I would say.
I am not sure what the question is? Re their API: It is all based on websocket pub & sub
Sorry for this less than perfectly worded issue. What I meant was not related to usage, but authentication - as far as I understood, before you had to basically reset your app, to authenticate for the API. As with the web app this is not necessary, I would expect that this is not necessary anymore, but I can call the login function, get a code via sms and go (and then use websockets etc). I was just not sure as I think in this repo at least the 'reset' part is still reflected somewhat. (https://github.com/Zarathustra2/TradeRepublicApi/blob/7112566ff45257fec65d2fbf9cd36729a6b6f8b8/trapi/api.py#L41) So I just wanted to ask if this is still necessary, sorry for the question with not enough info.
Probably there is now a better/different mechanism for that but as I don't use TradeRepublic as my broker I am not sure whether I find the time to try out the new web app and check the new login mechanism
Ok sure no worries. Maybe I'll get to it myself at some point.
@step21 I wrote a quick and dirty script to subscribe to your portfolio using the TR Web API Authentication. The only problem with this approach is that the session only lasts a certain amount of time. Thus, you need to re-enter the 2FA token every time you restart or as mentioned after some time. I tried to automate the 2FA process using tasker, but was not successful. My idea would be to set up a notification trigger in tasker, extract the token from the notification and then send it to a custom webhook, where it can be used to (re-)authenticate the script.
Here is my script: https://gist.github.com/kosimst/30be00741674d262886065a5cb3a0295
Would be awesome if someone could solve the tasker part.
@kosimst Awesome, thanks. I don't think I can develop the tasker part, as this seems to be Android only and atm I only have an iOS device.
As they have a web app now, it should be easier, no?