Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ConnectionError: 400 Client Error: Bad Request for url: https://trader.degiro.nl/login/secure/login #107

Closed
MPrazzoli opened this issue Dec 27, 2022 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@MPrazzoli
Copy link

I got this message when I run the client_details_table.py and I got the {"status":1,"statusText":"error"} when I run the url: https://trader.degiro.nl/login/secure/login in the browser. It seems like that url doesn't work.

@JerBouma
Copy link

Seems to be caused by DEGIRO's new policy blocking the default request. Issue was also discussed (and solved) here: lolokraus/DegiroAPI#61.

@123m321
Copy link
Contributor

123m321 commented Jan 2, 2023

Thanks, will dive into this because it suddenly started on 29 december. Although I get error 429.

How and where can I apply the work around? I'm used to my own code, but adjusting the source code here is another story.

@JerBouma
Copy link

JerBouma commented Jan 2, 2023

@Chavithra Can you take a peek?

@123m321
Copy link
Contributor

123m321 commented Jan 2, 2023

This is my log, it gives the 429 error. However, it worked flawless until 29 december. And I added a lot of 1 second sleep moments, so that cant be the source of the problem.

Often my script works for a few minutes, and then fails. If I try to restart immediately, it won't start as it stops at getting the data from the exchange.

edit: i just upgraded the degiro_connector.. maybe this was all I needed to do

trading_api.connect()
File "/home/ubuntu/.local/lib/python3.9/site-packages/degiro_connector/core/abstracts/abstract_action.py", line 72, in __call__
return self.call(*args, **kwargs)
File "/home/ubuntu/.local/lib/python3.9/site-packages/degiro_connector/trading/actions/action_connect.py", line 121, in call
connection_storage.session_id = self.get_session_id(
File "/home/ubuntu/.local/lib/python3.9/site-packages/degiro_connector/trading/actions/action_connect.py", line 102, in get_session_id
raise ConnectionError(e)
ConnectionError: 429 Client Error: Too Many Requests for url: https://trader.degiro.nl/login/secure/login/totp

@123m321
Copy link
Contributor

123m321 commented Jan 4, 2023

Unfortunately the issue persists. I get kicked out after a few minutes.

@123m321
Copy link
Contributor

123m321 commented Jan 9, 2023

I solved the 429 error (it used to be possible to login multiple times at the same time), but now I get the 401 error. Which is the same as the 400 issue, only difference seems to be the 2FA.

A work around would be great, @Chavithra did you have time to see where the problem is?

2023-01-09 11:57:01,025 | degiro_connector.trading.actions.action_get_update | CRITICAL | error
13579 2023-01-09 11:57:01,026 | degiro_connector.trading.actions.action_get_update | CRITICAL | <Response [401]>
13580 2023-01-09 11:57:01,026 | degiro_connector.trading.actions.action_get_update | CRITICAL | 401 Client Error: Non-Autorisé for url: https://trader.degiro.nl/trading/secure/v5/update/1634822;jsessionid      =44A930849362491E723CD849241B0C6E.prod_a_111_4?orders=0&portfolio=0&totalPortfolio=0&intAccount=888888&sessionId=44A930849362491E723CD849241B0C6E.prod_a_111_4
13581 2023-01-09 11:57:01,026 | root | CRITICAL | Unhandled exception

@Chavithra Chavithra self-assigned this Jan 2, 2024
@Chavithra Chavithra added the bug Something isn't working label Jan 2, 2024
@Chavithra
Copy link
Owner

Hello folks,

I guess this was fixed in the 2.0.23 from January 12th 2023 or later version since the library is working currently.

Closing this issue for now.

Feel free to reopen it for further update.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants