jessecooper / pyetrade

Python E-Trade API Wrapper
GNU General Public License v3.0
205 stars 96 forks source link

Rate Limit Support #34

Closed coder2day closed 3 years ago

coder2day commented 4 years ago

The v0 Etrade API had support for a Rate Limit, see page 205 at https://cdn.etrade.net/1/20190322.0/static_devportal/static/downloads/ETRADE_Developer_Platform_Guide.pdf Do we know if this is supported in v1 Etrade API? If so, can we create a pyetrade function to support it?

jessecooper commented 4 years ago

I do not see anything in the V1 api documentation in regards to this but I do remember it from v0. So either they have removed the rate limit (probably not), they just have not documented the rate limit api or it is no longer available. Either way, the best way to find out about this is from putting in a ticket with ETrade support. If you do so and get a response about it please update this issue with the information.

codr2day commented 3 years ago

Two months later and Etrade support is still not sure on their actual limits. Best estimate from them is 5-10 API requests per second (depending upon which API invoked), and the limit resets on the top of the hour.

jessecooper commented 3 years ago

I find it hard to believe they do not understand their own rate limits. Maybe the buy out has something to do with it. I hope that is not a sign of problems to come.

codr2day commented 3 years ago

Definitely unfortunate. I exchanged 12 messages on my ticket number, ending up with:

We're sorry about the time it's taking to resolve your inquiry. I'm sorry but we are trying to answer as many API inquiries as soon as possible. I apologize as market conditions and staffing issues surrounding Covid-19 is making requests and inquiries take longer than normal. As soon as I have an update for your inquiry I will reply to you. Thank you for your patience.

What's the chance the API team was laid off with the then pending merger, now done deal?

That said, it would probably be faster to write a new python request API to see if the v0 Etrade Rate Limit still works. Worst case, it errors out and it's wasted effort. Best case, it returns actual rate limits.

emican commented 3 years ago

I have been using v1 market at roughly 5 requests per second for some time now. Occasionally there is a hiccup (probably from my side). On 7/9/19, I asked about a limit api and guidance on requests per second, here is the response from etrade:


This message is regarding your inquiry about rate limits.

We do not have a limit API but, here are the current limits for v1 APIs.

There is max request per second and max request per hour. If the max request per hour is hit, then it will override the max request per second.

v1 accounts - 35600 max request per hour, 10 max request per second v1 market. - 140000 max request per hour, 20 max request per second v1 order - 17800 max request per hour, 20 max request per second. v1 user - 35600 max request per hour, 10 max request per second

codr2day commented 3 years ago

Thanks, good input that there isn't a limit API (anymore).

I can understand the max request per hour when it is lower than the requests per second times 3600 seconds (one hour).

I can't quite understand the market limit of 140000 per hour, and 20 per second (which is only 72000 per hour). So does it mean there is no hourly limit for market, or the 20 per second is not accurate?

I seemed to get errors on market requests when doing less than 20 per second, and they resolved after some minutes of waiting. So trying to understand the real limit and stay within it.