Closed Sadzurami closed 2 months ago
To be honest, i'm not sure is it worth to apply this delays for price loading requests, or not
Personally i saw rate limits for selling items and removing listings, but not for price loading.. but steam is steam, really don't know what will be better
I removed delays for prices load for now
If someone will see limits for that, will be easy to apply delays back
Do you know which calls trigger the rate limit (is it 429 response)? If so, would be good to detect specifically that and increase the delay greatly and/or alert the user somehow.
Do you know which calls trigger the rate limit (is it 429 response)? If so, would be good to detect specifically that and increase the delay greatly and/or alert the user somehow.
https://steamcommunity.com/market/removelisting/:id
https://steamcommunity.com/market/sellitem/
429 http code
maybe even (not sure)
https://steamcommunity.com/market/cancelbuyorder/
but i don't think increasing delays after limits is good idea, because we don't know when will be next limits window
If a 429 is hit, there's no point even trying to send a request (especially with a user configured delay), you can force next request to be delayed by like 2 minutes or whatever the rate limit is.
If a 429 is hit, there's no point even trying to send a request (especially with a user configured delay), you can force next request to be delayed by like 2 minutes or whatever the rate limit is.
made some changes please, check it, if you have some time
It seems that Steam is throttling other /market/
requests too (I checked myself).
So I return delays back to price and listings loading requests.
made some tweaks which will be better for handling rate-limits and writing less code
also made some refactor things on sellQueue
and some other queues
Thanks for this PR, I think a fix for throttling is OK, but I don't see any point in adding a configurable setting. It should:
Thanks for this PR, I think a fix for throttling is OK, but I don't see any point in adding a configurable setting. It should:
- Use a timeout that doesn't cause throttling.
- Delay requests after being throttled (similar to what @xPaw said).
Agree with you. The main purpose of having configurable setting is https://github.com/Nuklon/Steam-Economy-Enhancer/issues/219.
Also, we don't know exact steam limits. I guess 1 second between requests will be enough, and i tested 1s and didn't see rate limits, but it's not guarantee.
And, there is possibility that steam will change limits in future, so, having configurable settings is not that bad. But, yea, for this case better to have setting not only for market request, but for all requests (now 300ms by default).
If Steam changes it again we can release a new version to address it, I don't think this needs to be configurable as it should work out of the box.
If Steam changes it again we can release a new version to address it, I don't think this needs to be configurable as it should work out of the box.
Alr, i'll make commit with changes.
@Nuklon looks like it's done
returned back localStorage to request function
it will help prevent limits, if two tabs opened at the same time, for example market and inventory
That's my bad, I thought sessionStorage was shared between tabs.
@Nuklon please, take a look to this pr request
Steam changed rate limits on various endpoints, including market
Would be cool to see adjustable delay between market actions
ref: https://github.com/Nuklon/Steam-Economy-Enhancer/issues/219