Order only succeeds when logged in once via browser
See original GitHub issueI do have some strange errors when ordering:
2022-03-09 18:37:57,586 CRITICAL MainThread 400
2022-03-09 18:37:57,586 CRITICAL MainThread {"errors":[{"text":"order.error.128"}]}
2022-03-14 11:42:02,077 CRITICAL MainThread 500
2022-03-14 11:42:02,077 CRITICAL MainThread {"errors":[{"text":"Internal server error"}]}
Unfortunately there is no more debug output despite I set
level=logging.DEBUG
I just found out that at least the
{"errors":[{"text":"Internal server error"}]}
error is gone, when I login to degiro once via browser. I guess this is a bug. The session is created correctly:
2022-03-14 12:08:17,645 INFO MainThread get_session_id:response_dict: {'isPassCodeEnabled': True, 'locale': 'de_DE', 'redirectUrl': 'https://trader.degiro.nl/trader/', 'sessionId': 'xxxxxxxxx.prod_a_116_4', 'status': 0, 'statusText': 'success'}
Might always happen after a weekend, when I did not login for a long time, but not sure. No, happened this morning again. Always have to login first, until buy order is executed.
Issue Analytics
- State:
- Created 2 years ago
- Comments:17 (4 by maintainers)
Top Results From Across the Web
Sign-in form best practices - web.dev
Sign -in form best practices. Use cross-platform browser features to build sign-in forms that are secure, accessible and easy to use.
Read more >How to log out user from web site using BASIC authentication?
In short, the logout script inverts the logic of the login script, only returning the success page if the user isn't passing the...
Read more >Chrome Browser Privacy Policy - Google
Chrome takes your privacy very seriously. Here's everything you need to know about your privacy while browsing the web on Chrome.
Read more >Set Chrome policies for users or browsers - Google Support
You can enforce Chrome policies from your Admin console that apply to: User accounts to sync policies and preferences across a user's devices....
Read more >Promise - JavaScript - MDN Web Docs
The States and fates document from the original Promise proposal ... if it is only a succeed message, it probably will be. console.log(`Yay!...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I agree that the login process for the web portal is different from DeGiro’s API connect() method. I have noticed that if you log in via the browser or your phone, no errors pop up until midnight of the next day . So right now I am logging in into Degiro every morning as workaround, so that I am sure my daily orders will go through. But it isn’t very pleasant experience, and goes against principle of having automated API where everything supposed to be automated without user intervention.
@coveritytest I’m glad you brought this up, since I have the same experience. It’s certainly not related to a timeout issue between consecutive API calls, see my remark in this post.
Work-around
When we omit step 3, step 5 will fail with errors.
Observations
connect()
method. @Chavithra Do you have any idea what this difference might be?