Chavithra / degiro-connector

This is yet another library to access Degiro's API.
BSD 3-Clause "New" or "Revised" License
212 stars 47 forks source link

error 429 when sending 2 order commands within less than 1 second #62

Open e97317 opened 2 years ago

e97317 commented 2 years ago

Hello, Probably not a bug but rather a limit from the server side. Do you see the same behaviour? Any workaround? Thanks.

Chavithra commented 2 years ago

Hello there,

is it possible to share the full error log ?

Without your credentials of course.

I think Degiro is doing some check with this order creation.

So I wouldn’t play too much with fast ordering.

It’s safer to put some random number of seconds between your orders.

funnel20 commented 2 years ago

I've detected this behaviour too. DeGiro throws HTTP 429 (Too Many Requests) when sending consecutive Order requests within 0.75 s. So please ensure to create some delay or advanced queue scheduler.

When we have completed #54 , it will be possible to return this status code and make a retry after 1.0 s.

123m321 commented 2 years ago

Maybe good to create a list of all error numbers. Don't remember the numbers, but I saw error numbers for

Just met error 502, but don't know what it means.

funnel20 commented 2 years ago

I share your desire to have a proper fault list. And moreover the root cause and solutions for them. We can do this better once #54 is completed, as we then better can analyse the HTTP status codes and fault messages (horrible that DeGiro sends them as localised strings).

I'm happy then to add a specific chapter on Fault Handling to the docu.